(function( $, undefined ) { /* * Slider object. */ $.Slider = function( options, element ) { this.$el = $( element ); this._init( options ); }; $.Slider.defaults = { current : 0, // index of current slide bgincrement : 50, // increment the bg position (parallax effect) when sliding autoplay : false, // slideshow on / off interval : 8000 // time between transitions }; $.Slider.prototype = { _init : function( options ) { this.options = $.extend( true, {}, $.Slider.defaults, options ); this.$slides = this.$el.children('div.da-slide'); this.slidesCount = this.$slides.length; this.current = this.options.current; if( this.current < 0 || this.current >= this.slidesCount ) { this.current = 0; } this.$slides.eq( this.current ).addClass( 'da-slide-current' ); var $navigation = $( '