function BxSliderHelper(n){this.sliderElementId=n||"";this.SliderSettingsRemote={};this.SliderSettings={};this.SliderItemSettings={};this.SliderItemVideos={};this.SliderVideo=undefined;this.pauseSlide=!1;this.lockPause=!1;this.setSliderSettingsRemote=function(n){this.SliderSettingsRemote=n;this.setSliderSettings();this.setSliderItemsSettings()};this.setSliderSettings=function(){var t={},i,n;if(t.BackgroundColor=this.SliderSettingsRemote.BackgroundColor,this.SliderSettingsRemote.SliderSettings)for(n=0;n<this.SliderSettingsRemote.SliderSettings.length;n++)i=this.SliderSettingsRemote.SliderSettings[n],t[i.SettingKey]=i.SettingValue;this.SliderSettings=t};this.setSliderItemsSettings=function(){var n,t;if(sliderItemsSettings={},this.SliderSettingsRemote.SliderItemsSettings)for(n=0;n<this.SliderSettingsRemote.SliderItemsSettings.length;n++){for(sliderItemsSettingRemote=this.SliderSettingsRemote.SliderItemsSettings[n],sliderItemSetting=[],t=0;t<sliderItemsSettingRemote.length;t++)setting=sliderItemsSettingRemote[t],sliderItemSetting[setting.SettingKey]=setting.SettingValue;sliderItemsSettings[setting.SliderItemId]={sliderItemId:setting.SliderItemId,settings:sliderItemSetting}}this.SliderItemsSettings=sliderItemsSettings};this.getSliderItemIdFromHiddenField=function(n){var i=n+2,r,t;return $("#"+this.sliderElementId+" li.bx-clone").length==0&&(i=n+1),r="#"+this.sliderElementId+" li:nth-of-type("+i+") input[id$='SliderItemIdHiddenField']",t=$(r).val(),t!=undefined&&t.indexOf(",")>0&&(t=t.split(",")[0]),t};this.handleCurrentSliderItem=function(n,t,i){i=i==undefined?0:i;this.handleVideoSliderItem(n,t,i);this.changePause(n,t,i)};this.handleVideoSliderItem=function(n,t,i){var u=this,e,f,o,h,r,s;try{VideoYoutube.pauseCurrentPlayer();VideoVimeo.pauseCurrentPlayer()}catch(c){}if((e=i+2,$("#"+this.sliderElementId+" li.bx-clone").length==0&&(e=i+1),f=this.getSliderItemSetting(i,"VideoId"),f!=undefined)&&(o=this.getSliderItemSetting(i,"VideoProvider"),$("#"+this.sliderElementId+" li:nth-child("+e+")").addClass("video-slider-item").addClass("video-slider-item-"+i+1).find(".btn-prim").css("display","none"),(t==0||i==n.getSlideCount()-1)&&(h=t==0?1:n.getSlideCount()+2,$("#"+this.sliderElementId+" li.bx-clone:nth-child("+h+")").addClass("video-slider-item").find(".btn-prim").css("display","none")),r=$("#"+this.sliderElementId+" li:nth-child("+e+") .sld-video"),!r.hasClass("preview-image-set"))){s=document.createElement("IMG");s.src="//img.youtube.com/vi/"+f+"/0.jpg";r.addClass("preview-image-set");r.html(s);r.show();r.on("click",function(){var s=e-2,t,i;if(o!=undefined&&f!=undefined){if(t=r.width(),i=r.height(),r.css("display","block"),r.attr("id","video-player-"+s),o=="YouTube"){$(document).on("onYouTubeIframeAPIReady",function(){VideoYoutube.initPlayer(r.attr("id"),f,t,i);$(document).off("onYouTubeIframeAPIReady")});VideoYoutube.init()}else if(o="Vimeo"){$(document).on("onVimeoAPIReady",function(){VideoVimeo.initPlayer(r.attr("id"),f,t,i);$(document).off("onVimeoAPIReady")});VideoVimeo.init()}$(document).on("onPlayerStateChange",function(t,i){var r=undefined;u.lockPause=!0;switch(i.code){case 1:r="playing";u.lockPause=!0;n.stopAuto();break;case 2:r="paused";u.lockPause=!1;n.stopAuto();break;case YT.PlayerState.BUFFERING:r="buffering";break;case YT.PlayerState.ENDED:r="ended";u.lockPause=!1;n.startAuto();break;case 6:r="seeking";u.lockPause=!0;n.stopAuto()}})}else r.css("display","none"),u.lockPause=!1})}};this.changePause=function(n,t,i){var u=this,r;i=i==undefined?0:i;r=this.getSliderItemSetting(i,"GeneralPause");r!=undefined?setTimeout(function(){u.changePauseNextSlide(n)},r):n.startAuto()};this.changePauseNextSlide=function(n){this.pauseSlide||(n.stopAuto(),n.goToNextSlide(),n.startAuto())};this.getSliderItemSetting=function(n,t){var i=this.getSliderItemIdFromHiddenField(n),r=undefined;return i!=undefined&&this.SliderItemsSettings[i]&&this.SliderItemsSettings[i].settings[t]&&(r=this.SliderItemsSettings[i].settings[t]),i==undefined&&this.getSliderItemSettingRemote!=undefined&&(r=this.getSliderItemSettingRemote(n,t)),r};this.getSliderItemSettingRemote=function(n,t){sliderItemsSettingRemote=this.SliderSettingsRemote.SliderItemsSettings[n];sliderItemSetting=[];for(var i=0;i<sliderItemsSettingRemote.length;i++)if(setting=sliderItemsSettingRemote[i],setting.SettingKey==t)return setting.SettingValue;return undefined};this.getSliderSetting=function(n,t){var i=undefined;return this.SliderSettings[n]&&(this.SliderSettings[n]!=""||t===!0)&&(i=this.SliderSettings[n],i=="true"?i=!0:i=="false"&&(i=!1)),i}}function colorChange(n){var t=document.getElementById(n.get_id().replace("RadColorPicker","TextBox"));t!=null&&(t.value=n.get_selectedColor())}function colorChangeFromTextBox(n){var t=document.getElementById(n),i=$find(n.replace("TextBox","RadColorPicker"));t!=null&&i!=null&&(isValidColor(t.value)?t.value!=""?i.set_selectedColor(t.value):i.set_selectedColor(null):t.value=i.get_selectedColor())}function isValidColor(n){return/^$|^#([0-9a-f]{1,2}){3}$/i.test(n)}!function(n){var t={},r={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};n.fn.bxSlider=function(u){var f,e;if(0==this.length)return this;if(this.length>1)return this.each(function(){n(this).bxSlider(u)}),this;f={};e=this;t.el=this;var w=n(window).width(),b=n(window).height(),k=function(){f.settings=n.extend({},r,u);f.settings.slideWidth=parseInt(f.settings.slideWidth);f.children=e.children(f.settings.slideSelector);f.children.length<f.settings.minSlides&&(f.settings.minSlides=f.children.length);f.children.length<f.settings.maxSlides&&(f.settings.maxSlides=f.children.length);f.settings.randomStart&&(f.settings.startSlide=Math.floor(Math.random()*f.children.length));f.active={index:f.settings.startSlide};f.carousel=f.settings.minSlides>1||f.settings.maxSlides>1;f.carousel&&(f.settings.preloadImages="all");f.minThreshold=f.settings.minSlides*f.settings.slideWidth+(f.settings.minSlides-1)*f.settings.slideMargin;f.maxThreshold=f.settings.maxSlides*f.settings.slideWidth+(f.settings.maxSlides-1)*f.settings.slideMargin;f.working=!1;f.controls={};f.interval=null;f.animProp="vertical"==f.settings.mode?"top":"left";f.usingCSS=f.settings.useCSS&&"fade"!=f.settings.mode&&function(){var i=document.createElement("div"),n=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var t in n)if(void 0!==i.style[n[t]])return f.cssPrefix=n[t].replace("Perspective","").toLowerCase(),f.animProp="-"+f.cssPrefix+"-transform",!0;return!1}();"vertical"==f.settings.mode&&(f.settings.maxSlides=f.settings.minSlides);e.data("origStyle",e.attr("style"));e.children(f.settings.slideSelector).each(function(){n(this).data("origStyle",n(this).attr("style"))});ft()},ft=function(){e.wrap('<div class="bx-wrapper"><div class="bx-viewport"><\/div><\/div>');f.viewport=e.parent();f.loader=n('<div class="bx-loading" />');f.viewport.prepend(f.loader);e.css({width:"horizontal"==f.settings.mode?100*f.children.length+215+"%":"auto",position:"relative"});f.usingCSS&&f.settings.easing?e.css("-"+f.cssPrefix+"-transition-timing-function",f.settings.easing):f.settings.easing||(f.settings.easing="swing");h();f.viewport.css({width:"100%",overflow:"hidden",position:"relative"});f.viewport.parent().css({maxWidth:st()});f.settings.pager||f.viewport.parent().css({margin:"0 auto 0px"});f.children.css({float:"horizontal"==f.settings.mode?"left":"none",listStyle:"none",position:"relative"});f.children.css("width",d());"horizontal"==f.settings.mode&&f.settings.slideMargin>0&&f.children.css("marginRight",f.settings.slideMargin);"vertical"==f.settings.mode&&f.settings.slideMargin>0&&f.children.css("marginBottom",f.settings.slideMargin);"fade"==f.settings.mode&&(f.children.css({position:"absolute",zIndex:0,display:"none"}),f.children.eq(f.settings.startSlide).css({zIndex:50,display:"block"}));f.controls.el=n('<div class="bx-controls" />');f.settings.captions&&at();f.active.last=f.settings.startSlide==s()-1;f.settings.video&&e.fitVids();var t=f.children.eq(f.settings.startSlide);"all"==f.settings.preloadImages&&(t=f.children);f.settings.ticker?f.settings.pager=!1:(f.settings.pager&&ht(),f.settings.controls&&ct(),f.settings.auto&&f.settings.autoControls&&lt(),(f.settings.controls||f.settings.autoControls||f.settings.pager)&&f.viewport.after(f.controls.el));et(t,ot)},et=function(t,i){var r=t.find("img, iframe").length,u;if(0==r)return i(),void 0;u=0;t.find("img, iframe").each(function(){n(this).one("load",function(){++u==r&&i()}).each(function(){this.complete&&n(this).load()})})},ot=function(){if(f.settings.infiniteLoop&&"fade"!=f.settings.mode&&!f.settings.ticker){var t="vertical"==f.settings.mode?f.settings.minSlides:f.settings.maxSlides,i=f.children.slice(0,t).clone().addClass("bx-clone"),r=f.children.slice(-t).clone().addClass("bx-clone");e.append(i).prepend(r)}f.loader.remove();g();"vertical"==f.settings.mode&&(f.settings.adaptiveHeight=!0);f.viewport.height(l());e.redrawSlider();f.settings.onSliderLoad(f.active.index);f.initialized=!0;f.settings.responsive&&n(window).bind("resize",ut);f.settings.auto&&f.settings.autoStart&&kt();f.settings.ticker&&dt();f.settings.pager&&v(f.settings.startSlide);f.settings.controls&&tt();f.settings.touchEnabled&&!f.settings.ticker&&gt()},l=function(){var r=0,t=n(),u;if("vertical"==f.settings.mode||f.settings.adaptiveHeight)if(f.carousel)for(u=1==f.settings.moveSlides?f.active.index:f.active.index*c(),t=f.children.eq(u),i=1;i<=f.settings.maxSlides-1;i++)t=u+i>=f.children.length?t.add(f.children.eq(i-1)):t.add(f.children.eq(u+i));else t=f.children.eq(f.active.index);else t=f.children;return"vertical"==f.settings.mode?(t.each(function(){r+=n(this).outerHeight()}),f.settings.slideMargin>0&&(r+=f.settings.slideMargin*(f.settings.minSlides-1))):r=Math.max.apply(Math,t.map(function(){return n(this).outerHeight(!1)}).get()),r},st=function(){var n="100%";return f.settings.slideWidth>0&&(n="horizontal"==f.settings.mode?f.settings.maxSlides*f.settings.slideWidth+(f.settings.maxSlides-1)*f.settings.slideMargin:f.settings.slideWidth),n},d=function(){var t=f.settings.slideWidth,n=f.viewport.width();return 0==f.settings.slideWidth||f.settings.slideWidth>n&&!f.carousel||"vertical"==f.settings.mode?t=n:f.settings.maxSlides>1&&"horizontal"==f.settings.mode&&(n>f.maxThreshold||n<f.minThreshold&&(t=(n-f.settings.slideMargin*(f.settings.minSlides-1))/f.settings.minSlides)),t},h=function(){var n=1,t;return"horizontal"==f.settings.mode&&f.settings.slideWidth>0?f.viewport.width()<f.minThreshold?n=f.settings.minSlides:f.viewport.width()>f.maxThreshold?n=f.settings.maxSlides:(t=f.children.first().width(),n=Math.floor(f.viewport.width()/t)):"vertical"==f.settings.mode&&(n=f.settings.minSlides),n},s=function(){var n=0,t,i;if(f.settings.moveSlides>0)if(f.settings.infiniteLoop)n=f.children.length/c();else for(t=0,i=0;t<f.children.length;)++n,t=i+h(),i+=f.settings.moveSlides<=h()?f.settings.moveSlides:h();else n=Math.ceil(f.children.length/h());return n},c=function(){return f.settings.moveSlides>0&&f.settings.moveSlides<=h()?f.settings.moveSlides:h()},g=function(){var t,i,n;f.children.length>f.settings.maxSlides&&f.active.last&&!f.settings.infiniteLoop?"horizontal"==f.settings.mode?(t=f.children.last(),n=t.position(),o(-(n.left-(f.viewport.width()-t.width())),"reset",0)):"vertical"==f.settings.mode&&(i=f.children.length-f.settings.minSlides,n=f.children.eq(i).position(),o(-n.top,"reset",0)):(n=f.children.eq(f.active.index*c()).position(),f.active.index==s()-1&&(f.active.last=!0),void 0!=n&&("horizontal"==f.settings.mode?o(-n.left,"reset",0):"vertical"==f.settings.mode&&o(-n.top,"reset",0)))},o=function(n,t,i,r){var u,s;f.usingCSS?(u="vertical"==f.settings.mode?"translate3d(0, "+n+"px, 0)":"translate3d("+n+"px, 0, 0)",e.css("-"+f.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==t?(e.css(f.animProp,u),e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");y()})):"reset"==t?e.css(f.animProp,u):"ticker"==t&&(e.css("-"+f.cssPrefix+"-transition-timing-function","linear"),e.css(f.animProp,u),e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");o(r.resetValue,"reset",0);a()}))):(s={},s[f.animProp]=n,"slide"==t?e.animate(s,i,f.settings.easing,function(){y()}):"reset"==t?e.css(f.animProp,n):"ticker"==t&&e.animate(s,speed,"linear",function(){o(r.resetValue,"reset",0);a()}))},nt=function(){for(var i,r="",u=s(),t=0;u>t;t++)i="",f.settings.buildPager&&n.isFunction(f.settings.buildPager)?(i=f.settings.buildPager(t),f.pagerEl.addClass("bx-custom-pager")):(i=t+1,f.pagerEl.addClass("bx-default-pager")),r+='<div class="bx-pager-item"><a href="" data-slide-index="'+t+'" class="bx-pager-link">'+i+"<\/a><\/div>";f.pagerEl.html(r)},ht=function(){f.settings.pagerCustom?f.pagerEl=n(f.settings.pagerCustom):(f.pagerEl=n('<div class="bx-pager" />'),f.settings.pagerSelector?n(f.settings.pagerSelector).html(f.pagerEl):f.controls.el.addClass("bx-has-pager").append(f.pagerEl),nt());f.pagerEl.delegate("a","click",bt)},ct=function(){f.controls.next=n('<a class="bx-next" href="">'+f.settings.nextText+"<\/a>");f.controls.prev=n('<a class="bx-prev" href="">'+f.settings.prevText+"<\/a>");f.controls.next.bind("click",vt);f.controls.prev.bind("click",yt);f.settings.nextSelector&&n(f.settings.nextSelector).append(f.controls.next);f.settings.prevSelector&&n(f.settings.prevSelector).append(f.controls.prev);f.settings.nextSelector||f.settings.prevSelector||(f.controls.directionEl=n('<div class="bx-controls-direction" />'),f.controls.directionEl.append(f.controls.prev).append(f.controls.next),f.controls.el.addClass("bx-has-controls-direction").append(f.controls.directionEl))},lt=function(){f.controls.start=n('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+f.settings.startText+"<\/a><\/div>");f.controls.stop=n('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+f.settings.stopText+"<\/a><\/div>");f.controls.autoEl=n('<div class="bx-controls-auto" />');f.controls.autoEl.delegate(".bx-start","click",pt);f.controls.autoEl.delegate(".bx-stop","click",wt);f.settings.autoControlsCombine?f.controls.autoEl.append(f.controls.start):f.controls.autoEl.append(f.controls.start).append(f.controls.stop);f.settings.autoControlsSelector?n(f.settings.autoControlsSelector).html(f.controls.autoEl):f.controls.el.addClass("bx-has-controls-auto").append(f.controls.autoEl);p(f.settings.autoStart?"stop":"start")},at=function(){f.children.each(function(){var t=n(this).find("img:first").attr("title");void 0!=t&&(""+t).length&&n(this).append('<div class="bx-caption"><span>'+t+"<\/span><\/div>")})},vt=function(n){f.settings.auto&&e.stopAuto();e.goToNextSlide();n.preventDefault()},yt=function(n){f.settings.auto&&e.stopAuto();e.goToPrevSlide();n.preventDefault()},pt=function(n){e.startAuto();n.preventDefault()},wt=function(n){e.stopAuto();n.preventDefault()},bt=function(t){f.settings.auto&&e.stopAuto();var r=n(t.currentTarget),i=parseInt(r.attr("data-slide-index"));i!=f.active.index&&e.goToSlide(i);t.preventDefault()},v=function(t){var i=f.children.length;return"short"==f.settings.pagerType?(f.settings.maxSlides>1&&(i=Math.ceil(f.children.length/f.settings.maxSlides)),f.pagerEl.html(t+1+f.settings.pagerShortSeparator+i),void 0):(f.pagerEl.find("a").removeClass("active"),f.pagerEl.each(function(i,r){n(r).find("a").eq(t).addClass("active")}),void 0)},y=function(){if(f.settings.infiniteLoop){var n="";0==f.active.index?n=f.children.eq(0).position():f.active.index==s()-1&&f.carousel?n=f.children.eq((s()-1)*c()).position():f.active.index==f.children.length-1&&(n=f.children.eq(f.children.length-1).position());"horizontal"==f.settings.mode?o(-n.left,"reset",0):"vertical"==f.settings.mode&&o(-n.top,"reset",0)}f.working=!1;f.settings.onSlideAfter(f.children.eq(f.active.index),f.oldIndex,f.active.index)},p=function(n){f.settings.autoControlsCombine?f.controls.autoEl.html(f.controls[n]):(f.controls.autoEl.find("a").removeClass("active"),f.controls.autoEl.find("a:not(.bx-"+n+")").addClass("active"))},tt=function(){1==s()?(f.controls.prev.addClass("disabled"),f.controls.next.addClass("disabled")):!f.settings.infiniteLoop&&f.settings.hideControlOnEnd&&(0==f.active.index?(f.controls.prev.addClass("disabled"),f.controls.next.removeClass("disabled")):f.active.index==s()-1?(f.controls.next.addClass("disabled"),f.controls.prev.removeClass("disabled")):(f.controls.prev.removeClass("disabled"),f.controls.next.removeClass("disabled")))},kt=function(){f.settings.autoDelay>0?setTimeout(e.startAuto,f.settings.autoDelay):e.startAuto();f.settings.autoHover&&e.hover(function(){f.interval&&(e.stopAuto(!0),f.autoPaused=!0)},function(){f.autoPaused&&(e.startAuto(!0),f.autoPaused=null)})},dt=function(){var i=0,t;"next"==f.settings.autoDirection?e.append(f.children.clone().addClass("bx-clone")):(e.prepend(f.children.clone().addClass("bx-clone")),t=f.children.first().position(),i="horizontal"==f.settings.mode?-t.left:-t.top);o(i,"reset",0);f.settings.pager=!1;f.settings.controls=!1;f.settings.autoControls=!1;f.settings.tickerHover&&!f.usingCSS&&f.viewport.hover(function(){e.stop()},function(){var t=0;f.children.each(function(){t+="horizontal"==f.settings.mode?n(this).outerWidth(!0):n(this).outerHeight(!0)});var i=f.settings.speed/t,r="horizontal"==f.settings.mode?"left":"top",u=i*(t-Math.abs(parseInt(e.css(r))));a(u)});a()},a=function(n){var t,i;speed=n?n:f.settings.speed;t={left:0,top:0};i={left:0,top:0};"next"==f.settings.autoDirection?t=e.find(".bx-clone").first().position():i=f.children.first().position();var r="horizontal"==f.settings.mode?-t.left:-t.top,u="horizontal"==f.settings.mode?-i.left:-i.top,s={resetValue:u};o(r,"ticker",speed,s)},gt=function(){f.touch={start:{x:0,y:0},end:{x:0,y:0}};f.viewport.bind("touchstart",ni)},ni=function(n){if(f.working)n.preventDefault();else{f.touch.originalPos=e.position();var t=n.originalEvent;f.touch.start.x=t.changedTouches[0].pageX;f.touch.start.y=t.changedTouches[0].pageY;f.viewport.bind("touchmove",it);f.viewport.bind("touchend",rt)}},it=function(n){var t=n.originalEvent,u=Math.abs(t.changedTouches[0].pageX-f.touch.start.x),e=Math.abs(t.changedTouches[0].pageY-f.touch.start.y),i,r;(3*u>e&&f.settings.preventDefaultSwipeX?n.preventDefault():3*e>u&&f.settings.preventDefaultSwipeY&&n.preventDefault(),"fade"!=f.settings.mode&&f.settings.oneToOneTouch)&&(i=0,"horizontal"==f.settings.mode?(r=t.changedTouches[0].pageX-f.touch.start.x,i=f.touch.originalPos.left+r):(r=t.changedTouches[0].pageY-f.touch.start.y,i=f.touch.originalPos.top+r),o(i,"reset",0))},rt=function(n){var r,i,t;f.viewport.unbind("touchmove",it);r=n.originalEvent;i=0;(f.touch.end.x=r.changedTouches[0].pageX,f.touch.end.y=r.changedTouches[0].pageY,"fade"==f.settings.mode)?(t=Math.abs(f.touch.start.x-f.touch.end.x),t>=f.settings.swipeThreshold&&(f.touch.start.x>f.touch.end.x?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto())):(t=0,"horizontal"==f.settings.mode?(t=f.touch.end.x-f.touch.start.x,i=f.touch.originalPos.left):(t=f.touch.end.y-f.touch.start.y,i=f.touch.originalPos.top),!f.settings.infiniteLoop&&(0==f.active.index&&t>0||f.active.last&&0>t)?o(i,"reset",200):Math.abs(t)>=f.settings.swipeThreshold?(0>t?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto()):o(i,"reset",200));f.viewport.unbind("touchend",rt)},ut=function(){var t=n(window).width(),i=n(window).height();(w!=t||b!=i)&&(w=t,b=i,e.redrawSlider())};return e.goToSlide=function(t,i){var h,r,a,p,u,w,b;f.working||f.active.index==t||((f.working=!0,f.oldIndex=f.active.index,f.active.index=0>t?s()-1:t>=s()?0:t,f.settings.onSlideBefore(f.children.eq(f.active.index),f.oldIndex,f.active.index),"next"==i?f.settings.onSlideNext(f.children.eq(f.active.index),f.oldIndex,f.active.index):"prev"==i&&f.settings.onSlidePrev(f.children.eq(f.active.index),f.oldIndex,f.active.index),f.active.last=f.active.index>=s()-1,f.settings.pager&&v(f.active.index),f.settings.controls&&tt(),"fade"==f.settings.mode)?(f.settings.adaptiveHeight&&f.viewport.height()!=l()&&f.viewport.animate({height:l()},f.settings.adaptiveHeightSpeed),f.children.filter(":visible").fadeOut(f.settings.speed).css({zIndex:0}),f.children.eq(f.active.index).css("zIndex",51).fadeIn(f.settings.speed,function(){n(this).css("zIndex",50);y()})):(f.settings.adaptiveHeight&&f.viewport.height()!=l()&&f.viewport.animate({height:l()},f.settings.adaptiveHeightSpeed),h=0,r={left:0,top:0},!f.settings.infiniteLoop&&f.carousel&&f.active.last?"horizontal"==f.settings.mode?(u=f.children.eq(f.children.length-1),r=u.position(),h=f.viewport.width()-u.outerWidth()):(a=f.children.length-f.settings.minSlides,r=f.children.eq(a).position()):f.carousel&&f.active.last&&"prev"==i?(p=1==f.settings.moveSlides?f.settings.maxSlides-c():(s()-1)*c()-(f.children.length-f.settings.maxSlides),u=e.children(".bx-clone").eq(p),r=u.position()):"next"==i&&0==f.active.index?(r=e.find("> .bx-clone").eq(f.settings.maxSlides).position(),f.active.last=!1):t>=0&&(w=t*c(),r=f.children.eq(w).position()),"undefined"!=typeof r&&(b="horizontal"==f.settings.mode?-(r.left-h):-r.top,o(b,"slide",f.settings.speed))))},e.goToNextSlide=function(){if(f.settings.infiniteLoop||!f.active.last){var n=parseInt(f.active.index)+1;e.goToSlide(n,"next")}},e.goToPrevSlide=function(){if(f.settings.infiniteLoop||0!=f.active.index){var n=parseInt(f.active.index)-1;e.goToSlide(n,"prev")}},e.startAuto=function(n){f.interval||(f.interval=setInterval(function(){"next"==f.settings.autoDirection?e.goToNextSlide():e.goToPrevSlide()},f.settings.pause),f.settings.autoControls&&1!=n&&p("stop"))},e.stopAuto=function(n){f.interval&&(clearInterval(f.interval),f.interval=null,f.settings.autoControls&&1!=n&&p("start"))},e.getCurrentSlide=function(){return f.active.index},e.getSlideCount=function(){return f.children.length},e.redrawSlider=function(){f.children.add(e.find(".bx-clone")).outerWidth(d());f.viewport.css("height",l());f.settings.ticker||g();f.active.last&&(f.active.index=s()-1);f.active.index>=s()&&(f.active.last=!0);f.settings.pager&&!f.settings.pagerCustom&&(nt(),v(f.active.index))},e.destroySlider=function(){f.initialized&&(f.initialized=!1,n(".bx-clone",this).remove(),f.children.each(function(){void 0!=n(this).data("origStyle")?n(this).attr("style",n(this).data("origStyle")):n(this).removeAttr("style")}),void 0!=n(this).data("origStyle")?this.attr("style",n(this).data("origStyle")):n(this).removeAttr("style"),n(this).unwrap().unwrap(),f.controls.el&&f.controls.el.remove(),f.controls.next&&f.controls.next.remove(),f.controls.prev&&f.controls.prev.remove(),f.pagerEl&&f.pagerEl.remove(),n(".bx-caption",this).remove(),f.controls.autoEl&&f.controls.autoEl.remove(),clearInterval(f.interval),f.settings.responsive&&n(window).unbind("resize",ut))},e.reloadSlider=function(n){void 0!=n&&(u=n);e.destroySlider();k()},k(),this}}(jQuery);$.extend({slider:undefined,BxSliderCustom:function(n,t){function l(n){var r=4,u=0,o=n.find("li:visible").not(".bx-clone").length,t=$(n).parent().parent().find(".bx-custom-pager"),h=t.find(".bx-pager-item:hidden").length,s=t.find(".bx-pager-item:visible").length,i;o=n.find("li:visible").not(".bx-clone").length;i=!1;o<r&&e!=null&&($(n).append(e),e=null,i=!0);$.each(t.children(".bx-pager-item"),function(t,u){$(u).is(":visible")||(e=$(n.find("li")[t+1]).detach(),t==r-1&&f.buildPager(r-1),i=!0)});i==!0&&n.reloadSlider();u=$(n).find("li:not(.bx-clone)").find(".sld-media-container").height();$(n).parent().parent().find(".bx-custom-pager, .bx-next, .bx-prev").css({top:u-1});s=t.find(".bx-pager-item:visible").length;$(n).parent().parent().find(".bx-custom-pager").removeClass().addClass("bx-pager bx-custom-pager bx-custom-pager-"+s);c=!0}var e=null,c=!1,u=new BxSliderHelper(n),f,r,h;u.setSliderSettingsRemote(t);var s=[],a=u.getSliderSetting("GeneralRandomStart")||!1,o=parseInt(u.getSliderSetting("GeneralPause"))||5e3;o=o>5e3?o:5e3;var v=u.getSliderSetting("BackgroundColor")||!1;$("#"+n+".bxslider li:first a.sld-img-link img").one("load",function(){$(".bxslider li:first").css("background-url",this.src);var t=$("#"+n+".bxslider li:first a.sld-img-link img").first(),r=$(t).parentsUntil("li").height(),i=$(t).height();r<i&&(currentLi=$(t).parentsUntil("li"),$(currentLi).height(i),$(currentLi).hasClass("bx-clone")&&$(currentLi).next("li").height(i))}).each(function(){this.complete&&$(this).load()});$("#"+n+".bxslider li").show();f={mode:"horizontal",infiniteLoop:!0,autoControls:!1,auto:!0,pager:!0,startSlide:0,autoHover:!0,responsive:!0,speed:600,video:!1,useCSS:!1,controls:!0,pause:o,randomStart:a,onSlideAfter:function(n,t,i){u.handleCurrentSliderItem(r,t,i);u.lockPause=!1;var f=$(r).parent().parent().find(".bx-custom-pager"),e=f.find(".bx-pager-item:visible").length;$(r).parent().parent().find(".bx-custom-pager").removeClass().addClass("bx-pager bx-custom-pager bx-custom-pager-"+e)},onSliderLoad:function(t){setTimeout(function(){var f,e,o;if(r.stopAuto(!1),r.getSlideCount()>1)for(u.handleCurrentSliderItem(r,t,t),i=1;i<r.getSlideCount();i++)u.handleVideoSliderItem(r,t+i-1,t+i);if($("#"+n).prop("reloadOnResize")!=!0)$(window).on("resize",function(){$("#"+n).prop("reloadOnResize",!0);clearTimeout(f);f=setTimeout(function(){l(r)},300)});c||l(r);e=$(r).parent().parent().find(".bx-custom-pager");o=e.find(".bx-pager-item:visible").length;$(r).parent().parent().find(".bx-custom-pager").removeClass().addClass("bx-pager bx-custom-pager bx-custom-pager-"+o)},0)}};(!0||v&&buildedPager==!1)&&(f.buildPager=function(n){if(s[n])return s[n];var t=u.getSliderItemSetting(n,"title"),i="";return(t==undefined||t=="")&&(t=u.getSliderItemSetting(n,"BlockHeader")),i=i+'<span class="bx-pager-link-label">'+t+"<\/span>",s[n]=i,i});r=$("#"+n).bxSlider(f);h=r.parent().parent().parent();f.autoHover&&(h.hover(function(){r.stopAuto();u.pauseSlide=!0},function(){u.lockPause||(r.startAuto(),u.pauseSlide=!1)}),h.mousemove(function(){r.stopAuto();u.pauseSlide=!0}));$(document).on("onVideoHover",function(){r.stopAuto();u.pauseSlide=!0})}});$.extend({getUrlVars:function(){for(var t=[],n,r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<r.length;i++)n=r[i].split("="),t.push(n[0]),t[n[0]]=n[1];return t},getUrlVar:function(n){return $.getUrlVars()[n]}});var VideoYoutube=function(){function f(t){n=undefined;try{switch(t.data){case YT.PlayerState.PLAYING:n="playing";break;case YT.PlayerState.PAUSED:n="paused ";break;case YT.PlayerState.BUFFERING:n="buffering ";break;case YT.PlayerState.CUED:n="cued ";break;case YT.PlayerState.ENDED:n="ended "}$(document).trigger("onPlayerStateChange",{code:t.data,description:n})}catch(i){}}var t={},r=[],i=null,u=!1,n=undefined;return t.init=function(){var n,i;ApiEventFired=!1;u?t.onYouTubeIframeAPIReady():(n=document.createElement("script"),n.src="//www.youtube.com/iframe_api",i=document.getElementsByTagName("script")[0],i.parentNode.insertBefore(n,i),setTimeout(function(){ApiEventFired==!1&&t.onYouTubeIframeAPIReady()},500))},t.pauseCurrentPlayer=function(){i!=null&&n=="playing"&&i.pauseVideo()},t.initPlayer=function(n,t,u,e){typeof r[n]!="undefined"?i=r[n]:(i=new YT.Player(n,{width:u,height:e,videoId:t,playerVars:{showinfo:0,controls:0,rel:0,autoplay:1,wmode:"opaque"},events:{onStateChange:f}}),r[n]=i,$(function(){$elName="#"+n;$($elName).hover(function(){$(document).trigger("onVideoHover")},function(){$(document).trigger("onVideoHover")})}))},t.onYouTubeIframeAPIReady=function(){u=!0;$(document).trigger("onYouTubeIframeAPIReady")},t}()