text: /* EasySlides - слидер - Autor 2017 Shabanov Ivan (Шабанов Иван) */!function(v){v(document).ready(function(){v("#slider_media_sponsors").EasySlides({autoplay:!0,show:5})}),v.fn.EasySlides=function(t){var u=v.extend({autoplay:!1,timeout:3e3,show:5,vertical:!1,reverse:!1,touchevents:!0,delayaftershow:300,stepbystep:!0,loop:!0,startslide:0,distancetochange:10,beforeshow:function(){},aftershow:function(){}},t);return this.each(function(){var t,d,l=this,c=!0,a=v(l).children("*:not(.next_button, .prev_button, .nav_indicators)").length,h=0,e=!1,o=0;if(0<a){for(;a<u.show;){var n=v(l).html();v(n).appendTo(l),v(l).children(".next_button:eq(0), .prev_button:eq(0), .nav_indicators:eq(0)").remove(),d=v(l).children("*:not(.next_button, .prev_button, .nav_indicators)"),a=v(d).length}if(d=v(l).children("*:not(.next_button, .prev_button, .nav_indicators)"),0<v(l).children(".nav_indicators").length){for(var i="<ul>";o<a;)i=i+"<li>"+ ++o+"</li>";i+="</ul>",v(l).children(".nav_indicators").html(i),o=0}var s,r=function(){var t,e=o-h,n=h-o;1==u.loop&&(e<0&&(e+=a),n<0&&(n+=a)),h!=o&&(t=1==u.loop?e<n?h+1:h-1:0<e?h+1:h-1,f(t),setTimeout(r,u.delayaftershow))},f=function(o){if(c){c=!1,setTimeout(function(){c=!0},u.delayaftershow),clearTimeout(t),"function"==typeof u.beforeshow&&u.beforeshow();var i=0;if(0<a){if("number"==typeof o?h=o:o=++h,1==u.loop){for(;h<0;)h+=a;for(;a<=h;)h-=a;for(;o<0;)o+=a;for(;a<=o;)o-=a}else h<0&&(h=0),a<=h&&(h=a-1),o<0&&(o=0),a<=o&&(o=a-1);v(l).children(".nav_indicators").find("ul").find("li").removeClass("active"),v(l).find(".nav_indicators ul li:nth-child("+(o+1)+")").addClass("active"),i=0,v(d).each(function(){for(var t="",e=0,e=i-o;e<0;)e+=a;for(;a<e;)e-=a;if(0==e?(t="active",v(l).find("."+t+":not(.nav_indicators ul li)").removeClass(t),v(this).removeClass("hidden"),v(this).addClass(t)):e<u.show/2?(t="next"+e,v(l).find("."+t).removeClass(t),v(this).removeClass("hidden"),v(this).addClass(t)):e>a-u.show/2?(t="prev"+(a-e),v(l).find("."+t).removeClass(t),v(this).removeClass("hidden"),v(this).addClass(t)):v(this).addClass("hidden"),Math.abs(i-o)>u.show/2&&0==u.loop){for(var n=1;n<u.show/2;)t="next"+n,v(this).hasClass(t)&&v(this).removeClass(t),t="prev"+n,v(this).hasClass(t)&&v(this).removeClass(t),n++;v(this).addClass("hidden")}i++}),u.autoplay&&(clearTimeout(t),t=setTimeout(function(){f()},u.timeout))}"function"==typeof u.aftershow&&u.aftershow()}};f(u.startslide),v(d).click(function(){o=v(l).children().index(this),u.stepbystep?r():f(o)}),v(l).children(".nav_indicators").find("ul").find("li").click(function(){o=v(l).find(".nav_indicators ul li").index(this),u.stepbystep?r():f(o)}),v(l).find(".next_button").click(function(){c=!0,f()}),v(l).find(".prev_button").click(function(){c=!0,f(--h)}),u.touchevents&&(s=function(t,e){var n=v(d).find(".active").offset(),o=0,i=0;void 0!==n&&(o=n.left,i=n.top);var a=v(l).data("posstart"),s={x:t,y:e,l:o,t:i},r=0;void 0===a&&(a=s,v(l).data("posstart",s)),u.vertical?(r=s.y-a.y,i=a.t+r):(r=s.x-a.x,o=a.l+r),u.reverse&&(r=-r),Math.abs(r)>u.distancetochange&&c&&(v(l).data("posstart",s),0<r?h--:h++,f(h))},v(l).bind("mousemove",function(t){t.preventDefault(),0<t.buttons?(s(t.pageX,t.pageY),e=!0):e&&(s(t.pageX,t.pageY),v(l).removeData("posstart"),e=!1)}),v(l).bind("mouseup",function(t){t.preventDefault(),e&&(s(t.pageX,t.pageY),v(l).removeData("posstart"),e=!1)}),v(l).bind("touchmove",function(t){var e=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];s(e.pageX,e.pageY)}),v(l).bind("touchend",function(t){v(l).removeData("posstart")}))}})}}(jQuery);
  