(function(j,c,l){c.fn.touchwipe=function(a){var b={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:!0};a&&c.extend(b,a);this.each(function(){function a(){this.removeEventListener("touchmove",c);d=null;k=!1}function c(h){b.preventDefaultEvents&&h.preventDefault();if(k){var f=d-h.touches[0].pageX;h=e-h.touches[0].pageY;Math.abs(f)>=b.min_move_x?(a(),0=b.min_move_y&&(a(), 0this.options.speed&&(this.options.speed=450);0>this.options.margin&&(this.options.margin=4);0>this.options.border&&(this.options.border=1);if(1>this.options.minItems|| this.options.minItems>this.itemsCount)this.options.minItems=1;this.options.current>this.itemsCount-1&&(this.options.current=0)},_configure:function(){this.current=this.options.current;this.visibleWidth=this.$esCarousel.width();this.visibleWidthNext');this.$navPrev=c('Previous');c('
').append(this.$navPrev).append(this.$navNext).appendTo(this.$el)},_toggleControls:function(a,b){a&&b?1===b?"right"===a?this.$navNext.show():this.$navPrev.show():"right"===a?this.$navNext.hide():this.$navPrev.hide():(this.current===this.itemsCount-1||this.fitCount>=this.itemsCount)&&this.$navNext.hide()},_initEvents:function(){var a=this;c(j).bind("resize.elastislide",function(){a._setCurrentValues(); a.visibleWidthd)return!1;if("right"===a&&this.sliderW-(Math.abs(f)+d)Math.abs(f)-d)d=Math.abs(f),this._toggleControls("left",-1),this._toggleControls("right",1);else{var e;"right"===a?e=Math.abs(f)+this.options.margin+Math.abs(d):e=Math.abs(f)-this.options.margin-Math.abs(d);0e+this.options.margin?this._toggleControls("right",1):this._toggleControls("right",-1);c.fn.applyStyle=g===l?c.fn.animate:c.fn.css;this.$slider.applyStyle({marginLeft:b}, c.extend(!0,[],{duration:this.options.speed,easing:this.options.easing,complete:function(){j&&j.call()}}))},_slideToCurrent:function(a){this._slide("",-(this.current*this.itemW),a)},add:function(a,b){this.$items=this.$items.add(a);this.itemsCount=this.$items.length;this._setDim();this._setCurrentValues();this.$slider.css({width:this.sliderW});this._slideToCurrent();b&&b.call(a)},destroy:function(a){this._destroy(a)},_destroy:function(a){this.$el.unbind(".elastislide").removeData("elastislide");c(j).unbind(".elastislide"); a&&a.call()}};var m=function(a){this.console&&console.error(a)};c.fn.elastislide=function(a){if("string"===typeof a){var b=Array.prototype.slice.call(arguments,1);this.each(function(){var g=c.data(this,"elastislide");g?!c.isFunction(g[a])||"_"===a.charAt(0)?m("no such method '"+a+"' for elastislide instance"):g[a].apply(g,b):m("cannot call methods on elastislide prior to initialization; attempted to call method '"+a+"'")})}else this.each(function(){c.data(this,"elastislide")||c.data(this,"elastislide", new c.elastislide(a,this))});return this}})(window,jQuery);