$(document).ready(function(){$(".slide-presentation").slider({activeClass:"slide-presentation__controls__active"});$(".partners__viewport").jCarouselLite({btnNext:".btnNext",btnPrev:".btnPrev",speed:400,scroll:3});$("form.search-form").each(function(){exampleSearch(this)});$(".js-opinions").opinions({classItemTabActive:"opinions__reviewers__item_active"});$(".js-highlight-foto").each(function(b,a){$(a).highlightFoto({})});$(".opinions__reviewers__item:first").mouseover();$(".side-menu").each(function(){sideMenu(this)});var b=1e4,a=window.setInterval("showNext()",b),c=false;$(".slide-presentation").mouseover(function(){window.clearInterval(a)}).mouseout(function(){if(!c)a=window.setInterval("showNext()",b)});$(".slide-presentation__direct-wrap").click(function(){c=true})});function exampleSearch(b){var a=$(b).find(".search-form__input");$(".search-form__example__value").click(function(){a.val($(this).html());return false})}function showNext(){var a=$(".slide-presentation__controls__active").next(".js-slider-direct");if(a.length==0)$(".js-slider-direct").first().click();else $(a).click()}(function(a){a.fn.jCarouselLite=function(b){b=a.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},b||{});return this.each(function(){var n=false,m=b.vertical?"top":"left",p=b.vertical?"height":"width",k=a(this),h=a("ul",k),o=a("li",h),t=o.size(),f=b.visible;if(b.circular){h.prepend(o.slice(t-f-0).clone()).append(o.slice(0,f).clone());b.start+=f}var g=a("li",h),j=g.size(),e=b.start;k.css("visibility","visible");g.css({overflow:"hidden","float":b.vertical?"none":"left"});h.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});k.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var i=b.vertical?c(g):d(g),s=i*j,r=i*f;g.css({width:g.width(),height:g.height()});h.css(p,s+"px").css(m,-(e*i));k.css(p,r+"px");b.btnPrev&&a(b.btnPrev).click(function(){return l(e-b.scroll)});b.btnNext&&a(b.btnNext).click(function(){return l(e+b.scroll)});b.btnGo&&a.each(b.btnGo,function(c,d){a(d).click(function(){return l(b.circular?b.visible+c:c)})});b.mouseWheel&&k.mousewheel&&k.mousewheel(function(c,a){return a>0?l(e-b.scroll):l(e+b.scroll)});b.auto&&setInterval(function(){l(e+b.scroll)},b.auto+b.speed);function q(){return g.slice(e).slice(0,f)}function l(c){if(!n){b.beforeStart&&b.beforeStart.call(this,q());if(b.circular)if(c<=b.start-f-1){var d=j-f*2+(f+c);h.css(m,-(d*i)+"px");e=d-b.scroll}else if(c>=j-f+1){d=f-j+c;h.css(m,-(d*i)+"px");e=d+b.scroll}else e=c;else if(c<0||c>j-f)return;else e=c;n=true;h.animate(m=="left"?{left:-(e*i)}:{top:-(e*i)},b.speed,b.easing,function(){b.afterEnd&&b.afterEnd.call(this,q());n=false});if(!b.circular){a(b.btnPrev+","+b.btnNext).removeClass("disabled");a(e-b.scroll<0&&b.btnPrev||e+b.scroll>j-f&&b.btnNext||[]).addClass("disabled")}}return false}})};function b(c,b){return parseInt(a.css(c[0],b))||0}function d(a){return a[0].offsetWidth+b(a,"marginLeft")+b(a,"marginRight")}function c(a){return a[0].offsetHeight+b(a,"marginTop")+b(a,"marginBottom")}})(jQuery)
