var Slide, Slider; Slide = (function() { function Slide(element, index, options) { this.element = element; this.index = index; this.options = options; this.element.css({ position: 'absolute', top: 0, left: this.index * this.element.width() }); } return Slide; })(); Slider = (function() { function Slider(container, options) { this.container = container; this.options = options; this.state = 'waiting'; this.size = { height: this.container.height(), width: this.container.width() }; this.container.css({ overflow: 'hidden', position: 'absolute', top: 0, left: 0 }).wrap("
"); this.wrapper = this.container.parent(); this.initSlides(); } Slider.prototype.appendNavigation = function() { var _this = this; this.wrapper.after(this.nextLink()).after(this.previousLink()); this.nextLink().on('click', function() { _this.stopAutoplay(); _this.next(); return false; }); return this.previousLink().on('click', function() { _this.stopAutoplay(); _this.previous(); return false; }); }; Slider.prototype.appendPagination = function() { var _this = this; this.wrapper.after(this.pagination()); return this.pagination().on('click', 'a', function(e) { _this.to(($(e.currentTarget)).data().index - 1); _this.stopAutoplay(); return false; }); }; Slider.prototype.previousLink = function() { return this.$previousLink || (this.$previousLink = $('', { html: this.options.previousBtnContent, "class": this.options.previousBtnClass, href: '#' })); }; Slider.prototype.nextLink = function() { return this.$nextLink || (this.$nextLink = $('', { html: this.options.nextBtnContent, "class": this.options.nextBtnClass, href: '#' })); }; Slider.prototype.pagination = function() { var index, slide, _i, _len, _ref; if (!this.$pagination) { this.$pagination = $('