/*! * Master Slider – Responsive Touch Swipe Slider [lite version] * Extended version for J1 Template * * Copyright © 2022 All Rights Reserved. * * @author Averta [www.averta.net] * @version 2.85.13 * @date Feb 2022 */ window.averta={},function($){window.package=function(t){window[t]||(window[t]={})};var extend=function(t,i){for(var e in i)t[e]=i[e]};Function.prototype.extend=function(t){"function"==typeof t.prototype.constructor?(extend(this.prototype,t.prototype),this.prototype.constructor=this):(this.prototype.extend(t),this.prototype.constructor=this)};var trans={Moz:"-moz-",Webkit:"-webkit-",Khtml:"-khtml-",O:"-o-",ms:"-ms-",Icab:"-icab-"};function getVendorPrefix(){if("result"in arguments.callee)return arguments.callee.result;var t=/^(Moz|Khtml|O|ms|Icab)(?=[A-Z])/,i=/^(Webkit|webkit)(?=[A-Z])/,e=document.getElementsByTagName("script")[0];for(var s in e.style)if(i.test(s))return arguments.callee.result="Webkit";for(var s in e.style)if(t.test(s))return arguments.callee.result=s.match(t)[0];return"WebkitOpacity"in e.style?arguments.callee.result="Webkit":"KhtmlOpacity"in e.style?arguments.callee.result="Khtml":arguments.callee.result=""}function checkStyleValue(t){var i=(document.body||document.documentElement).style,e=t;if("string"==typeof i[e])return!0;v=["Moz","Webkit","Khtml","O","ms"],e=e.charAt(0).toUpperCase()+e.substr(1);for(var s=0;s0&&"none"!==t}window._mobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),window._touch="ontouchstart"in document,$(document).ready(function(){window._jcsspfx=getVendorPrefix(),window._csspfx=trans[window._jcsspfx],window._cssanim=supportsTransitions(),window._css3d=supports3DTransforms(),window._css2d=supportsTransforms()}),window.parseQueryString=function(t){var i={};return t.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(t,e,s,n){i[e]=n}),i};var fps60=50/3;if(window.requestAnimationFrame||(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t,i){window.setTimeout(t,fps60)}),window.getComputedStyle||(window.getComputedStyle=function(t,i){return this.el=t,this.getPropertyValue=function(i){var e=/(\-([a-z]){1})/g;return"float"==i&&(i="styleFloat"),e.test(i)&&(i=i.replace(e,function(){return arguments[2].toUpperCase()})),t.currentStyle[i]?t.currentStyle[i]:null},t.currentStyle}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var i=this.length>>>0,e=Number(arguments[1])||0;for((e=e<0?Math.ceil(e):Math.floor(e))<0&&(e+=i);e")?eval(ieVer+version):eval(version+"=="+ieVer):version==ieVer},$.removeDataAttrs=function(t,i){var e,s,n=[],o=t[0].attributes,h=o.length;for(i=i||[],e=0;eMath.abs(i-this.start_y)?t<=this.start_x?"left":"right":i<=this.start_y?"up":"down"}},l.priventDefultEvent=function(t,i){var e=Math.abs(t-this.start_x)>Math.abs(i-this.start_y);return"horizontal"===this.swipeType&&e||"vertical"===this.swipeType&&!e},l.createStatusObject=function(t){var i,e,s={};return i=this.lastStatus.distanceX||0,e=this.lastStatus.distanceY||0,s.distanceX=t.pageX-this.start_x,s.distanceY=t.pageY-this.start_y,s.moveX=s.distanceX-i,s.moveY=s.distanceY-e,s.distance=parseInt(Math.sqrt(Math.pow(s.distanceX,2)+Math.pow(s.distanceY,2))),s.duration=(new Date).getTime()-this.start_time,s.direction=this.getDirection(t.pageX,t.pageY),s},l.__reset=function(t,i){this.reset=!1,this.lastStatus={},this.start_time=(new Date).getTime();var e=this.__getPoint(t,i);this.start_x=e.pageX,this.start_y=e.pageY},l.__touchStart=function(e){var s=e.data.target,o=e;if(s.enabled&&!(t(e.target).closest(s.noSwipeSelector,s.$element).length>0))if(e=e.originalEvent,n&&t(this).css("-ms-touch-action","horizontal"===s.swipeType?"pan-y":"pan-x"),s.onSwipe){if(!(s.touchStarted||i&&s.start_time&&"mousedown"===e.type&&(new Date).getTime()-s.start_time<600)){var l=s.__getPoint(e,o);s.start_x=l.pageX,s.start_y=l.pageY,s.start_time=(new Date).getTime(),t(document).on(r,{target:s},s.__touchEnd).on(h,{target:s},s.__touchMove).on(a,{target:s},s.__touchCancel);var d=s.createStatusObject(l);d.phase="start",s.onSwipe.call(null,d),i||o.preventDefault(),s.lastStatus=d,s.touchStarted=!0}}else t.error("Swipe listener is undefined")},l.__touchMove=function(t){var i=t.data.target,e=t;if(t=t.originalEvent,i.touchStarted){clearTimeout(i.timo),i.timo=setTimeout(function(){i.__reset(t,e)},60);var s=i.__getPoint(t,e),n=i.createStatusObject(s);i.priventDefultEvent(s.pageX,s.pageY)&&e.preventDefault(),n.phase="move",i.lastStatus=n,i.onSwipe.call(null,n)}},l.__touchEnd=function(e){var s=e.data.target,n=e;e=e.originalEvent,clearTimeout(s.timo);var o=s.lastStatus;i||n.preventDefault(),o.phase="end",s.touchStarted=!1,s.priventEvt=null,t(document).off(r,s.__touchEnd).off(h,s.__touchMove).off(a,s.__touchCancel),o.speed=o.distance/o.duration,s.onSwipe.call(null,o)},l.__touchCancel=function(t){t.data.target.__touchEnd(t)},l.__getPoint=function(t,e){return i&&-1===t.type.indexOf("mouse")?t.touches[0]:n?t:e},l.enable=function(){this.enabled||(this.enabled=!0)},l.disable=function(){this.enabled&&(this.enabled=!1)}}(jQuery),function(){"use strict";averta.Ticker=function(){};var t=averta.Ticker,i=[],e=0,s=!0;t.add=function(s,n){return i.push([s,n]),1===i.length&&t.start(),e=i.length},t.remove=function(s,n){for(var o=0,h=i.length;o0?t.style[window._jcsspfx+"TransitionDelay"]=i.delay+"ms":t.style[window._jcsspfx+"TransitionDelay"]="",t.style[window._jcsspfx+"TransitionTimingFunction"]=i.ease,i.to_cb&&i.to_cb.call(i.to_cb_target),i.end_to=setTimeout(function(){i.onTransComplete()},i.duration+(i.delay||0)))},1),this}}(),function(){"use strict";var t=null;function i(i,e){if(void 0!==e.x||void 0!==e.y)if(t){var s=window._jcsspfx+"Transform";void 0!==e.x&&(e[s]=(e[s]||"")+" translateX("+e.x+"px)",delete e.x),void 0!==e.y&&(e[s]=(e[s]||"")+" translateY("+e.y+"px)",delete e.y)}else{if(void 0!==e.x)e["auto"!==i.css("right")?"right":"left"]=e.x+"px",delete e.x;if(void 0!==e.y)e["auto"!==i.css("bottom")?"bottom":"top"]=e.y+"px",delete e.y}return e}window.CTween={},CTween.setPos=function(t,e){t.css(i(t,e))},CTween.animate=function(e,s,n,o){if(null==t&&(t=window._cssanim),o=o||{},i(e,n),t){var h=new CSSTween(e,s,o.delay,EaseDic[o.ease]);return o.transProperty&&(h.transProperty=o.transProperty),h.to(function(){e.css(n)}),o.complete&&h.onComplete(o.complete,o.target),h.start(),h.stop=h.reset,h}var r;return o.delay&&e.delay(o.delay),o.complete&&(r=function(){o.complete.call(o.target)}),e.stop(!0).animate(n,s,o.ease||"linear",r),e},CTween.fadeOut=function(t,i,e){var s={};!0===e?s.complete=function(){t.remove()}:2===e&&(s.complete=function(){t.css("display","none")}),CTween.animate(t,i||1e3,{opacity:0},s)},CTween.fadeIn=function(t,i,e){!1!==e&&t.css("opacity",0).css("display",""),CTween.animate(t,i||1e3,{opacity:1})}}(),window.EaseDic={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",easeInCubic:"cubic-bezier(.55,.055,.675,.19)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"},function(){"use strict";window.MSAligner=function(t,i,e){this.$container=i,this.$img=e,this.type=t||"stretch",this.widthOnly=!1,this.heightOnly=!1};var t=MSAligner.prototype;t.init=function(t,i){switch(this.baseWidth=t,this.baseHeight=i,this.imgRatio=t/i,this.imgRatio2=i/t,this.type){case"tile":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$img.remove();break;case"center":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$container.css({backgroundPosition:"center center",backgroundRepeat:"no-repeat"}),this.$img.remove();break;case"stretch":this.$img.css({width:"100%",height:"100%"});break;case"fill":case"fit":this.needAlign=!0,this.align()}},t.align=function(){if(this.needAlign){var t=this.$container[0].offsetWidth,i=this.$container[0].offsetHeight,e=t/i;"fill"==this.type?this.imgRatioo.options.minValidDist&&o.animating))return o.animating&&(o.value=t,o._callrenderer()),o.animating=!1,h!==o.__animID&&(o.__animID=-1),void o._callonComplete("anim");window.requestAnimationFrame(p),o.value=l-r*Math.exp(-++a*c),o._callrenderer()}};p()}else this.value=t,this._callrenderer()},e.drag=function(t){this.start_drag&&(this.drag_start_loc=this.value,this.start_drag=!1),this.animating=!1,this._deceleration=!1,this.value-=t,!this.options.endless&&(this.value>this._max_value||this.value<0)?this.options.bouncing?(this.__isout=!0,this.value+=.6*t):this.value>this._max_value?this.value=this._max_value:this.value=0:!this.options.endless&&this.options.bouncing&&(this.__isout=!1),this._callrenderer()},e.push=function(t){if(this.stopped=!1,this.options.snapping&&Math.abs(t)<=this.options.snappingMinSpeed)this.cancel();else{if(this.__speed=t,this.__startSpeed=t,this.end_loc=this._calculateEnd(),this.options.snapping){var i=this.getSnapNum(this.value),e=this.getSnapNum(this.end_loc);if(this.options.paging)return i=this.getSnapNum(this.drag_start_loc),this.__isout=!1,void(t>0?this.gotoSnap(i+1,!0,t):this.gotoSnap(i-1,!0,t));if(i===e)return void this.cancel();this._callsnapChange(e),this.current_snap=e}this.animating=!1,this.__needsSnap=this.options.endless||this.end_loc>this._min_value&&this.end_locthis._max_value?(this.__speed=8,this.__needsSnap=!1,this._startDecelaration()):this.gotoSnap(t+1,!0)},e.prevSnap=function(){this._internalStop();var t=this.getSnapNum(this.value);!this.options.endless&&(t-1)*this.options.snapsizethis.options.minValidDist;)e+=i,i*=this.options.friction,s++;return t?s:e},e._checkLimits=function(t){return this.options.endless?t:tthis._max_value?this._max_value:t},e._callrenderer=function(){this.__renderHook&&this.__renderHook.fun.call(this.__renderHook.ref,this,this.value)},e._callsnapChange=function(t){this.__snapHook&&t!==this.current_snap&&this.__snapHook.fun.call(this.__snapHook.ref,this,t,t-this.current_snap)},e._callonComplete=function(t){this.__compHook&&!this.stopped&&this.__compHook.fun.call(this.__compHook.ref,this,this.current_snap,t)},e._computeDeceleration=function(){if(this.options.snapping&&this.__needsSnap){var t=(this.__startSpeed-this.__speed)/this.__startSpeed*this.__extraMove;this.value+=this.__speed+t-this.__extrStep,this.__extrStep=t}else this.value+=this.__speed;if(this.__speed*=this.options.friction,this.options.endless||this.options.bouncing||(this.value<=this._min_value?(this.value=this._min_value,this.__speed=0):this.value>=this._max_value&&(this.value=this._max_value,this.__speed=0)),this._callrenderer(),!this.options.endless&&this.options.bouncing){var i=0;this.valuethis._max_value&&(i=this._max_value-this.value),this.__isout=Math.abs(i)>=this.options.minValidDist,this.__isout&&(this.__speed*i<=0?this.__speed+=i*this.options.outFriction:this.__speed=i*this.options.outAcceleration)}},e._startDecelaration=function(){if(!this._deceleration){this._deceleration=!0;var t=this,i=function(){t._deceleration&&(t._computeDeceleration(),Math.abs(t.__speed)>t.options.minValidDist||t.__isout?window.requestAnimationFrame(i):(t._deceleration=!1,t.__isout=!1,t.__needsSnap&&t.options.snapping&&!t.options.paging?t.value=t._checkLimits(t.end_loc+t.__extraMove):t.value=Math.round(t.value),t._callrenderer(),t._callonComplete("decel")))};i()}},window.Controller=i}(),window.MSSliderEvent=function(t){this.type=t},MSSliderEvent.CHANGE_START="ms_changestart",MSSliderEvent.CHANGE_END="ms_changeend",MSSliderEvent.WAITING="ms_waiting",MSSliderEvent.AUTOPLAY_CHANGE="ms_autoplaychange",MSSliderEvent.VIDEO_PLAY="ms_videoPlay",MSSliderEvent.VIDEO_CLOSE="ms_videoclose",MSSliderEvent.INIT="ms_init",MSSliderEvent.HARD_UPDATE="ms_hard_update",MSSliderEvent.RESIZE="ms_resize",MSSliderEvent.RESERVED_SPACE_CHANGE="ms_rsc",MSSliderEvent.DESTROY="ms_destroy",function(t,i,e){"use strict";t.MSSlide=function(){this.$element=null,this.$loading=e("
").addClass("ms-slide-loading"),this.view=null,this.index=-1,this.__width=0,this.__height=0,this.fillMode="fill",this.selected=!1,this.pselected=!1,this.autoAppend=!0,this.isSleeping=!0,this.moz=t.MSBrowserInfo.mozilla};var s=MSSlide.prototype;s.onSwipeStart=function(){this.link&&(this.linkdis=!0),this.video&&(this.videodis=!0)},s.onSwipeMove=function(t){var i=Math.max(Math.abs(t.data.distanceX),Math.abs(t.data.distanceY));this.swipeMoved=i>4},s.onSwipeCancel=function(t){this.swipeMoved?this.swipeMoved=!1:(this.link&&(this.linkdis=!1),this.video&&(this.videodis=!1))},s.assetsLoaded=function(){this.ready=!0,this.slider.api._startTimer(),this.isSleeping||this.setupBG(),CTween.fadeOut(this.$loading,300,!0),(0===this.slider.options.preload||"all"===this.slider.options.preload)&&this.index").addClass("ms-slide-bgcont"),this.$element.append(this.$loading).append(this.$imgcont),this.$bg_img=e(t).css("visibility","hidden"),this.$imgcont.append(this.$bg_img),this.bgAligner=new MSAligner(i.fillMode,i.$imgcont,i.$bg_img),this.bgAligner.widthOnly=this.slider.options.autoHeight,i.slider.options.autoHeight&&(i.pselected||i.selected)&&i.slider.setHeight(i.slider.options.height),void 0!==this.$bg_img.data("src")?(this.bg_src=this.$bg_img.data("src"),this.$bg_img.removeAttr("data-src")):this.$bg_img.one("load",function(t){i._onBGLoad(t)}).each(e.jqLoadFix)},s.setupBG=function(){!this.initBG&&this.bgLoaded&&(this.initBG=!0,this.$bg_img.css("visibility",""),this.bgWidth=this.bgNatrualWidth||this.$bg_img.width(),this.bgHeight=this.bgNatrualHeight||this.$bg_img.height(),CTween.fadeIn(this.$imgcont,300),this.slider.options.autoHeight&&this.$imgcont.height(this.bgHeight*this.ratio),this.bgAligner.init(this.bgWidth,this.bgHeight),this.setSize(this.__width,this.__height),this.slider.options.autoHeight&&(this.pselected||this.selected)&&this.slider.setHeight(this.getHeight()))},s.loadImages=function(){if(!this.ls){if(this.ls=!0,this.hasBG&&this.bg_src){var t=this;this.$bg_img.preloadImg(this.bg_src,function(i){t._onBGLoad(i)})}this.hasBG||this.hasLayers||this.assetsLoaded()}},s._onBGLoad=function(i){this.bgNatrualWidth=i.width,this.bgNatrualHeight=i.height,this.bgLoaded=!0,t.MSBrowserInfo.msie&&this.$bg_img.on("dragstart",function(t){t.preventDefault()}),this.hasLayers&&!this.layerController.ready||this.assetsLoaded()},s.setSize=function(t,i,e){this.__width=t,this.slider.options.autoHeight&&(this.bgLoaded?(this.ratio=this.__width/this.bgWidth,i=Math.floor(this.ratio*this.bgHeight),this.$imgcont.height(i)):(this.ratio=t/this.slider.options.width,i=this.slider.options.height*this.ratio)),this.__height=i,this.$element.width(t).height(i),this.hasBG&&this.bgLoaded&&this.bgAligner.align()},s.getHeight=function(){return this.hasBG&&this.bgLoaded?this.bgHeight*this.ratio:Math.max(this.$element[0].clientHeight,this.slider.options.height*this.ratio)},s.__playVideo=function(){this.vplayed||this.videodis||(this.vplayed=!0,this.slider.api.paused||(this.slider.api.pause(),this.roc=!0),this.vcbtn.css("display",""),CTween.fadeOut(this.vpbtn,500,!1),CTween.fadeIn(this.vcbtn,500),CTween.fadeIn(this.vframe,500),this.vframe.css("display","block").attr("src",this.video+"&autoplay=1"),this.view.$element.addClass("ms-def-cursor"),this.moz&&this.view.$element.css("perspective","none"),this.view.swipeControl&&this.view.swipeControl.disable(),this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_PLAY)))},s.__closeVideo=function(){if(this.vplayed){this.vplayed=!1,this.roc&&this.slider.api.resume();var t=this;CTween.fadeIn(this.vpbtn,500),CTween.animate(this.vcbtn,500,{opacity:0},{complete:function(){t.vcbtn.css("display","none")}}),CTween.animate(this.vframe,500,{opacity:0},{complete:function(){t.vframe.attr("src","about:blank").css("display","none")}}),this.moz&&this.view.$element.css("perspective",""),this.view.swipeControl&&this.view.swipeControl.enable(),this.view.$element.removeClass("ms-def-cursor"),this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_CLOSE))}},s.create=function(){var i=this;this.link&&this.link.addClass("ms-slide-link").html("").on("click",function(t){i.linkdis&&t.preventDefault()}),this.video&&(-1===this.video.indexOf("?")&&(this.video+="?"),this.vframe=e("").addClass("ms-slide-video").css({width:"100%",height:"100%",display:"none"}).attr("src","about:blank").attr("allowfullscreen","true").appendTo(this.$element),this.vpbtn=e("
").addClass("ms-slide-vpbtn").on("click",function(){i.__playVideo()}).appendTo(this.$element),this.vcbtn=e("
").addClass("ms-slide-vcbtn").on("click",function(){i.__closeVideo()}).appendTo(this.$element).css("display","none"),t._touch&&this.vcbtn.removeClass("ms-slide-vcbtn").addClass("ms-slide-vcbtn-mobile").append('
Close video
').appendTo(this.view.$element.parent())),!this.slider.options.autoHeight&&this.hasBG&&(this.$imgcont.css("height","100%"),"center"!==this.fillMode&&"stretch"!==this.fillMode||(this.fillMode="fill")),this.slider.options.autoHeight&&this.$element.addClass("ms-slide-auto-height"),this.sleep(!0)},s.destroy=function(){this.$element.remove(),this.$element=null},s.prepareToSelect=function(){this.pselected||this.selected||(this.pselected=!0,(this.link||this.video)&&(this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.view.addEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this),this.view.addEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this),this.linkdis=!1,this.swipeMoved=!1),this.loadImages(),this.moz&&this.$element.css("margin-top",""))},s.select=function(){this.selected||(this.selected=!0,this.pselected=!1,this.$element.addClass("ms-sl-selected"),this.videoAutoPlay&&(this.videodis=!1,this.vpbtn.trigger("click")))},s.unselect=function(){this.pselected=!1,this.moz&&this.$element.css("margin-top","0.1px"),(this.link||this.video)&&(this.view.removeEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.view.removeEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this),this.view.removeEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this)),this.selected&&(this.selected=!1,this.$element.removeClass("ms-sl-selected"),this.video&&this.vplayed&&(this.__closeVideo(),this.roc=!1))},s.sleep=function(t){this.isSleeping&&!t||(this.isSleeping=!0,this.autoAppend&&this.$element.detach(),this.hasLayers&&this.layerController.onSlideSleep())},s.wakeup=function(){this.isSleeping&&(this.isSleeping=!1,this.autoAppend&&this.view.$slideCont.append(this.$element),this.moz&&this.$element.css("margin-top","0.1px"),this.setupBG(),this.hasBG&&this.bgAligner.align(),this.hasLayers&&this.layerController.onSlideWakeup())}}(window,document,jQuery),function(t){"use strict";var i={};window.MSSlideController=function(t){this._delayProgress=0,this._timer=new averta.Timer(100),this._timer.onTimer=this.onTimer,this._timer.refrence=this,this.currentSlide=null,this.slider=t,this.so=t.options,averta.EventDispatcher.call(this)},MSSlideController.registerView=function(t,e){if(t in i)throw new Error(t+", is already registered.");i[t]=e},MSSlideController.SliderControlList={},MSSlideController.registerControl=function(t,i){if(t in MSSlideController.SliderControlList)throw new Error(t+", is already registered.");MSSlideController.SliderControlList[t]=i};var e=MSSlideController.prototype;e.setupView=function(){var e=this;this.resize_listener=function(){e.__resize()};var s={spacing:this.so.space,mouseSwipe:this.so.mouse,loop:this.so.loop,autoHeight:this.so.autoHeight,swipe:this.so.swipe,speed:this.so.speed,dir:this.so.dir,viewNum:this.so.inView,critMargin:this.so.critMargin};this.so.viewOptions&&t.extend(s,this.so.viewOptions),this.so.autoHeight&&(this.so.heightLimit=!1);var n=i[this.slider.options.view]||MSBasicView;if(!n._3dreq||window._css3d&&!window.MSBrowserInfo.msie||(n=n._fallback||MSBasicView),this.view=new n(s),this.so.overPause){e=this;this.slider.$element.on("mouseenter",function(){e.is_over=!0,e._stopTimer()}).on("mouseleave",function(){e.is_over=!1,e._startTimer()})}},e.onChangeStart=function(){this.change_started=!0,this.currentSlide&&this.currentSlide.unselect(),this.currentSlide=this.view.currentSlide,this.currentSlide.prepareToSelect(),this.so.endPause&&this.currentSlide.index===this.slider.slides.length-1&&(this.pause(),this.skipTimer()),this.so.autoHeight&&this.slider.setHeight(this.currentSlide.getHeight()),this.so.deepLink&&this.__updateWindowHash(),this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_START))},e.onChangeEnd=function(){if(this.change_started=!1,this._startTimer(),this.currentSlide.select(),this.so.preload>1){var t,i,e,s=this.so.preload-1;for(i=1;i<=s;++i){if((t=this.view.index+i)>=this.view.slideList.length){if(!this.so.loop){i=s;continue}t-=this.view.slideList.length}(e=this.view.slideList[t])&&e.loadImages()}for(s>this.view.slideList.length/2&&(s=Math.floor(this.view.slideList.length/2)),i=1;i<=s;++i){if((t=this.view.index-i)<0){if(!this.so.loop){i=s;continue}t=this.view.slideList.length+t}(e=this.view.slideList[t])&&e.loadImages()}}this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_END))},e.onSwipeStart=function(){this.skipTimer()},e.skipTimer=function(){this._timer.reset(),this._delayProgress=0,this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))},e.onTimer=function(t){if(this._timer.getTime()>=1e3*this.view.currentSlide.delay&&(this.skipTimer(),this.view.next(),this.hideCalled=!1),this._delayProgress=this._timer.getTime()/(10*this.view.currentSlide.delay),this.so.hideLayers&&!this.hideCalled&&1e3*this.view.currentSlide.delay-this._timer.getTime()<=300){var i=this.view.currentSlide;i.hasLayers&&i.layerController.animHideLayers(),this.hideCalled=!0}this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))},e._stopTimer=function(){this._timer&&this._timer.stop()},e._startTimer=function(){this.paused||this.is_over||!this.currentSlide||!this.currentSlide.ready||this.change_started||this._timer.start()},e.__appendSlides=function(){for(var t,i,e=0,s=this.view.slideList.length-1;e=this.view.slideList.length){if(!this.so.loop){e=s;continue}i-=this.view.slideList.length}(t=this.view.slideList[i]).detached=!1,this.view.appendSlide(t)}for(s>this.view.slideList.length/2&&(s=Math.floor(this.view.slideList.length/2)),e=1;e<=s;++e){if((i=this.view.index-e)<0){if(!this.so.loop){e=s;continue}i=this.view.slideList.length+i}(t=this.view.slideList[i]).detached=!1,this.view.appendSlide(t)}},e.__resize=function(t){this.created&&(this.width=this.slider.$element[0].clientWidth||this.so.width,this.so.fullwidth||(this.width=Math.min(this.width,this.so.width)),this.height=this.width/this.slider.aspect,this.so.autoHeight?(this.currentSlide.setSize(this.width,null,t),this.view.setSize(this.width,this.currentSlide.getHeight(),t)):this.view.setSize(this.width,Math.max(this.so.minHeight,this.so.heightLimit?Math.min(this.height,this.so.height):this.height),t),this.slider.$controlsCont&&this.so.centerControls&&this.so.fullwidth&&this.view.$element.css("left",Math.min(0,-(this.slider.$element[0].clientWidth-this.so.width)/2)+"px"),this.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESIZE)))},e.__dispatchInit=function(){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.INIT))},e.setup=function(){this.created=!0,this.paused=!this.so.autoplay,this.view.addEventListener(MSViewEvents.CHANGE_START,this.onChangeStart,this),this.view.addEventListener(MSViewEvents.CHANGE_END,this.onChangeEnd,this),this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.currentSlide=this.view.slideList[this.so.start-1],this.__resize();var t=this.so.start-1;if(this.view.create(t),0===this.so.preload&&this.view.slideList[0].loadImages(),this.scroller=this.view.controller,this.so.wheel){var i=this,e=(new Date).getTime();this.wheellistener=function(t){var s=window.event||t.orginalEvent||t;s.preventDefault();var n=(new Date).getTime();if(!(n-e<400)){e=n;var o=Math.abs(s.detail||s.wheelDelta);window.MSBrowserInfo.mozilla&&(o*=100);return s.detail<0||s.wheelDelta>0?o>=15&&i.previous(!0):o>=15&&i.next(!0),!1}},this.slider.$element[0].addEventListener("mousewheel",this.wheellistener,{passive:!1})}0===this.slider.$element[0].clientWidth&&(this.slider.init_safemode=!0),this.__resize()},e.index=function(){return this.view.index},e.count=function(){return this.view.slidesCount},e.next=function(t){this.skipTimer(),this.view.next(t)},e.previous=function(t){this.skipTimer(),this.view.previous(t)},e.gotoSlide=function(t){t=Math.min(t,this.count()-1),this.skipTimer(),this.view.gotoSlide(t)},e.destroy=function(t){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.DESTROY)),this.slider.destroy(t)},e._destroy=function(){this._timer.reset(),this._timer=null,t(window).off("resize",this.resize_listener),this.view.destroy(),this.view=null,this.so.wheel&&(window.MSBrowserInfo.mozilla?this.slider.$element[0].removeEventListener("DOMMouseScroll",this.wheellistener):this.slider.$element.off("mousewheel",this.wheellistener),this.wheellistener=null),this.so=null},e.runAction=function(t){var i=[];if(-1!==t.indexOf("(")){var e=t.slice(0,t.indexOf("("));i=t.slice(t.indexOf("(")+1,-1).replace(/\"|\'|\s/g,"").split(","),t=e}t in this?this[t].apply(this,i):console&&console.warn('Master Slider Error: Action "'+t+'" not found.')},e.update=function(t){this.slider.init_safemode&&t&&(this.slider.init_safemode=!1),this.__resize(t),t&&this.dispatchEvent(new MSSliderEvent(MSSliderEvent.HARD_UPDATE))},e.locate=function(){this.__resize()},e.resume=function(){this.paused&&(this.paused=!1,this._startTimer())},e.pause=function(){this.paused||(this.paused=!0,this._stopTimer())},e.currentTime=function(){return this._delayProgress},averta.EventDispatcher.extend(e)}(jQuery),function(t){"use strict";window.MasterSlider=function(){this.options={forceInit:!0,autoplay:!1,loop:!1,mouse:!0,swipe:!0,grabCursor:!0,space:0,fillMode:"fill",start:1,view:"basic",width:300,height:150,inView:15,critMargin:1,mobileBGVideo:!1,heightLimit:!0,smoothHeight:!0,autoHeight:!1,minHeight:-1,fullwidth:!1,fullheight:!1,autofill:!1,layersMode:"center",hideLayers:!1,endPause:!1,centerControls:!0,overPause:!0,shuffle:!1,speed:17,dir:"h",preload:0,wheel:!1,layout:"boxed",autofillTarget:null,fullscreenMargin:0,instantStartLayers:!1,parallaxMode:"mouse",rtl:!1,deepLink:null,deepLinkType:"path",disablePlugins:[],responsive:!0,tabletWidth:768,tabletHeight:null,phoneWidth:480,phoneHeight:null,sizingReference:"window"},this.slides=[],this.activePlugins=[],this.$element=null,this.lastMargin=0,this.leftSpace=0,this.topSpace=0,this.rightSpace=0,this.bottomSpace=0,this._holdOn=0;var i=this;this.resize_listener=function(){i._resize()},t(window).on("resize",this.resize_listener)},MasterSlider.author="Averta Ltd. (www.averta.net)",MasterSlider.version="2.85.13",MasterSlider.releaseDate="Feb 2022",MasterSlider._plugins=[];var i=MasterSlider;i.registerPlugin=function(t){-1===i._plugins.indexOf(t)&&i._plugins.push(t)};var e=MasterSlider.prototype;e.__setupSlides=function(){var i,e=this,s=0;this.$element.children(".ms-slide").each(function(n){var o=t(this);(i=new MSSlide).$element=o,i.slider=e,i.delay=void 0!==o.data("delay")?o.data("delay"):3,i.fillMode=void 0!==o.data("fill-mode")?o.data("fill-mode"):e.options.fillMode,i.index=s++,i.id=o.data("id");var h=o.children("img:not(.ms-layer)");if(h.length>0&&i.setBG(h[0]),e.controls)for(var r=0,a=e.controls.length;r0)&&this._docReady){if(this.initialized=!0,"all"!==this.options.preload&&this._removeLoading(),this.options.shuffle&&this._shuffleSlides(),this.slideController.setupView(),this.view=this.slideController.view,this.$controlsCont=t("
").addClass("ms-inner-controls-cont"),this.options.centerControls&&this.$controlsCont.css("max-width",this.options.width+"px"),this.$controlsCont.prepend(this.view.$element),this.$msContainer=t("
").addClass("ms-container").prependTo(this.$element).append(this.$controlsCont),this.controls)for(var i=0,e=this.controls.length;i-1&&this.$element.addClass("ms-android");var n=this;t.extend(this.options,s),this.aspect=this.options.width/this.options.height,this.responsiveWidth=[this.options.phoneWidth,this.options.tabletWidth,this.options.width],this.responsiveHeight=[this.options.phoneHeight,this.options.tabletHeight,this.options.height],this.responsiveAspect=[this.options.phoneWidth/this.options.phoneHeight,this.options.tabletWidth/this.options.tabletHeight,this.options.width/this.options.height],this.$loading=t("
").addClass("ms-loading-container").insertBefore(this.$element).append(t("
").addClass("ms-loading")),this.$loading.parent().css("position","relative"),this.options.autofill&&(this.options.fullwidth=!0,this.options.fullheight=!0),this.options.fullheight&&this.$element.addClass("ms-fullheight"),this._resize(),this.slideController=new MSSlideController(this),this.api=this.slideController;for(var o=0,h=i._plugins.length;o!==h;o++){var r=i._plugins[o];-1===this.options.disablePlugins.indexOf(r.name)&&this.activePlugins.push(new r(this))}return this.options.forceInit&&MasterSlider.addJQReadyErrorCheck(this),t(document).ready(function(){n.initialized||(n._docReady=!0,n._init())}),this}},e.getActiveBreakpoint=function(t){var i=["phone","tablet","desktop"],e=[this.options.phoneWidth||480,this.options.tabletWidth||768,this.options.width],s="self"===this.options.sizingReference?this.$element.outerWidth(!1):window.innerWidth,n="desktop",o=2;return e.every(function(t,e){return!(t>=s)||(n=i[e],o=e,!1)}.bind(this)),t?o:n},e.getBreakpointReferenceSize=function(){var t=this.getActiveBreakpoint();return"desktop"===t?this.options.width:this.options[t+"Width"]},e.getResponsiveValue=function(t){var i=this.getActiveBreakpoint(!0);return t.slice(i).filter(function(t){return void 0!==t&&t!==1/0})[0]},e.destroy=function(i){for(var e=0,s=this.activePlugins.length;e!==s;e++)this.activePlugins[e].destroy();if(this.controls)for(e=0,s=this.controls.length;e!==s;e++)this.controls[e].destroy();this.slideController&&this.slideController._destroy(),this.$loading&&this.$loading.remove(),i?this.$element.html(this.setupMarkup).css("visibility","hidden"):this.$element.remove();var n=this.options.layout;"fullscreen"!==n&&"fullwidth"!==n||t(window).off("resize",this._updateLayout),this.view=null,this.slides=null,this.options=null,this.slideController=null,this.api=null,this.resize_listener=null,this.activePlugins=null}}(jQuery),function(t,i,e,s){var n="masterslider",o={controls:{}};function h(i,e){this.element=i,this.$element=t(i),this.settings=t.extend({},o,e),this._defaults=o,this._name=n,this.init()}t.extend(h.prototype,{init:function(){var t=this;for(var i in this._slider=new MasterSlider,this.settings.controls)this._slider.control(i,this.settings.controls[i]);this._slider.setup(this.$element,this.settings);var e=this._slider.api.dispatchEvent;this._slider.api.dispatchEvent=function(i){t.$element.trigger(i.type),e.call(this,i)}},api:function(){return this._slider.api},slider:function(){return this._slider}}),t.fn[n]=function(i){var e,s=arguments,o="plugin_"+n;return void 0===i||"object"==typeof i?this.each(function(){t.data(this,o)||t.data(this,o,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var n=t.data(this,o);n instanceof h&&"function"==typeof n[i]&&(e=n[i].apply(n,Array.prototype.slice.call(s,1))),n instanceof h&&"function"==typeof n._slider.api[i]&&(e=n._slider.api[i].apply(n._slider.api,Array.prototype.slice.call(s,1))),"destroy"===i&&t.data(this,o,null)}),void 0!==e?e:this):void 0}}(jQuery,window,document),function(t,i,e,s){"use strict";var n=[];MasterSlider.addJQReadyErrorCheck=function(t){n.push(t)};var o=t.fn.ready,h=i.onerror;t.fn.ready=function(){return i.onerror=function(){if(0!==n.length)for(var t=0,i=n.length;t!==i;t++){var e=n[t];e.initialized||(e._docReady=!0,e._init())}return!!h&&h.apply(this,arguments)},o.apply(this,arguments)}}(jQuery,window,document),window.MSViewEvents=function(t,i){this.type=t,this.data=i},MSViewEvents.SWIPE_START="swipeStart",MSViewEvents.SWIPE_END="swipeEnd",MSViewEvents.SWIPE_MOVE="swipeMove",MSViewEvents.SWIPE_CANCEL="swipeCancel",MSViewEvents.SCROLL="scroll",MSViewEvents.CHANGE_START="slideChangeStart",MSViewEvents.CHANGE_END="slideChangeEnd",function(t){"use strict";window.MSBasicView=function(i){this.options={loop:!1,dir:"h",autoHeight:!1,spacing:5,mouseSwipe:!0,swipe:!0,speed:17,minSlideSpeed:2,viewNum:20,critMargin:1},t.extend(this.options,i),this.dir=this.options.dir,this.loop=this.options.loop,this.spacing=this.options.spacing,this.__width=0,this.__height=0,this.__cssProb="h"===this.dir?"left":"top",this.__offset="h"===this.dir?"offsetLeft":"offsetTop",this.__dimension="h"===this.dir?"__width":"__height",this.__translate_end=window._css3d?" translateZ(0px)":"",this.$slideCont=t("
").addClass("ms-slide-container"),this.$element=t("
").addClass("ms-view").addClass("ms-basic-view").append(this.$slideCont),this.currentSlide=null,this.index=-1,this.slidesCount=0,this.slides=[],this.slideList=[],this.viewSlidesList=[],this.css3=window._cssanim,this.start_buffer=0,this.firstslide_snap=0,this.slideChanged=!1,this.controller=new Controller(0,0,{snapping:!0,snapsize:100,paging:!0,snappingMinSpeed:this.options.minSlideSpeed,friction:(100-.5*this.options.speed)/100,endless:this.loop}),this.controller.renderCallback("h"===this.dir?this._horizUpdate:this._vertiUpdate,this),this.controller.snappingCallback(this.__snapUpdate,this),this.controller.snapCompleteCallback(this.__snapCompelet,this),averta.EventDispatcher.call(this)};var i=MSBasicView.prototype;i.__snapCompelet=function(t,i){this.slideChanged&&(this.slideChanged=!1,this.__locateSlides(),this.start_buffer=0,this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END)))},i.__snapUpdate=function(t,i,e){if(this.loop){var s=this.index+e;this.updateLoop(s),s>=this.slidesCount&&(s-=this.slidesCount),s<0&&(s=this.slidesCount+s),this.index=s}else{if(i<0||i>=this.slidesCount)return;this.index=i}this._checkCritMargins(),window.MSBrowserInfo.mozilla&&(this.slideList[this.index].$element[0].style.marginTop="0.1px",this.currentSlide&&(this.currentSlide.$element[0].style.marginTop=""));var n=this.slideList[this.index];n!==this.currentSlide&&(this.currentSlide=n,this.autoUpdateZIndex&&this.__updateSlidesZindex(),this.slideChanged=!0,this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START)))},i._checkCritMargins=function(){if(!this.normalMode){var t=Math.floor(this.options.viewNum/2),i=this.viewSlidesList.indexOf(this.slideList[this.index]),e=this[this.__dimension]+this.spacing,s=this.options.critMargin;this.loop?(i<=s||i>=this.viewSlidesList.length-s)&&(e*=i-t,this.__locateSlides(!1,e+this.start_buffer),this.start_buffer+=e):(i=s||i>=this.viewSlidesList.length-s&&this.index=this.slidesCount?this.index+i-this.slidesCount:this.index+i]);return t},i.__getSteps=function(t,i){var e=i=this.slidesCount?this.controller.bounce(10):this.gotoSlide(this.index+1>=this.slidesCount?0:this.index+1)},i.previous=function(t){t&&!this.loop&&this.index-1<0?this.controller.bounce(-10):this.gotoSlide(this.index-1<0?this.slidesCount-1:this.index-1)},i.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element),this.swipeControl.swipeType="h"===this.dir?"horizontal":"vertical";var t=this;"h"===this.dir?this.swipeControl.onSwipe=function(i){t.horizSwipeMove(i)}:this.swipeControl.onSwipe=function(i){t.vertSwipeMove(i)}},i.vertSwipeMove=function(t){var i=t.phase;if("start"===i)this.controller.stop(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,t));else if("move"===i&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+t.moveY).1&&Math.abs(e)>=s?(this.controller.push(-e),e>this.controller.options.snappingMinSpeed&&this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,t))):(this.controller.cancel(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,t)))}},i.horizSwipeMove=function(t){var i=t.phase;if("start"===i)this.controller.stop(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,t));else if("move"===i&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+t.moveX).1&&Math.abs(e)>=s?(this.controller.push(-e),e>this.controller.options.snappingMinSpeed&&this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,t))):(this.controller.cancel(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,t)))}},i.setSize=function(t,i,e){if(this.lastWidth!==t||i!==this.lastHeight||e){this.$element.width(t).height(i);for(var s=0;s=i.options.hideUnder&&i.detached&&(i.detached=!1,i.visible(),i.onAppend())},e.create=function(){this.options.autohide&&(this.hide(!0),this.slider.$controlsCont.on("mouseenter",this._onMouseEnter.bind(this)).on("mouseleave",this._onMouseLeave.bind(this)).on("mousedown",this._onMouseDown.bind(this)),this.$element&&this.$element.on("mouseenter",this._onMouseEnter.bind(this)).on("mouseleave",this._onMouseLeave.bind(this)).on("mousedown",this._onMouseDown.bind(this)),t(document).on("mouseup",this._onMouseUp.bind(this))),this.options.align&&this.$element.addClass("ms-align-"+this.options.align),this.options.customClass&&this.$element&&this.$element.addClass(this.options.customClass)},e._onMouseEnter=function(){this._disableAH||this.mdown||this.visible(),this.mleave=!1},e._onMouseLeave=function(){this.mdown||this.hide(),this.mleave=!0},e._onMouseDown=function(){this.mdown=!0},e._onMouseUp=function(){this.mdown&&this.mleave&&this.hide(),this.mdown=!1},e.onAppend=function(){this.needsRealign&&this.slider._realignControls()},e.onDetach=function(){this.needsRealign&&this.slider._realignControls()},e._hideOnvideoStarts=function(){var t=this;this.slider.api.addEventListener(MSSliderEvent.VIDEO_PLAY,function(){t._disableAH=!0,t.hide()}),this.slider.api.addEventListener(MSSliderEvent.VIDEO_CLOSE,function(){t._disableAH=!1,t.visible()})},e.hide=function(t){if(t)this.$element.css("opacity",0),this.$element.css("display","none");else{clearTimeout(this.hideTo);var i=this.$element;this.hideTo=setTimeout(function(){CTween.fadeOut(i,400,!1)},20)}this.$element.addClass("ms-ctrl-hide")},e.visible=function(){this.detached||(clearTimeout(this.hideTo),this.$element.css("display",""),CTween.fadeIn(this.$element,400,!1),this.$element.removeClass("ms-ctrl-hide"))},e.destroy=function(){this.options&&this.options.hideUnder&&t(window).off("resize",this.onResize)},window.BaseControl=i}(jQuery),function(t){"use strict";var i=function(i){BaseControl.call(this),t.extend(this.options,i)};i.extend(BaseControl);var e=i.prototype,s=BaseControl.prototype;e.setup=function(){var i=this;this.$next=t("
").addClass(this.options.prefix+"nav-next").on("click",function(){i.slider.api.next(!0)}),this.$prev=t("
").addClass(this.options.prefix+"nav-prev").on("click",function(){i.slider.api.previous(!0)}),s.setup.call(this),this.cont.append(this.$next),this.cont.append(this.$prev),this.checkHideUnder()},e.hide=function(t){if(t)return this.$prev.css("opacity",0).css("display","none"),void this.$next.css("opacity",0).css("display","none");CTween.fadeOut(this.$prev,400,!1),CTween.fadeOut(this.$next,400,!1),this.$prev.addClass("ms-ctrl-hide"),this.$next.addClass("ms-ctrl-hide")},e.visible=function(){this.detached||(CTween.fadeIn(this.$prev,400),CTween.fadeIn(this.$next,400),this.$prev.removeClass("ms-ctrl-hide").css("display",""),this.$next.removeClass("ms-ctrl-hide").css("display",""))},e.destroy=function(){s.destroy(),this.$next.remove(),this.$prev.remove()},window.MSArrows=i,MSSlideController.registerControl("arrows",i)}(jQuery),function(t){"use strict";var i=function(i){BaseControl.call(this),this.options.dir="h",this.options.wheel="v"===i.dir,this.options.arrows=!1,this.options.speed=17,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.space=10,this.options.width=100,this.options.height=100,this.options.type="thumbs",this.options.hover=!1,t.extend(this.options,i),this.thumbs=[],this.index_count=0,this.__dimen="h"===this.options.dir?"width":"height",this.__alignsize="h"===this.options.dir?"height":"width",this.__jdimen="h"===this.options.dir?"outerWidth":"outerHeight",this.__pos="h"===this.options.dir?"left":"top",this.click_enable=!0};i.extend(BaseControl);var e=i.prototype,s=BaseControl.prototype;e.setup=function(){if(this.$element=t("
").addClass(this.options.prefix+"thumb-list"),"tabs"===this.options.type&&this.$element.addClass(this.options.prefix+"tabs"),this.$element.addClass("ms-dir-"+this.options.dir),s.setup.call(this),this.slider.$controlsCont===this.cont?this.$element.appendTo(this.slider.$element):this.$element.appendTo(this.cont),this.$thumbscont=t("
").addClass("ms-thumbs-cont").appendTo(this.$element),this.options.arrows){var i=this;this.$fwd=t("
").addClass("ms-thumblist-fwd").appendTo(this.$element).on("click",function(){i.controller.push(-15)}),this.$bwd=t("
").addClass("ms-thumblist-bwd").appendTo(this.$element).on("click",function(){i.controller.push(15)})}if(!this.options.insetTo&&this.options.align){var e=this.options.align;this.options.inset?this.$element.css(e,this.options.margin):"top"===e?this.$element.detach().prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===e?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.width):this.$element.height(this.options.height)}this.checkHideUnder()},e.align=function(t){if(!this.detached){var i=this.options.align,e=this.slider.reserveSpace(i,this.options[this.__alignsize]+2*this.options.margin);this.$element.css(i,-e-this.options[this.__alignsize]-this.options.margin)}},e.slideAction=function(i){var e=i.$element.find(".ms-thumb"),s=this,n=t("
").addClass("ms-thumb-frame").append(e).append(t('
')).on(this.options.hover?"hover":"click",function(){s.changeSlide(n)});if(this.options.align&&n.width(this.options.width-("v"===this.options.dir&&"tabs"===this.options.type?12:0)).height(this.options.height).css("margin-"+("v"===this.options.dir?"bottom":"right"),this.options.space),n[0].index=this.index_count++,this.$thumbscont.append(n),this.options.fillMode&&e.is("img")){var o=new window.MSAligner(this.options.fillMode,n,e);e[0].aligner=o,e.one("load",function(i){var e=t(this);e[0].aligner.init(e.width(),e.height()),e[0].aligner.align()}).each(t.jqLoadFix)}window.MSBrowserInfo.msie&&e.on("dragstart",function(t){t.preventDefault()}),this.thumbs.push(n)},e.create=function(){s.create.call(this),this.__translate_end=window._css3d?" translateZ(0px)":"",this.controller=new Controller(0,0,{snappingMinSpeed:2,friction:(100-.5*this.options.speed)/100}),this.controller.renderCallback("h"===this.options.dir?this._hMove:this._vMove,this);var i=this;this.resize_listener=function(){i.__resize()},t(window).on("resize",this.resize_listener),this.thumbSize=this.thumbs[0][this.__jdimen](!0),this.setupSwipe(),this.__resize();i=this;this.options.wheel&&(this.wheellistener=function(t){var e=window.event||t.orginalEvent||t,s=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));return i.controller.push(10*-s),!1},window.MSBrowserInfo.mozilla?this.$element[0].addEventListener("DOMMouseScroll",this.wheellistener):this.$element.on("mousewheel",this.wheellistener)),this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.slider.api.addEventListener(MSSliderEvent.HARD_UPDATE,this.realignThumbs,this),this.cindex=this.slider.api.index(),this.select(this.thumbs[this.cindex])},e._hMove=function(t,i){this.__contPos=i,window._cssanim?this.$thumbscont[0].style[window._jcsspfx+"Transform"]="translateX("+-i+"px)"+this.__translate_end:this.$thumbscont[0].style.left=-i+"px"},e._vMove=function(t,i){this.__contPos=i,window._cssanim?this.$thumbscont[0].style[window._jcsspfx+"Transform"]="translateY("+-i+"px)"+this.__translate_end:this.$thumbscont[0].style.top=-i+"px"},e.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element),this.swipeControl.swipeType="h"===this.options.dir?"horizontal":"vertical";var t=this;"h"===this.options.dir?this.swipeControl.onSwipe=function(i){t.horizSwipeMove(i)}:this.swipeControl.onSwipe=function(i){t.vertSwipeMove(i)}},e.vertSwipeMove=function(t){if(!this.dTouch){var i=t.phase;if("start"===i)this.controller.stop();else if("move"===i)this.controller.drag(t.moveY);else if("end"===i||"cancel"===i){Math.abs(t.distanceY/t.duration*50/3)>.1?this.controller.push(-t.distanceY/t.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},e.horizSwipeMove=function(t){if(!this.dTouch){var i=t.phase;if("start"===i)this.controller.stop(),this.click_enable=!1;else if("move"===i)this.controller.drag(t.moveX);else if("end"===i||"cancel"===i){Math.abs(t.distanceX/t.duration*50/3)>.1?this.controller.push(-t.distanceX/t.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},e.update=function(){var t=this.slider.api.index();this.cindex!==t&&(null!=this.cindex&&this.unselect(this.thumbs[this.cindex]),this.cindex=t,this.select(this.thumbs[this.cindex]),this.dTouch||this.updateThumbscroll())},e.realignThumbs=function(){this.$element.find(".ms-thumb").each(function(t,i){i.aligner&&i.aligner.align()})},e.updateThumbscroll=function(){var t=this.thumbSize*this.cindex;if(NaN==this.controller.value&&(this.controller.value=0),t-this.controller.value<0)this.controller.gotoSnap(this.cindex,!0);else if(t+this.thumbSize-this.controller.value>this.$element[this.__dimen]()){var i=this.cindex-Math.floor(this.$element[this.__dimen]()/this.thumbSize)+1;this.controller.gotoSnap(i,!0)}else;},e.changeSlide=function(t){this.click_enable&&this.cindex!==t[0].index&&this.slider.api.gotoSlide(t[0].index)},e.unselect=function(t){t.removeClass("ms-thumb-frame-selected")},e.select=function(t){t.addClass("ms-thumb-frame-selected")},e.__resize=function(){var t=this.$element[this.__dimen]();if(this.ls!==t){this.ls=t,this.thumbSize=this.thumbs[0][this.__jdimen](!0);var i=this.slider.api.count()*this.thumbSize;this.$thumbscont[0].style[this.__dimen]=i+"px",i<=t?(this.dTouch=!0,this.controller.stop(),this.$thumbscont[0].style[this.__pos]=.5*(t-i)+"px",this.$thumbscont[0].style[window._jcsspfx+"Transform"]=""):(this.dTouch=!1,this.click_enable=!0,this.$thumbscont[0].style[this.__pos]="",this.controller._max_value=i-t,this.controller.options.snapsize=this.thumbSize,this.updateThumbscroll())}},e.destroy=function(){s.destroy(),this.options.wheel&&(window.MSBrowserInfo.mozilla?this.$element[0].removeEventListener("DOMMouseScroll",this.wheellistener):this.$element.off("mousewheel",this.wheellistener),this.wheellistener=null),t(window).off("resize",this.resize_listener),this.$element.remove(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)},window.MSThumblist=i,MSSlideController.registerControl("thumblist",i)}(jQuery),function(t){"use strict";var i=function(i){BaseControl.call(this),this.options.dir="h",this.options.inset=!0,this.options.margin=10,this.options.space=10,t.extend(this.options,i),this.bullets=[]};i.extend(BaseControl);var e=i.prototype,s=BaseControl.prototype;e.setup=function(){if(s.setup.call(this),this.$element=t("
").addClass(this.options.prefix+"bullets").addClass("ms-dir-"+this.options.dir).appendTo(this.cont),this.$bullet_cont=t("
").addClass("ms-bullets-count").appendTo(this.$element),!this.options.insetTo&&this.options.align){var i=this.options.align;this.options.inset&&this.$element.css(i,this.options.margin)}this.checkHideUnder()},e.create=function(){s.create.call(this);var i=this;this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.cindex=this.slider.api.index();for(var e=0;e").addClass("ms-bullet");n[0].index=e,n.on("click",function(){i.changeSlide(this.index)}),this.$bullet_cont.append(n),this.bullets.push(n),"h"===this.options.dir?n.css("margin",this.options.space/2):n.css("margin",this.options.space)}"h"===this.options.dir?this.$element.width(n.outerWidth(!0)*this.slider.api.count()):this.$element.css("margin-top",-this.$element.outerHeight(!0)/2),this.select(this.bullets[this.cindex])},e.update=function(){var t=this.slider.api.index();this.cindex!==t&&(null!=this.cindex&&this.unselect(this.bullets[this.cindex]),this.cindex=t,this.select(this.bullets[this.cindex]))},e.changeSlide=function(t){this.cindex!==t&&this.slider.api.gotoSlide(t)},e.unselect=function(t){t.removeClass("ms-bullet-selected")},e.select=function(t){t.addClass("ms-bullet-selected")},e.destroy=function(){s.destroy(),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.$element.remove()},window.MSBulltes=i,MSSlideController.registerControl("bullets",i)}(jQuery),function(t){"use strict";var i=function(i){BaseControl.call(this),this.options.dir="h",this.options.autohide=!0,this.options.width=4,this.options.color="#3D3D3D",this.options.margin=10,t.extend(this.options,i),this.__dimen="h"===this.options.dir?"width":"height",this.__jdimen="h"===this.options.dir?"outerWidth":"outerHeight",this.__pos="h"===this.options.dir?"left":"top",this.__translate_end=window._css3d?" translateZ(0px)":"",this.__translate_start="h"===this.options.dir?" translateX(":"translateY("};i.extend(BaseControl);var e=i.prototype,s=BaseControl.prototype;e.setup=function(){if(this.$element=t("
").addClass(this.options.prefix+"sbar").addClass("ms-dir-"+this.options.dir),s.setup.call(this),this.slider.$controlsCont===this.cont?this.$element.appendTo(this.slider.$element):this.$element.appendTo(this.cont),this.$bar=t("
").addClass(this.options.prefix+"bar").appendTo(this.$element),this.slider.options.loop&&(console.warn("WARNING, MSScrollbar cannot work with looped slider."),this.disable=!0,this.$element.remove()),"v"===this.options.dir?this.$bar.width(this.options.width):this.$bar.height(this.options.width),this.$bar.css("background-color",this.options.color),!this.options.insetTo&&this.options.align){"v"===this.options.dir?this.$element.css({right:"auto",left:"auto"}):this.$element.css({top:"auto",bottom:"auto"});var i=this.options.align;this.options.inset?this.$element.css(i,this.options.margin):"top"===i?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===i?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align())}this.checkHideUnder()},e.align=function(t){if(!this.detached){var i=this.options.align,e=this.slider.reserveSpace(i,2*this.options.margin+this.options.width);this.$element.css(i,-e-this.options.margin-this.options.width)}},e.create=function(){if(!this.disable){this.scroller=this.slider.api.scroller,this.slider.api.view.addEventListener(MSViewEvents.SCROLL,this._update,this),this.slider.api.addEventListener(MSSliderEvent.RESIZE,this._resize,this),this._resize(),this.options.autohide&&this.$bar.css("opacity","0")}},e._resize=function(){this.vdimen=this.$element[this.__dimen](),this.bar_dimen=this.slider.api.view["__"+this.__dimen]*this.vdimen/this.scroller._max_value,this.$bar[this.__dimen](this.bar_dimen)},e._update=function(){var t=this.scroller.value*(this.vdimen-this.bar_dimen)/this.scroller._max_value;if(this.lvalue!==t){if(this.lvalue=t,this.options.autohide){clearTimeout(this.hto),this.$bar.css("opacity","1");var i=this;this.hto=setTimeout(function(){i.$bar.css("opacity","0")},150)}t<0?this.$bar[0].style[this.__dimen]=this.bar_dimen+t+"px":(t>this.vdimen-this.bar_dimen&&(this.$bar[0].style[this.__dimen]=this.vdimen-t+"px"),window._cssanim?this.$bar[0].style[window._jcsspfx+"Transform"]=this.__translate_start+t+"px)"+this.__translate_end:this.$bar[0].style[this.__pos]=t+"px")}},e.destroy=function(){s.destroy(),this.slider.api.view.removeEventListener(MSViewEvents.SCROLL,this._update,this),this.slider.api.removeEventListener(MSSliderEvent.RESIZE,this._resize,this),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.$element.remove()},window.MSScrollbar=i,MSSlideController.registerControl("scrollbar",i)}(jQuery),function(t){"use strict";var i=function(i){BaseControl.call(this),this.options.autohide=!1,this.options.width=4,this.options.color="#FFFFFF",this.options.inset=!0,this.options.margin=0,t.extend(this.options,i)};i.extend(BaseControl);var e=i.prototype,s=BaseControl.prototype;e.setup=function(){if(s.setup.call(this),this.$element=t("
").addClass(this.options.prefix+"timerbar"),s.setup.call(this),this.slider.$controlsCont===this.cont?this.$element.appendTo(this.slider.$element):this.$element.appendTo(this.cont),this.$bar=t("
").addClass("ms-time-bar").appendTo(this.$element),"v"===this.options.dir?(this.$bar.width(this.options.width),this.$element.width(this.options.width)):(this.$bar.height(this.options.width),this.$element.height(this.options.width)),this.$bar.css("background-color",this.options.color),!this.options.insetTo&&this.options.align){this.$element.css({top:"auto",bottom:"auto"});var i=this.options.align;this.options.inset?this.$element.css(i,this.options.margin):"top"===i?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===i?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align())}this.checkHideUnder()},e.align=function(t){if(!this.detached){var i=this.options.align,e=this.slider.reserveSpace(i,2*this.options.margin+this.options.width);this.$element.css(i,-e-this.options.margin-this.options.width)}},e.create=function(){s.create.call(this),this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this),this._update()},e._update=function(){this.$bar[0].style.width=this.slider.api._delayProgress+"%"},e.destroy=function(){s.destroy(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this),this.$element.remove()},window.MSTimerbar=i,MSSlideController.registerControl("timebar",i)}(jQuery),function(t){"use strict";var i=function(i){BaseControl.call(this),this.options.color="#A2A2A2",this.options.stroke=10,this.options.radius=4,this.options.autohide=!1,t.extend(this.options,i)};i.extend(BaseControl);var e=i.prototype,s=BaseControl.prototype;e.setup=function(){if(s.setup.call(this),this.$element=t("
").addClass(this.options.prefix+"ctimer").appendTo(this.cont),this.$canvas=t("").addClass("ms-ctimer-canvas").appendTo(this.$element),this.$bar=t("
").addClass("ms-ctimer-bullet").appendTo(this.$element),!this.$canvas[0].getContext)return this.destroy(),void(this.disable=!0);this.ctx=this.$canvas[0].getContext("2d"),this.prog=0,this.__w=2*(this.options.radius+this.options.stroke/2),this.$canvas[0].width=this.__w,this.$canvas[0].height=this.__w,this.checkHideUnder()},e.create=function(){if(!this.disable){s.create.call(this),this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this);var t=this;this.$element.on("click",function(){t.slider.api.paused?t.slider.api.resume():t.slider.api.pause()}),this._update()}},e._update=function(){var i=this;t(this).stop(!0).animate({prog:.01*this.slider.api._delayProgress},{duration:200,step:function(){i._draw()}})},e._draw=function(){this.ctx.clearRect(0,0,this.__w,this.__w),this.ctx.beginPath(),this.ctx.arc(.5*this.__w,.5*this.__w,this.options.radius,1.5*Math.PI,1.5*Math.PI+2*Math.PI*this.prog,!1),this.ctx.strokeStyle=this.options.color,this.ctx.lineWidth=this.options.stroke,this.ctx.stroke()},e.destroy=function(){s.destroy(),this.disable||(t(this).stop(!0),this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this),this.$element.remove())},window.MSCircleTimer=i,MSSlideController.registerControl("circletimer",i)}(jQuery),function(t){"use strict";window.MSSlideInfo=function(i){BaseControl.call(this,i),this.options.autohide=!1,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.size=100,this.options.dir="h",t.extend(this.options,i),this.data_list=[]},MSSlideInfo.fadeDuratation=400,MSSlideInfo.extend(BaseControl);var i=MSSlideInfo.prototype,e=BaseControl.prototype;i.setup=function(){if(this.$element=t("
").addClass(this.options.prefix+"slide-info").addClass("ms-dir-"+this.options.dir),e.setup.call(this),this.slider.$controlsCont===this.cont?this.$element.appendTo(this.slider.$element):this.$element.appendTo(this.cont),!this.options.insetTo&&this.options.align){var i=this.options.align;this.options.inset?this.$element.css(i,this.options.margin):"top"===i?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===i?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.size):this.$element.css("min-height",this.options.size)}this.checkHideUnder()},i.align=function(t){if(!this.detached){var i=this.options.align,e=this.slider.reserveSpace(i,this.options.size+2*this.options.margin);this.$element.css(i,-e-this.options.size-this.options.margin)}},i.slideAction=function(i){var e=t(i.$element.find(".ms-info"));e.detach(),this.data_list[i.index]=e},i.create=function(){e.create.call(this),this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.cindex=this.slider.api.index(),this.switchEle(this.data_list[this.cindex])},i.update=function(){var t=this.slider.api.index();this.switchEle(this.data_list[t]),this.cindex=t},i.switchEle=function(t){if(this.current_ele){this.current_ele[0].tween&&this.current_ele[0].tween.stop(!0),this.current_ele[0].tween=CTween.animate(this.current_ele,MSSlideInfo.fadeDuratation,{opacity:0},{complete:function(){this.detach(),this[0].tween=null,t.css("position","relative")},target:this.current_ele}),t.css("position","absolute")}this.__show(t)},i.__show=function(t){t.appendTo(this.$element).css("opacity","0"),this.current_ele&&t.height(Math.max(t.height(),this.current_ele.height())),clearTimeout(this.tou),this.tou=setTimeout(function(){CTween.fadeIn(t,MSSlideInfo.fadeDuratation),t.css("height","")},MSSlideInfo.fadeDuratation),t[0].tween&&t[0].tween.stop(!0),this.current_ele=t},i.destroy=function(){e.destroy(),clearTimeout(this.tou),this.current_ele&&this.current_ele[0].tween&&this.current_ele[0].tween.stop("true"),this.$element.remove(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)},MSSlideController.registerControl("slideinfo",MSSlideInfo)}(jQuery),function(t,i,e){var s=0,n=t(e),o=t(i);if(e.MasterSlider){var h=function(t){this.PId=s++,this.slider=t,this.$slider=t.$element,this.slider.options.startOnAppear&&(t.holdOn(),o.ready(this.init.bind(this)))};h.name="MSStartOnAppear";var r=h.prototype;r.init=function(){this.slider.api;n.on("scroll.soa"+this.PId,this._onScroll.bind(this)).trigger("scroll")},r._onScroll=function(){var t=n.scrollTop()+n.height();this.$slider.offset().top'),e.$scrollParallaxCont=e.layerController.$layers.parent());t(window).on("scroll",{that:this},this.moveParallax).trigger("scroll")},i.resetLayers=function(t){if(this.lastSlide){var i=this.lastSlide.$scrollParallaxCont;window._css2d?(i&&(i[0].style[window._jcsspfx+"Transform"]=""),this.lastSlide.hasBG&&(this.lastSlide.$imgcont[0].style[window._jcsspfx+"Transform"]="")):(i&&(i[0].style.top=""),this.lastSlide.hasBG&&(this.lastSlide.$imgcont[0].style.top="0px"))}},i.updateCurrentSlide=function(t){this.lastSlide=this.currentSlide,this.currentSlide=this.slider.api.currentSlide,this.moveParallax({data:{that:this}})},i.moveParallax=function(i){var e=i.data.that,s=e.slider,n=e.sliderOffset,o=t(window).scrollTop(),h=e.currentSlide.$scrollParallaxCont,r=n-o;r<=0?(h&&(window._css3d?h[0].style[window._jcsspfx+"Transform"]="translateY("+-r*e.parallax+"px) translateZ(0.4px)":window._css2d?h[0].style[window._jcsspfx+"Transform"]="translateY("+-r*e.parallax+"px)":h[0].style.top=-r*e.parallax+"px"),e.updateSlidesBG(-r*e.bgparallax+"px",!0),h&&e.fade&&h.css("opacity",1-Math.min(1,-r/s.api.height))):(h&&(window._css2d?h[0].style[window._jcsspfx+"Transform"]="":h[0].style.top=""),e.updateSlidesBG("0px",!1),h&&e.fade&&h.css("opacity",1))},i.updateSlidesBG=function(t,i){for(var e=this.slider.api.view.slideList,s=!i||window.MSBrowserInfo.msie||window.MSBrowserInfo.opera?"":"fixed",n=0,o=e.length;n!==o;n++)e[n].hasBG&&(e[n].$imgcont[0].style.position=s,e[n].$imgcont[0].style.top=t),e[n].$bgvideocont&&(e[n].$bgvideocont[0].style.position=s,e[n].$bgvideocont[0].style.top=t)},i.destory=function(){slider.api.removeEventListener(MSSliderEvent.INIT,this.init,this),slider.api.removeEventListener(MSSliderEvent.DESTROY,this.destory,this),slider.api.removeEventListener(MSSliderEvent.CHANGE_END,this.resetLayers,this),slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.updateCurrentSlide,this),t(window).off("scroll",this.moveParallax)}}(jQuery); //# sourceMappingURL=masterslider.min.js.map