!function(e,i){"use strict";var t={item:1,autoWidth:!1,slideMove:1,slideMargin:0,addClass:"",mode:"slide",useCSS:!0,cssEasing:"ease",easing:"linear",speed:1200,auto:!0,pauseOnHover:!0,loop:!1,slideEndAnimation:!0,pause:6e3,keyPress:!1,controls:!0,prevHtml:"",nextHtml:"",rtl:!1,adaptiveHeight:!0,vertical:!1,verticalHeight:500,vThumbWidth:100,thumbItem:10,pager:!0,gallery:!1,galleryMargin:5,thumbMargin:5,currentPagerPosition:"middle",enableTouch:!0,enableDrag:!0,freeMove:!0,swipeThreshold:40,responsive:[],onBeforeStart:function(e){},onSliderLoad:function(e){},onBeforeSlide:function(e,i){},onAfterSlide:function(e,i){},onBeforeNextSlide:function(e,i){},onBeforePrevSlide:function(e,i){}};e.fn.lightSlider=function(i){if(0===this.length)return this;if(this.length>1)return this.each(function(){e(this).lightSlider(i)}),this;var n={},l=e.extend(!0,{},t,i),a={},s=this;n.$el=this,"fade"===l.mode&&(l.vertical=!1);var o=s.children(),r=e(window).width(),d=null,c=null,u=0,f=0,h=!1,g=0,v="",p=0,m=l.vertical===!0?"height":"width",S=l.vertical===!0?"margin-bottom":"margin-right",b=0,C=0,M=0,T=0,x=null,w="ontouchstart"in document.documentElement,P={};return P.chbreakpoint=function(){if(r=e(window).width(),l.responsive.length){var i;if(l.autoWidth===!1&&(i=l.item),rl.responsive[0].breakpoint)for(var s in a)a.hasOwnProperty(s)&&(l[s]=a[s]);l.autoWidth===!1&&b>0&&M>0&&i!==l.item&&(p=Math.round(b/((M+l.slideMargin)*l.slideMove)))}},P.calSW=function(){l.autoWidth===!1&&(M=(g-(l.item*l.slideMargin-l.slideMargin))/l.item)},P.calWidth=function(e){var i=e===!0?v.find(".lslide").length:o.length;if(l.autoWidth===!1)f=i*(M+l.slideMargin);else{f=0;for(var t=0;i>t;t++)f+=parseInt(o.eq(t).width())+l.slideMargin}return f},n={doCss:function(){var e=function(){for(var e=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],i=document.documentElement,t=0;t'+l.prevHtml+''+l.nextHtml+""),l.autoWidth?P.calWidth(!1)
'),v=s.parent(".lSSlideWrapper"),l.rtl===!0&&v.parent().addClass("lSrtl"),l.vertical?(v.parent().addClass("vertical"),g=l.verticalHeight,v.css("height",g+"px")):g=s.outerWidth(),o.addClass("lslide"),l.loop===!0&&"slide"===l.mode&&(P.calSW(),P.clone=function(){if(P.calWidth(!0)>g){for(var i=0,t=0,n=0;n=g+l.slideMargin));n++);var a=l.autoWidth===!0?t:l.item;if(ao.length-1-s.find(".clone.right").length;d--)p--,o.eq(d).remove();for(var c=s.find(".clone.right").length;a>c;c++)s.find(".lslide").eq(c).clone().removeClass("lslide").addClass("clone right").appendTo(s),p++;for(var u=s.find(".lslide").length-s.find(".clone.left").length;u>s.find(".lslide").length-a;u--)s.find(".lslide").eq(u-1).clone().removeClass("lslide").addClass("clone left").prependTo(s);o=s.children()}else o.hasClass("clone")&&(s.find(".clone").remove(),e.move(s,0))},P.clone()),P.sSW=function(){u=o.length,l.rtl===!0&&l.vertical===!1&&(S="margin-left"),l.autoWidth===!1&&o.css(m,M+"px"),o.css(S,l.slideMargin+"px"),f=P.calWidth(!1),s.css(m,f+"px"),l.loop===!0&&"slide"===l.mode&&h===!1&&(p=s.find(".clone.left").length)},P.calL=function(){o=s.children(),u=o.length},this.doCss()&&v.addClass("usingCss"),P.calL(),"slide"===l.mode?(P.calSW(),P.sSW(),l.loop===!0&&(b=e.slideValue(),this.move(s,b)),l.vertical===!1&&this.setHeight(s,!1)):(this.setHeight(s,!0),s.addClass("lSFade"),this.doCss()||(o.fadeOut(0),o.eq(p).fadeIn(0))),l.loop===!0&&"slide"===l.mode?o.eq(p).addClass("active"):o.first().addClass("active")},pager:function(){var e=this;if(P.createPager=function(){T=(g-(l.thumbItem*l.thumbMargin-l.thumbMargin))/l.thumbItem;var i=v.find(".lslide"),t=v.find(".lslide").length,n=0,a="",o=0;for(n=0;t>n;n++){"slide"===l.mode&&(l.autoWidth?o+=(parseInt(i.eq(n).width())+l.slideMargin)*l.slideMove:o=n*((M+l.slideMargin)*l.slideMove));var r=i.eq(n*l.slideMove).attr("data-thumb");if(a+=l.gallery===!0?'
  • ':'
  • '+(n+1)+"
  • ","slide"===l.mode&&o>=f-g-l.slideMargin){n+=1;var d=2;l.autoWidth&&(a+='
  • '+(n+1)+"
  • ",d=1),d>n?(a=null,v.parent().addClass("noPager")):v.parent().removeClass("noPager");break}}var c=v.parent();c.find(".lSPager").html(a),l.gallery===!0&&(l.vertical===!0&&c.find(".lSPager").css("width",l.vThumbWidth+"px"),C=n*(l.thumbMargin+T)+.5,c.find(".lSPager").css({property:C+"px","transition-duration":l.speed+"ms"}),l.vertical===!0&&v.parent().css("padding-right",l.vThumbWidth+l.galleryMargin+"px"),c.find(".lSPager").css(m,C+"px"));var u=c.find(".lSPager").find("li");u.first().addClass("active"),u.on("click",function(){return l.loop===!0&&"slide"===l.mode?p+=u.index(this)-c.find(".lSPager").find("li.active").index():p=u.index(this),s.mode(!1),l.gallery===!0&&e.slideThumb(),!1})},l.pager){var i="lSpg";l.gallery&&(i="lSGallery"),v.after('
      ');var t=l.vertical?"margin-left":"margin-top";v.parent().find(".lSPager").css(t,l.galleryMargin+"px"),P.createPager()}setTimeout(function(){P.init()},0)},setHeight:function(e,i){var t=null,n=this;t=l.loop?e.children(".lslide ").first():e.children().first();var a=function(){var n=t.outerHeight(),l=0,a=n;i&&(n=0,l=100*a/g),e.css({height:n+"px","padding-bottom":l+"%"})};a(),t.find("img").length?t.find("img")[0].complete?(a(),x||n.auto()):t.find("img").load(function(){setTimeout(function(){a(),x||n.auto()},100)}):x||n.auto()},active:function(e,i){this.doCss()&&"fade"===l.mode&&v.addClass("on");var t=0;if(p*l.slideMove=n&&(t=a)),l.loop===!0&&"slide"===l.mode&&(t=i===!0?p-s.find(".clone.left").length:p*l.slideMove,i===!0&&(n=e.length,a=n-1,t+1===n?t=a:t+1>n&&(t=0))),this.doCss()||"fade"!==l.mode||i!==!1||e.eq(t).fadeIn(l.speed),e.eq(t).addClass("active")}else e.removeClass("active"),e.eq(e.length-1).addClass("active"),this.doCss()||"fade"!==l.mode||i!==!1||(e.fadeOut(l.speed),e.eq(t).fadeIn(l.speed))},move:function(e,i){l.rtl===!0&&(i=-i),this.doCss()?l.vertical===!0?e.css({transform:"translate3d(0px, "+-i+"px, 0px)","-webkit-transform":"translate3d(0px, "+-i+"px, 0px)"}):e.css({transform:"translate3d("+-i+"px, 0px, 0px)","-webkit-transform":"translate3d("+-i+"px, 0px, 0px)"}):l.vertical===!0?e.css("position","relative").animate({top:-i+"px"},l.speed,l.easing):e.css("position","relative").animate({left:-i+"px"},l.speed,l.easing);var t=v.parent().find(".lSPager").find("li");this.active(t,!0)},fade:function(){this.active(o,!1);var e=v.parent().find(".lSPager").find("li");this.active(e,!0)},slide:function(){var e=this;P.calSlide=function(){f>g&&(b=e.slideValue(),e.active(o,!1),b>f-g-l.slideMargin?b=f-g-l.slideMargin:0>b&&(b=0),e.move(s,b),l.loop===!0&&"slide"===l.mode&&(p>=u-s.find(".clone.left").length/l.slideMove&&e.resetSlide(s.find(".clone.left").length),0===p&&e.resetSlide(v.find(".lslide").length)))},P.calSlide()},resetSlide:function(e){var i=this;v.find(".lSAction a").addClass("disabled"),setTimeout(function(){p=e,v.css("transition-duration","0ms"),b=i.slideValue(),i.active(o,!1),n.move(s,b),setTimeout(function(){v.css("transition-duration",l.speed+"ms"),v.find(".lSAction a").removeClass("disabled")},50)},l.speed+100)},slideValue:function(){var e=0;if(l.autoWidth===!1)e=p*((M+l.slideMargin)*l.slideMove);else{e=0;for(var i=0;p>i;i++)e+=parseInt(o.eq(i).width())+l.slideMargin}return e},slideThumb:function(){var e;switch(l.currentPagerPosition){case"left":e=0;break;case"middle":e=g/2-T/2;break;case"right":e=g-T}var i=p-s.find(".clone.left").length,t=v.parent().find(".lSPager");"slide"===l.mode&&l.loop===!0&&(i>=t.children().length?i=0:0>i&&(i=t.children().length));var n=i*(T+l.thumbMargin)-e;n+g>C&&(n=C-g-l.thumbMargin),0>n&&(n=0),this.move(t,n)},auto:function(){l.auto&&(clearInterval(x),x=setInterval(function(){s.goToNextSlide()},l.pause))},pauseOnHover:function(){var i=this;l.auto&&l.pauseOnHover&&(v.on("mouseenter",function(){e(this).addClass("ls-hover"),s.pause(),l.auto=!0}),v.on("mouseleave",function(){e(this).removeClass("ls-hover"),v.find(".lightSlider").hasClass("lsGrabbing")||i.auto()}))},touchMove:function(e,i){if(v.css("transition-duration","0ms"),"slide"===l.mode){var t=e-i,n=b-t;if(n>=f-g-l.slideMargin)if(l.freeMove===!1)n=f-g-l.slideMargin;else{var a=f-g-l.slideMargin;n=a+(n-a)/5}else 0>n&&(l.freeMove===!1?n=0:n/=5);this.move(s,n)}},touchEnd:function(e){if(v.css("transition-duration",l.speed+"ms"),"slide"===l.mode){var i=!1,t=!0;b-=e,b>f-g-l.slideMargin?(b=f-g-l.slideMargin,l.autoWidth===!1&&(i=!0)):0>b&&(b=0);var n=function(e){var t=0;if(i||e&&(t=1),l.autoWidth)for(var n=0,a=0;a=b));a++);else{var s=b/((M+l.slideMargin)*l.slideMove);p=parseInt(s)+t,b>=f-g-l.slideMargin&&s%1!==0&&p++}};e>=l.swipeThreshold?(n(!1),t=!1):e<=-l.swipeThreshold&&(n(!0),t=!1),s.mode(t),this.slideThumb()}else e>=l.swipeThreshold?s.goToPrevSlide():e<=-l.swipeThreshold&&s.goToNextSlide()},enableDrag:function(){var i=this;if(!w){var t=0,n=0,a=!1;v.find(".lightSlider").addClass("lsGrab"),v.on("mousedown",function(i){return g>f&&0!==f?!1:void("lSPrev"!==e(i.target).attr("class")&&"lSNext"!==e(i.target).attr("class")&&(t=l.vertical===!0?i.pageY:i.pageX,a=!0,i.preventDefault?i.preventDefault():i.returnValue=!1,v.scrollLeft+=1,v.scrollLeft-=1,v.find(".lightSlider").removeClass("lsGrab").addClass("lsGrabbing"),clearInterval(x)))}),e(window).on("mousemove",function(e){a&&(n=l.vertical===!0?e.pageY:e.pageX,i.touchMove(n,t))}),e(window).on("mouseup",function(s){if(a){v.find(".lightSlider").removeClass("lsGrabbing").addClass("lsGrab"),a=!1,n=l.vertical===!0?s.pageY:s.pageX;var o=n-t;Math.abs(o)>=l.swipeThreshold&&e(window).on("click.ls",function(i){i.preventDefault?i.preventDefault():i.returnValue=!1,i.stopImmediatePropagation(),i.stopPropagation(),e(window).off("click.ls")}),i.touchEnd(o)}})}},enableTouch:function(){var e=this;if(w){var i={},t={};v.on("touchstart",function(e){t=e.originalEvent.targetTouches[0],i.pageX=e.originalEvent.targetTouches[0].pageX,i.pageY=e.originalEvent.targetTouches[0].pageY,clearInterval(x)}),v.on("touchmove",function(n){if(g>f&&0!==f)return!1;var a=n.originalEvent;t=a.targetTouches[0];var s=Math.abs(t.pageX-i.pageX),o=Math.abs(t.pageY-i.pageY);l.vertical===!0?(3*o>s&&n.preventDefault(),e.touchMove(t.pageY,i.pageY)):(3*s>o&&n.preventDefault(),e.touchMove(t.pageX,i.pageX))}),v.on("touchend",function(){if(g>f&&0!==f)return!1;var n;n=l.vertical===!0?t.pageY-i.pageY:t.pageX-i.pageX,e.touchEnd(n)})}},build:function(){var i=this;i.initialStyle(),this.doCss()&&(l.enableTouch===!0&&i.enableTouch(),l.enableDrag===!0&&i.enableDrag()),e(window).on("focus",function(){i.auto()}),e(window).on("blur",function(){clearInterval(x)}),i.pager(),i.pauseOnHover(),i.controls(),i.keyPress()}},n.build(),P.init=function(){P.chbreakpoint(),l.vertical===!0?(g=l.item>1?l.verticalHeight:o.outerHeight(),v.css("height",g+"px")):g=v.outerWidth(),l.loop===!0&&"slide"===l.mode&&P.clone(),P.calL(),"slide"===l.mode&&s.removeClass("lSSlide"),"slide"===l.mode&&(P.calSW(),P.sSW()),setTimeout(function(){"slide"===l.mode&&s.addClass("lSSlide")},1e3),l.pager&&P.createPager(),l.adaptiveHeight===!0&&l.vertical===!1&&s.css("height",o.eq(p).outerHeight(!0)),l.adaptiveHeight===!1&&("slide"===l.mode?l.vertical===!1?n.setHeight(s,!1):n.auto():n.setHeight(s,!0)),l.gallery===!0&&n.slideThumb(),"slide"===l.mode&&n.slide(),l.autoWidth===!1?o.length<=l.item?v.find(".lSAction").hide():v.find(".lSAction").show():P.calWidth(!1)0)l.onBeforePrevSlide.call(this,s,p),p--,s.mode(!1),l.gallery===!0&&n.slideThumb();else if(l.loop===!0){if(l.onBeforePrevSlide.call(this,s,p),"fade"===l.mode){var e=u-1;p=parseInt(e/l.slideMove)}s.mode(!1),l.gallery===!0&&n.slideThumb()}else l.slideEndAnimation===!0&&(s.addClass("leftEnd"),setTimeout(function(){s.removeClass("leftEnd")},400))},s.goToNextSlide=function(){var e=!0;if("slide"===l.mode){var i=n.slideValue();e=i=p?i+(p-t):p>=i+t?p-i-t:p-t}return e+1},s.getTotalSlideCount=function(){return v.find(".lslide").length},s.goToSlide=function(e){p=l.loop?e+s.find(".clone.left").length-1:e,s.mode(!1),l.gallery===!0&&n.slideThumb()},s.destroy=function(){s.lightSlider&&(s.goToPrevSlide=function(){},s.goToNextSlide=function(){},s.mode=function(){},s.play=function(){},s.pause=function(){},s.refresh=function(){},s.getCurrentSlideCount=function(){},s.getTotalSlideCount=function(){},s.goToSlide=function(){},s.lightSlider=null,P={init:function(){}},s.parent().parent().find(".lSAction, .lSPager").remove(),s.removeClass("lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right").removeAttr("style").unwrap().unwrap(),s.children().removeAttr("style"),o.removeClass("lslide active"),s.find(".clone").remove(),o=null,x=null,h=!1,p=0)},setTimeout(function(){l.onSliderLoad.call(this,s)},10),e(window).on("resize orientationchange",function(e){setTimeout(function(){e.preventDefault?e.preventDefault():e.returnValue=!1,P.init()},200)}),this}}(jQuery);