
/*
	* LayerSlider Add-On: Popups
	*
	* (c) 2011-2026 George Krupa, John Gera & Kreatura Media
	*
	* LayerSlider home:		https://layerslider.com/popups/
	* Licensing:			https://layerslider.com/licensing/
*/



;!function(t){window._layerSlider.plugins.popup=function(e,s,i,n){var o=this,a={startInViewport:!1,playByScroll:!1,allowFullscreen:!1,insertSelector:null,performanceMode:!1,scene:!1,marginTop:!1,marginBottom:!1},l=window._lsData;o.pluginData={name:"Popups Add-On for LayerSlider",version:"2.4",requiredLSVersion:"8.3.0",authorName:"Kreatura",releaseDate:"2026. 07. 22."},o.pluginDefaults={eventNamespace:"PU",keys:{popupShowOnClick:["plugin","settings"],popupShowOnScroll:["plugin","settings"],popupShowOnLeave:["plugin","settings"],popupShowOnIdle:["plugin","settings"],popupShowOnTimeout:["plugin","settings"],popupShowOnce:["plugin","settings"],popupCloseOnScroll:["plugin","settings"],popupCloseOnTimeout:["plugin","settings"],popupCloseOnSliderEnd:["plugin","settings"],popupCloseOnEsc:["plugin","settings"],popupShowCloseButton:["plugin","settings"],popupCloseButtonStyle:["plugin","settings"],popupResetOnClose:["plugin","settings"],popupDisableOverlay:["plugin","settings"],popupOverlayClickToClose:["plugin","settings"],popupStartSliderImmediately:["plugin","settings"],popupWidth:["popup","styleSettings"],popupHeight:["popup","styleSettings"],popupFitWidth:["popup","styleSettings"],popupFitHeight:["popup","styleSettings"],popupCustomStyle:["popup","styleSettings"],popupPositionHorizontal:["popup","styleSettings"],popupPositionVertical:["popup","styleSettings"],popupDistanceLeft:["popup","styleSettings"],popupDistanceRight:["popup","styleSettings"],popupDistanceTop:["popup","styleSettings"],popupDistanceBottom:["popup","styleSettings"],popupDurationIn:["popup","transitionSettings"],popupDurationOut:["popup","transitionSettings"],popupDelayIn:["popup","transitionSettings"],popupEaseIn:["popup","transitionSettings"],popupEaseOut:["popup","transitionSettings"],popupTransitionIn:["popup","transitionSettings"],popupTransitionOut:["popup","transitionSettings"],popupCustomTransitionIn:["popup","transitionSettings"],popupCustomTransitionOut:["popup","transitionSettings"],popupOverlayBackground:["overlay","styleSettings"],popupOverlayDurationIn:["overlay","transitionSettings"],popupOverlayDurationOut:["overlay","transitionSettings"],popupOverlayEaseIn:["overlay","transitionSettings"],popupOverlayEaseOut:["overlay","transitionSettings"],popupOverlayTransitionIn:["overlay","transitionSettings"],popupOverlayTransitionOut:["overlay","transitionSettings"]}},o.state={initialized:!1,openedAtLeastOnce:!1,is:null},o.init=function(){var t,s,i;for(var n in o.pluginDefaults.keys)t=o[o.pluginDefaults.keys[n][0]][o.pluginDefaults.keys[n][1]],e.o.hasOwnProperty(n)&&(s=(s=n.split("popup")[1]).substr(0,1).toLowerCase()+s.substr(1),e.o[n]!==t[s]&&(-1!==(i=s.toLowerCase()).indexOf("ease")&&(e.o[n]=e.functions.convert.easing(e.o[n])),-1===i.indexOf("duration")&&-1===i.indexOf("delay")||"number"!=typeof e.o[n]||(e.o[n]/=1e3),t[s]=e.o[n]));o.plugin.setOptions(),o.slider.setOptions(),o.popup.createMarkup(),o.popup.setStyles(),o.popup.setTransitions(),o.slider.setStyles(),o.overlay.createMarkup(),o.overlay.setTransitions(),o.events.set(),o.state.initialized=!0},o.plugin={settings:{showOnClick:!1,showOnScroll:!1,showOnLeave:!1,showOnIdle:!1,showOnTimeout:!1,closeOnScroll:!1,closeOnTimeout:!1,closeOnSliderEnd:!1,closeOnEsc:!1,showOnce:!0,disableOverlay:!1,showCloseButton:!0,closeButtonStyle:"",overlayClickToClose:!0,startSliderImmediately:!1,resetOnClose:"slide"},setOptions:function(){this.settings.$clickTriggerElements=t(this.settings.showOnClick).add('[data-ls-popup-trigger-for="'+s.attr("id")+'"], [href="#'+s.attr("id")+'"], .'+s.attr("id")),t('[href="#'+s.attr("id")+'"]').on("click."+o.pluginDefaults.eventNamespace+i,function(t){t.preventDefault()}),s[0].style.width&&-1!==s[0].style.width.indexOf("px")&&!e.o.popupWidth&&(o.popup.styleSettings.width=parseInt(s[0].style.width)),s[0].style.height&&-1!==s[0].style.height.indexOf("px")&&!e.o.popupHeight&&(o.popup.styleSettings.height=parseInt(s[0].style.height)),!e.o.popupPositionHorizontal||"left"!==e.o.popupPositionHorizontal&&"right"!==e.o.popupPositionHorizontal||(o.popup.styleSettings.positionHorizontal=e.o.popupPositionHorizontal),"fullwidth"===e.o.type&&(o.popup.styleSettings.positionHorizontal="left"),!e.o.popupPositionVertical||"top"!==e.o.popupPositionVertical&&"bottom"!==e.o.popupPositionVertical||(o.popup.styleSettings.positionVertical=e.o.popupPositionVertical),e.o.popupDistanceLeft&&(o.popup.styleSettings.distanceLeft=e.o.popupDistanceLeft),e.o.popupDistanceRight&&(o.popup.styleSettings.distanceRight=e.o.popupDistanceRight),e.o.popupDistanceTop&&(o.popup.styleSettings.distanceTop=e.o.popupDistanceTop),e.o.popupDistanceBottom&&(o.popup.styleSettings.distanceBottom=e.o.popupDistanceBottom),o.plugin.settings.closeOnSliderEnd&&s.on("slideChangeWillStart.layerSlider",function(t,e){if(e.slides.current.index===e.slides.count)return o.events.hide(),!1})}},o.overlay={styleSettings:{overlayBackground:"rgba(0,0,0,.85)"},transitionSettings:{overlayDurationIn:.4,overlayDurationOut:.4,overlayEaseIn:e.gsap.Quint.easeIn,overlayEaseOut:e.gsap.Quint.easeIn,overlayTransitionIn:"fade",overlayTransitionOut:"fade"},createMarkup:function(){o.$overlay=t("<div>").addClass("ls-popup-overlay").css({background:this.styleSettings.overlayBackground}).insertBefore(o.$popup)},setTransitions:function(){this.transitionSettings.styleInFrom={opacity:1,display:"block"},this.transitionSettings.styleInTo={ease:this.transitionSettings.overlayEaseIn,opacity:1,x:0,y:0,z:0,rotation:0,rotationX:0,rotationY:0,scaleX:1,scaleY:1,skewX:0,skewY:0,borderRadius:0},this.transitionSettings.styleOutTo={ease:this.transitionSettings.overlayEaseOut,onComplete:function(){e.gsap.TweenMax.set(o.$overlay[0],{display:"none",x:0,y:0,opacity:0})}}},show:function(){switch(this.transitionSettings.overlayTransitionIn.toLowerCase()){default:case"fade":this.transitionSettings.styleInFrom.opacity=0;break;case"slidefromtop":this.transitionSettings.styleInFrom.y=-l.viewport.height;break;case"slidefrombottom":this.transitionSettings.styleInFrom.y=l.viewport.height;break;case"slidefromleft":this.transitionSettings.styleInFrom.x=-l.viewport.width;break;case"slidefromright":this.transitionSettings.styleInFrom.x=l.viewport.width;break;case"fadefromtopleft":this.transitionSettings.styleInFrom.x=-l.viewport.width,this.transitionSettings.styleInFrom.y=-l.viewport.height,this.transitionSettings.styleInFrom.opacity=0;break;case"fadefromtopright":this.transitionSettings.styleInFrom.x=l.viewport.width,this.transitionSettings.styleInFrom.y=-l.viewport.height,this.transitionSettings.styleInFrom.opacity=0;break;case"fadefrombottomleft":this.transitionSettings.styleInFrom.x=-l.viewport.width,this.transitionSettings.styleInFrom.y=l.viewport.height,this.transitionSettings.styleInFrom.opacity=0;break;case"fadefrombottomright":this.transitionSettings.styleInFrom.x=l.viewport.width,this.transitionSettings.styleInFrom.y=l.viewport.height,this.transitionSettings.styleInFrom.opacity=0;break;case"scale":this.transitionSettings.styleInFrom.scaleX=0,this.transitionSettings.styleInFrom.scaleY=0}e.gsap.TweenMax.fromTo(o.$overlay[0],this.transitionSettings.overlayDurationIn,this.transitionSettings.styleInFrom,this.transitionSettings.styleInTo)},hide:function(){switch(this.transitionSettings.overlayTransitionOut.toLowerCase()){default:case"fade":this.transitionSettings.styleOutTo.opacity=0;break;case"slidetotop":this.transitionSettings.styleOutTo.y=-l.viewport.height;break;case"slidetobottom":this.transitionSettings.styleOutTo.y=l.viewport.height;break;case"slidetoleft":this.transitionSettings.styleOutTo.x=-l.viewport.width;break;case"slidetoright":this.transitionSettings.styleOutTo.x=l.viewport.width;break;case"fadetotopleft":this.transitionSettings.styleOutTo.x=-l.viewport.width,this.transitionSettings.styleOutTo.y=-l.viewport.height,this.transitionSettings.styleOutTo.opacity=0;break;case"fadetotopright":this.transitionSettings.styleOutTo.x=l.viewport.width,this.transitionSettings.styleOutTo.y=-l.viewport.height,this.transitionSettings.styleOutTo.opacity=0;break;case"fadetobottomleft":this.transitionSettings.styleOutTo.x=-l.viewport.width,this.transitionSettings.styleOutTo.y=l.viewport.height,this.transitionSettings.styleOutTo.opacity=0;break;case"fadetobottomright":this.transitionSettings.styleOutTo.x=l.viewport.width,this.transitionSettings.styleOutTo.y=l.viewport.height,this.transitionSettings.styleOutTo.opacity=0;break;case"scale":this.transitionSettings.styleOutTo.scaleX=0,this.transitionSettings.styleOutTo.scaleY=0}e.gsap.TweenMax.to(o.$overlay[0],this.transitionSettings.overlayDurationOut,this.transitionSettings.styleOutTo)}},o.popup={styleSettings:{width:640,height:360,fitWidth:!1,fitHeight:!1,customStyle:"",positionHorizontal:"center",positionVertical:"middle",distanceLeft:10,distanceRight:10,distanceTop:10,distanceBottom:10},transitionSettings:{durationIn:1,durationOut:.5,delayIn:.2,easeIn:e.gsap.Quint.easeInOut,easeOut:e.gsap.Quint.easeIn,transitionIn:"fade",transitionOut:"fade",customTransitionIn:!1,customTransitionOut:!1},createMarkup:function(){var e;e=s.parent().is(".ls-popup")?s.parent():t('<div class="ls-popup">'),t("body").append(e.append(t('<div class="ls-popup-inner">').append(s))),s.attr("style",s.attr("style")+"; "+o.popup.styleSettings.customStyle),o.$inner=s.parent(),o.$popup=o.$inner.parent(),o.plugin.settings.showCloseButton&&s.append('<div class="ls-popup-close-button" style="'+o.plugin.settings.closeButtonStyle+'"></div>')},setStyles:function(){o.$popup.css({left:o.popup.styleSettings.distanceLeft,right:o.popup.styleSettings.distanceRight,top:o.popup.styleSettings.distanceTop,bottom:o.popup.styleSettings.distanceBottom}),o.$inner.css({maxWidth:e.slider.initial?e.slider.initial.maxWidth:s[0].style.maxWidth||s.css("max-width"),maxHeight:e.slider.initial&&e.slider.initial.maxHeight?e.slider.initial.maxHeight:s[0].style.maxHeight||s.css("max-height"),width:o.popup.styleSettings.width,height:o.popup.styleSettings.height})},setTransitions:function(){this.transitionSettings.styleInFrom={transformPerspective:500,transformOrigin:"50% 50%"},"object"==typeof this.transitionSettings.customTransitionIn&&(this.transitionSettings.styleInFrom=t.extend({},this.transitionSettings.styleInFrom,this.transitionSettings.customTransitionIn)),this.transitionSettings.styleInTo={opacity:1,x:0,y:0,z:0,rotation:0,rotationX:0,rotationY:0,scaleX:1,scaleY:1,skewX:0,skewY:0,delay:this.transitionSettings.delayIn,ease:this.transitionSettings.easeIn,onStart:function(){e.layers.get("active").filter("[data-countdown]").each(function(){var s=t(this),i=s.data(e.defaults.init.dataKey);i.is.countdown&&e.countdown.startInterval(s,i.countdownSettings)}),o.state.is="opening",o.plugin.settings.startSliderImmediately&&s.layerSlider("resumePopup")},onComplete:function(){e.api.hasEvent("popupDidOpen")&&e.api.triggerEvent("popupDidOpen",e.api.eventData()),o.state.openedAtLeastOnce=!0,o.state.is="opened",e.slider.state.popupShouldStart=!0,(!o.plugin.settings.startSliderImmediately||o.plugin.settings.startSliderImmediately&&0===o.popup.transitionSettings.durationIn)&&s.layerSlider("resumePopup"),"number"==typeof o.plugin.settings.closeOnTimeout&&setTimeout(function(){o.events.hide()},1e3*o.plugin.settings.closeOnTimeout),(o.plugin.settings.showOnScroll||o.plugin.settings.closeOnScroll)&&o.events.checkScrollPositions()}},this.transitionSettings.styleOutTo={ease:this.transitionSettings.easeOut,transformOrigin:"50% 50%",onStart:function(){o.state.is="closing"},onComplete:function(){e.layers.get("countdown").each(function(){var s=t(this).data(e.defaults.init.dataKey);s.is.countdown&&e.countdown.stopInterval(s.countdownSettings)}),o.plugin.settings.startSliderImmediately&&s.layerSlider("pause"),o.$popup.removeClass("ls-popup-visible"),e.slider.state.popupIsVisible=!1,e.slider.state.popupShouldStart=!1,o.plugin.settings.showOnce?(e.api.hasEvent("popupDidClose")&&e.api.triggerEvent("popupDidClose",e.api.eventData()),o.events.destroy()):(e.gsap.TweenMax.set(s[0],{opacity:1,x:0,y:0,z:0,rotation:0,rotationX:0,rotationY:0,scaleX:1,scaleY:1,skewX:0,skewY:0}),o.plugin.settings.resetOnClose&&s.layerSlider("resetSlide"),"slider"===o.plugin.settings.resetOnClose&&(s.layerSlider("fastChangeTo",1),e.slideshow.state.pausedByLastCycle&&(e.slideshow.state.pausedByLastCycle=!1,e.slideshow.state.paused=!1,e.slideshow.state.running=!0)),(o.plugin.settings.showOnScroll||o.plugin.settings.closeOnScroll)&&o.events.checkScrollPositions(),e.api.hasEvent("popupDidClose")&&e.api.triggerEvent("popupDidClose",e.api.eventData())),e.slides[e.slides.current.index||1].data.hasSmartBG&&(e.transitions.layers.timeline.forceRestart=!0),o.state.is="closed"}},"object"==typeof this.transitionSettings.customTransitionOut&&(this.transitionSettings.styleOutTo=t.extend({},this.transitionSettings.styleOutTo,this.transitionSettings.customTransitionOut))},show:function(){if(e.slider.shouldResize=!0,e.slider.state.popupIsVisible=!0,e.slider.state.popupShouldStart=!!o.plugin.settings.startSliderImmediately,o.$popup.addClass("ls-popup-visible"),t(window).trigger("resize."+i),o.events.resize(),"object"!=typeof this.transitionSettings.customTransitionIn)switch(this.transitionSettings.transitionIn.toLowerCase()){default:case"fade":this.transitionSettings.styleInFrom.opacity=0;break;case"slidefromtop":this.transitionSettings.styleInFrom.y=l.scroll.top-(e.slider.height+e.slider.offset.top);break;case"slidefrombottom":this.transitionSettings.styleInFrom.y=l.scroll.top+l.viewport.height-e.slider.offset.top;break;case"slidefromleft":this.transitionSettings.styleInFrom.x=l.scroll.left-(e.slider.width+e.slider.offset.left);break;case"slidefromright":this.transitionSettings.styleInFrom.x=l.scroll.left+l.viewport.width-e.slider.offset.left;break;case"rotatefromtop":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.y=-e.slider.height/2,this.transitionSettings.styleInFrom.rotationX=30,this.transitionSettings.styleInTo.ease=e.gsap.Quint.easeOut;break;case"rotatefrombottom":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.y=e.slider.height/2,this.transitionSettings.styleInFrom.rotationX=-30,this.transitionSettings.styleInTo.ease=e.gsap.Quint.easeOut;break;case"rotatefromleft":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.x=-e.slider.width/2,this.transitionSettings.styleInFrom.rotationY=-30,this.transitionSettings.styleInTo.ease=e.gsap.Quint.easeOut;break;case"rotatefromright":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.x=e.slider.width/2,this.transitionSettings.styleInFrom.rotationY=30,this.transitionSettings.styleInTo.ease=e.gsap.Quint.easeOut;break;case"scalefromtop":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.scaleY=1.5,this.transitionSettings.styleInFrom.y=-e.slider.height/4,this.transitionSettings.styleInFrom.transformOrigin="50% 100%",this.transitionSettings.styleInTo.ease=e.gsap.Back.easeOut;break;case"scalefrombottom":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.scaleY=1.5,this.transitionSettings.styleInFrom.y=e.slider.height/4,this.transitionSettings.styleInFrom.transformOrigin="50% 0",this.transitionSettings.styleInTo.ease=e.gsap.Back.easeOut;break;case"scalefromleft":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.scaleX=1.5,this.transitionSettings.styleInFrom.x=-e.slider.width/4,this.transitionSettings.styleInFrom.transformOrigin="100% 50%",this.transitionSettings.styleInTo.ease=e.gsap.Back.easeOut;break;case"scalefromright":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.scaleX=1.5,this.transitionSettings.styleInFrom.x=e.slider.width/4,this.transitionSettings.styleInFrom.transformOrigin="0 50%",this.transitionSettings.styleInTo.ease=e.gsap.Back.easeOut;break;case"scale":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.scaleX=.5,this.transitionSettings.styleInFrom.scaleY=.5;break;case"spin":this.transitionSettings.styleInFrom.rotation=360,this.transitionSettings.styleInFrom.scaleX=0,this.transitionSettings.styleInFrom.scaleY=0,this.transitionSettings.styleInTo.ease=e.gsap.Quart.easeOut;break;case"spinx":this.transitionSettings.styleInFrom.rotationX=360,this.transitionSettings.styleInFrom.scaleX=0,this.transitionSettings.styleInFrom.scaleY=0,this.transitionSettings.styleInTo.ease=e.gsap.Quart.easeOut;break;case"spiny":this.transitionSettings.styleInFrom.rotationY=360,this.transitionSettings.styleInFrom.scaleX=0,this.transitionSettings.styleInFrom.scaleY=0,this.transitionSettings.styleInTo.ease=e.gsap.Quart.easeOut;break;case"elastic":this.transitionSettings.styleInFrom.opacity=0,this.transitionSettings.styleInFrom.scaleX=1.2,this.transitionSettings.styleInFrom.scaleY=.8,this.transitionSettings.styleInTo.ease=e.gsap.Elastic.easeOut}s.css({transformOrigin:this.transitionSettings.styleInFrom.transformOrigin}),e.gsap.TweenMax.fromTo(s[0],this.transitionSettings.durationIn,this.transitionSettings.styleInFrom,this.transitionSettings.styleInTo)},hide:function(){if("object"!=typeof this.transitionSettings.customTransitionOut)switch(this.transitionSettings.transitionOut.toLowerCase()){default:case"fade":this.transitionSettings.styleOutTo.opacity=0;break;case"slidetotop":this.transitionSettings.styleOutTo.y=l.scroll.top-(e.slider.height+e.slider.offset.top);break;case"slidetobottom":this.transitionSettings.styleOutTo.y=l.scroll.top+l.viewport.height-e.slider.offset.top;break;case"slidetoleft":this.transitionSettings.styleOutTo.x=l.scroll.left-(e.slider.width+e.slider.offset.left);break;case"slidetoright":this.transitionSettings.styleOutTo.x=l.scroll.left+l.viewport.width-e.slider.offset.left;break;case"rotatetotop":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.y=-e.slider.height/2,this.transitionSettings.styleOutTo.rotationX=30,this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"rotatetobottom":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.y=e.slider.height/2,this.transitionSettings.styleOutTo.rotationX=-30,this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"rotatetoleft":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.x=-e.slider.width/2,this.transitionSettings.styleOutTo.rotationY=-30,this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"rotatetoright":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.x=e.slider.width/2,this.transitionSettings.styleOutTo.rotationY=30,this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"scale":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.scaleX=.5,this.transitionSettings.styleOutTo.scaleY=.5;break;case"scaletotop":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.scaleY=1.5,this.transitionSettings.styleOutTo.y=-e.slider.height/4,this.transitionSettings.styleOutTo.transformOrigin="50% 100%",this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"scaletobottom":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.scaleY=1.5,this.transitionSettings.styleOutTo.y=e.slider.height/4,this.transitionSettings.styleOutTo.transformOrigin="50% 0",this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"scaletoleft":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.scaleX=1.5,this.transitionSettings.styleOutTo.x=-e.slider.width/4,this.transitionSettings.styleOutTo.transformOrigin="100% 50%",this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"scaletoright":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.scaleX=1.5,this.transitionSettings.styleOutTo.x=e.slider.width/4,this.transitionSettings.styleOutTo.transformOrigin="0 50%",this.transitionSettings.styleOutTo.ease=e.gsap.Quint.easeIn;break;case"spin":this.transitionSettings.styleOutTo.rotation=360,this.transitionSettings.styleOutTo.scaleX=0,this.transitionSettings.styleOutTo.scaleY=0,this.transitionSettings.styleOutTo.ease=e.gsap.Quart.easeIn;break;case"spinx":this.transitionSettings.styleOutTo.rotationX=360,this.transitionSettings.styleOutTo.scaleX=0,this.transitionSettings.styleOutTo.scaleY=0,this.transitionSettings.styleOutTo.ease=e.gsap.Quart.easeIn;break;case"spiny":this.transitionSettings.styleOutTo.rotationY=360,this.transitionSettings.styleOutTo.scaleX=0,this.transitionSettings.styleOutTo.scaleY=0,this.transitionSettings.styleOutTo.ease=e.gsap.Quart.easeIn;break;case"elastic":this.transitionSettings.styleOutTo.opacity=0,this.transitionSettings.styleOutTo.scaleX=1.2,this.transitionSettings.styleOutTo.scaleY=.8,this.transitionSettings.styleOutTo.ease=e.gsap.Back.easeInOut}o.plugin.settings.startSliderImmediately||s.layerSlider("pause"),s.css({transformOrigin:this.transitionSettings.styleOutTo.transformOrigin}),e.gsap.TweenMax.to(s[0],this.transitionSettings.durationOut,this.transitionSettings.styleOutTo),e.slider.shouldResize=!1}},o.slider={setOptions:function(){e.o.popupFitWidth||e.o.popupFitHeight?(e.o.type="fullsize",e.o.fullSizeMode="fitheight",e.o.popupFitWidth&&!e.o.popupFitHeight&&s.css({maxHeight:o.popup.styleSettings.height}),e.o.popupFitHeight&&!e.o.popupFitWidth&&s.css({maxWidth:o.popup.styleSettings.width})):(e.o.type="responsive",s.css({maxWidth:o.popup.styleSettings.width,maxHeight:o.popup.styleSettings.height})),e.slider.isPopup=!0,t.extend(e.o,a),o.plugin.settings.closeOnEsc&&(window._layerSlider.closePopupsOnEsc[i]=!0)},setStyles:function(){var t={};switch(o.popup.styleSettings.positionHorizontal){case"left":t.left=0,t.right="auto";break;case"right":t.left="auto",t.right=0;break;case"center":t.left="50%",t.right="auto"}switch(o.popup.styleSettings.positionVertical){case"top":t.top=0,t.bottom="auto";break;case"bottom":t.top="auto",t.bottom=0;break;case"middle":t.top="50%",t.bottom="auto"}s.css(t)}},o.events={set:function(){s.on("sliderDidLoad.layerSlider",function(s,n){o.plugin.settings.$clickTriggerElements&&o.plugin.settings.$clickTriggerElements.length>0&&o.plugin.settings.$clickTriggerElements.on("click."+o.pluginDefaults.eventNamespace+i,function(e){if(e.preventDefault(),o.$popup.hasClass("ls-popup-visible"))o.events.hide();else{var s=t(this).data("ls-popup-slide");o.events.show(!(!s||!t.isNumeric(s))&&s)}}),(o.plugin.settings.showOnScroll||o.plugin.settings.closeOnScroll)&&(o.events.scrollDirection="down",o.events.lastScrollPosition=l.scroll.top,o.events.checkScrollPositions(),t(window).on("scroll."+o.pluginDefaults.eventNamespace+i,function(){(l.scroll.top>=o.events.lastScrollPosition&&"up"===o.events.scrollDirection||l.scroll.top<=o.events.lastScrollPosition&&"down"===o.events.scrollDirection&&0!==l.scroll.top)&&o.events.switchScrollDirection(),o.events.lastScrollPosition=l.scroll.top,o.events.scrollDirection===o.events.popupShouldShowTriggerAnEventByScrolling&&("auto"===o.plugin.settings.scrollPosition?e.slider.offset.top>l.scroll.top&&e.slider.offset.top<l.scroll.top+l.viewport.height?"down"===o.events.scrollDirection&&(e.slider.state.popupIsVisible?o.events.popupShouldHide=!0:o.events.popupShouldShow=!0):"up"===o.events.scrollDirection&&(e.slider.state.popupIsVisible?o.events.popupShouldHide=!0:o.events.popupShouldShow=!0):"number"==typeof o.plugin.settings.scrollPosition?l.scroll.top>=o.plugin.settings.scrollPosition?"down"===o.events.scrollDirection&&(e.slider.state.popupIsVisible?o.events.popupShouldHide=!0:o.events.popupShouldShow=!0):"up"===o.events.scrollDirection&&(e.slider.state.popupIsVisible?o.events.popupShouldHide=!0:o.events.popupShouldShow=!0):-1!==o.plugin.settings.scrollPosition.indexOf("%")&&(parseInt(l.scroll.top/((l.document.height-l.viewport.height)/100))>parseInt(o.plugin.settings.scrollPosition)?"down"===o.events.scrollDirection&&(e.slider.state.popupIsVisible?o.events.popupShouldHide=!0:o.events.popupShouldShow=!0):"up"===o.events.scrollDirection&&(e.slider.state.popupIsVisible?o.events.popupShouldHide=!0:o.events.popupShouldShow=!0))),o.events.popupShouldShow?(o.events.popupShouldShow=!1,o.events.show(),o.events.checkScrollPositions()):o.events.popupShouldHide&&(o.events.popupShouldHide=!1,o.events.hide())}),t(window).trigger("scroll."+o.pluginDefaults.eventNamespace+i)),o.plugin.settings.showOnLeave&&(t(document).on("mousemove."+o.pluginDefaults.eventNamespace+i,function(t){o.events.mousePositionTop=t.pageY-l.scroll.top}),t("html").on("mouseleave."+o.pluginDefaults.eventNamespace+i,function(){o.events.mousePositionTop<100&&o.events.show()})),o.plugin.settings.showOnIdle&&"number"==typeof o.plugin.settings.showOnIdle&&(o.events.idleTime=0,o.events.startIdleTimer(),t(window).on("load."+o.pluginDefaults.eventNamespace+i,function(){o.events.startIdleTimer()}),t(document).on("mousemove."+o.pluginDefaults.eventNamespace+i+" keypress."+o.pluginDefaults.eventNamespace+i,function(){o.events.startIdleTimer()})),o.plugin.settings.hasOwnProperty("showOnTimeout")&&"number"==typeof o.plugin.settings.showOnTimeout&&o.events.startTimeout(),t(window).on("resize."+o.pluginDefaults.eventNamespace+i,function(){e.slider.state.popupIsVisible&&o.events.resize()}),t(window).on("orientationchange."+o.pluginDefaults.eventNamespace+i,function(){e.slider.state.popupIsVisible&&setTimeout(function(){e.resize.all(),o.events.resize()},750)})}),o.plugin.settings.overlayClickToClose&&o.$overlay.on("click."+o.pluginDefaults.eventNamespace+i,function(){o.events.hide()}),s.on("click."+o.pluginDefaults.eventNamespace+i,'[href="#popupclose"], [href="#popupClose"], [href="#closepopup"], [href="#closePopup"], .ls-popup-close, .ls-close-popup, .ls-popup-close-button, .ls-close-popup-button',function(t){t.preventDefault(),o.events.hide()}),t(document).on("click."+o.pluginDefaults.eventNamespace+i,".ls-close-all-popups-button",function(t){t.preventDefault(),o.events.hide()})},checkScrollPositions:function(){o.plugin.settings.closeOnScroll&&e.slider.state.popupIsVisible?o.plugin.settings.scrollPosition=o.plugin.settings.closeOnScroll:o.plugin.settings.showOnScroll&&!e.slider.state.popupIsVisible?o.plugin.settings.scrollPosition=o.plugin.settings.showOnScroll:o.plugin.settings.scrollPosition="","auto"===o.plugin.settings.scrollPosition?e.slider.offset.top>l.scroll.top&&e.slider.offset.top<l.scroll.top+l.viewport.height?o.events.popupShouldShowTriggerAnEventByScrolling="up":o.events.popupShouldShowTriggerAnEventByScrolling="down":"number"==typeof o.plugin.settings.scrollPosition?l.scroll.top>=o.plugin.settings.scrollPosition?o.events.popupShouldShowTriggerAnEventByScrolling="up":o.events.popupShouldShowTriggerAnEventByScrolling="down":-1!==o.plugin.settings.scrollPosition.indexOf("%")&&(parseInt(l.scroll.top/((l.document.height-l.viewport.height)/100))>parseInt(o.plugin.settings.scrollPosition)?o.events.popupShouldShowTriggerAnEventByScrolling="up":o.events.popupShouldShowTriggerAnEventByScrolling="down")},switchScrollDirection:function(){o.plugin.settings.scrollPosition&&("up"===o.events.scrollDirection?o.events.scrollDirection="down":o.events.scrollDirection="up")},startIdleTimer:function(){o.events.idleTimer&&clearTimeout(o.events.idleTimer),o.events.idleTimer=setTimeout(function(){o.events.show()},1e3*o.plugin.settings.showOnIdle)},startTimeout:function(){o.events.timeout&&clearTimeout(o.events.timeout),e.slider.state.popupIsWaitingForDelay=!0,o.events.timeout=setTimeout(function(){e.slider.state.popupIsWaitingForDelay=!1,e.slider.state.waitingForPopupTimer&&(e.slider.state.waitingForPopupTimer=!1,e.transitions.start()),o.events.show()},1e3*o.plugin.settings.showOnTimeout)},show:function(t){if(!s.hasClass("ls-forcehide")&&!e.slider.state.popupIsVisible){e.api.hasEvent("popupWillOpen")&&e.api.triggerEvent("popupWillOpen",e.api.eventData());var i=function(){o.plugin.settings.disableOverlay||o.overlay.show(),o.popup.show()};t?s.layerSlider("fastChangeTo",t,i):i()}},hide:function(){e.slider.state.popupIsVisible&&(e.api.hasEvent("popupWillClose")&&e.api.triggerEvent("popupWillClose",e.api.eventData()),o.plugin.settings.disableOverlay||o.overlay.hide(),o.popup.hide())},resize:function(){var t={};"center"===o.popup.styleSettings.positionHorizontal&&(t.marginLeft=-e.slider.width/2),"middle"===o.popup.styleSettings.positionVertical&&(t.marginTop=-e.slider.height/2),s.css(t);var i=s.offset();e.slider.offset.left=i.left,e.slider.offset.top=i.top},destroy:function(){s.on("sliderDidRemove.layerSlider",function(){t([window,document,t("body")[0],t("html")[0],o.plugin.settings.$clickTriggerElements]).off(o.pluginDefaults.eventNamespace+i),o.$overlay.remove(),o.$popup.remove()}).layerSlider("destroy",!0)}}},t(document).on("keydown.lsGlobal",function(t){if(27===t.which)for(var e in window._layerSlider.closePopupsOnEsc)window._layerSliders[e].api.methods("closePopup")})}(jQuery);