var $;$=jQuery,jQuery.fn.endlessRiver=function(a){a=jQuery.extend({speed:100,pause:!0,buttons:!1},a);var b=$(''),c="tick-clones",d="mouseenter mouseleave",e="play fas fa-play pause fas fa-pause",f=function(a){return a.children("li:first")},g=function(b){return b/a.speed*1e3};return this.each(function(){var l,m,$=jQuery,j=$("body"),h=$(this),i="ER_"+ +new Date,s=!0;h.wrap("
"),h.css({margin:"0 !important",padding:"0 !important"});var t=h.offset().left,k=1;h.children("li."+c).remove(),h.addClass("newsticker"),h.wrap("
");for(var n=h.parent().wrap("
"),o=h.children("li"),p=n.outerWidth(!0);k .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})})}})}