var $;$=jQuery,jQuery.fn.endlessRiver=function(a){a=jQuery.extend({speed:100,pause:!0,buttons:!1},a);var b=$('
.pause").toggleClass(e),s=!1,h.stop()}function v(){$("#"+i+" .er-controls > .play").toggleClass(e),s=!0;var a=h.offset().left+f(h).outerWidth(!0)-t;q(a,m/l*a)}if(h.width(k),h.height(h.parent().height()),m=(l=f(h).outerWidth(!0))/a.speed*1e3,q(l,m),a.pause&&r(),a.buttons){b.insertAfter(n),j.on("click.erPause","#"+i+" .er-controls > .pause",function(){if(!s)return!1;$(this).toggleClass(e),h.off(d),s=!1}),j.on("click.erPlay","#"+i+" .er-controls > .play",function(){if(s)return!1;$(this).toggleClass(e),s=!0,r();var a=h.offset().left+f(h).outerWidth(!0)-t,b=m/l*a;q(a,b)});var w=!1;j.on("click.erNext","#"+i+" .er-controls > .next",function(){if(s){$("#"+i+" .er-controls > .pause").toggleClass(e),s=!1;return}if(w)return!1;var a=f(h).outerWidth(!0);w=!0,h.stop(!0,!0).animate({left:"-="+a},g(a),"linear",function(){f(h).appendTo(h),h.css("left",0),w=!1})}),j.on("click.erPrev","#"+i+" .er-controls > .prev",function(){if(s){$("#"+i+" .er-controls > .pause").toggleClass(e),s=!1;return}if(w)return!1;var a=h.children("li:last").outerWidth(!0);h.css("left","-"+a+"px"),h.children("li:last").prependTo(h),w=!0,h.stop(!0,!0).animate({left:"+="+a},g(a),"linear",function(){w=!1})})}})}