!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,slideZIndex:50,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(){},onSliderResize: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.length1||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><\/div>');f.viewport=e.parent();f.loader=n('
');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:f.settings.slideZIndex,display:"block"}));f.controls.el=n('
');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&<(),(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).trigger("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&>()},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||n0?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;t0&&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+='
'+i+"<\/a><\/div>";f.pagerEl.html(r)},ht=function(){f.settings.pagerCustom?f.pagerEl=n(f.settings.pagerCustom):(f.pagerEl=n('
'),f.settings.pagerSelector?n(f.settings.pagerSelector).html(f.pagerEl):f.controls.el.addClass("bx-has-pager").append(f.pagerEl),nt());f.pagerEl.on("click","a",bt)},ct=function(){f.controls.next=n(''+f.settings.nextText+"<\/a>");f.controls.prev=n(''+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('
'),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('
'+f.settings.startText+"<\/a><\/div>");f.controls.stop=n('
'+f.settings.stopText+"<\/a><\/div>");f.controls.autoEl=n('
');f.controls.autoEl.on("click",".bx-start",pt);f.controls.autoEl.on("click",".bx-stop",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('
'+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());n&&("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(),f.settings.onSliderResize.call(e,f.active.index))};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",f.settings.slideZIndex+1).fadeIn(f.settings.speed,function(){n(this).css("zIndex",f.settings.slideZIndex);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.getCurrentSlideElement=function(){return f.children.eq(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.settings.controls&&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)