!function(v){v(function(){v(window).width()<=1024||!v("body").hasClass("elementor-editor-active")&&0===v(".cs-parallax-on-scroll").length?v(".cs-parallax-on-scroll").css("background-image",""):a.init()});var a={showLogs:!1,round:1e3,editorMode:!1,parallaxs:v(),init:function(){var r;this._inited?this._inited=!0:(this._requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,t){window.setTimeout(a,1e3/60)},(r=this).editorMode=v("body").hasClass("elementor-editor-active"),v("body").hasClass("elementor-editor-active")?v("body").on("add.loftoceanParallax",function(a,t){var e,n;v(t).length&&r.parallaxs.index(v(t))<0&&(e=v(t),n=v(),!1!==(t=r._getBackgroundSettings(t))&&(e.data("cs-parrallax-type",t.type),r.parallaxs=r.parallaxs.add(t.el)),r.parallaxs.each(function(){var a=v(this);a.length&&a.closest(".cs-parallax-on-scroll").length||(n=n.add(a))}),n.length&&(r.parallaxs=r.parallaxs.not(n)),r._onScroll(!0))}):this._initSettings(),this._onScroll(!0))},_inited:!1,_properties:["y"],_requestAnimationFrame:null,_initSettings:function(){var t=this;v(".cs-parallax-on-scroll").each(function(){var a=t._getBackgroundSettings(this);!1!==a&&(v(this).data("cs-parrallax-type",a.type),t.parallaxs=t.parallaxs.add(a.el))})},_isClassicBackground:function(a){var t=v(a),a=!1;return this.editorMode?(t.css("background-image",""),t.css("background-image")&&t.css("background-image").includes("url(")&&(a=(a=t.css("background-image").substr(5)).substr(0,a.length-2)),t.css("background-image","none")):t.data("cs-background-image")&&(a=t.data("cs-background-image")),a},_getBackgroundSettings:function(a){var t=v(a),e=(e=t.attr("class").match(/cs_scroll_y_(\d+)/))&&e[1]?e[1]:0,n=parseInt(t.outerHeight(),10)+parseInt(1.2*e,10),r="height: "+n+"px; margin-top:"+Math.min(-e,e)+"px;",n={height:n+"px","margin-top":Math.min(-e,e)+"px"};if(e=this._isClassicBackground(a)){a=!1;return t.find(".parallax-img-container img").length?(a=t.find(".parallax-img-container img")).attr("src",e).parent().show():(a=v("<img>",{src:e,alt:t.data("cs-background-image-alt-text")}),v("<div>",{class:"parallax-img-container"}).append(a).prependTo(t)),{type:"image",el:a.data("style",r).css(n)}}return t.children(".parallax-img-container").length&&t.children(".parallax-img-container").hide(),t.children(".elementor-background-slideshow").length?{type:"slider",el:t.children(".elementor-background-slideshow").data("style",r).css(n)}:!!t.children(".elementor-background-video-container").length&&{type:"video",el:t.children(".elementor-background-video-container").data("style",r).css(n)}},_onScroll:function(_){var f=this,w=v(document).scrollTop(),y=v(window).height();this.parallaxs.each(v.proxy(function(a,t){if(!v(t).length||!v(t).closest(".cs-parallax-on-scroll").length)return!0;var i=v(t),e=i.closest(".cs-parallax-on-scroll"),s=[],o=!1,t=i.data("style")||"";if(f.editorMode){var n=f._getBackgroundSettings(e);if(!1===n)return!0;e.data("cs-parrallax-type",n.type),i=n.el}for(var r=[[]],l=e.attr("class").split(" "),a=0;a<l.length;a++)0<=l[a].indexOf("cs_scroll")&&(h=l[a].split("_"),r[0][h[2]]=h[3]);for(var c=r.length,d=0;d<c;d++){var h=r[d],g=Math.max(0,e.offset().top-y);g|=0;var u=y+e.outerHeight(),u=Math.max(0|u,1),m=g+u;m|=0;var p=h.smoothness;null==p&&(p=30),p|=0,!_&&0!=p||(p=1),p|=0;var x=w,x=Math.max(x,g);x=Math.min(x,m),this._properties.map(v.proxy(function(a){var t,e,n,r=h[a];null!=r&&(r|=0,null==(t=i.data("_"+a))&&(t=0),n=t+((e=(x-g)/(m-g)*r+0)-t)/p,(n=Math.ceil(n*this.round)/this.round)==t&&e==r&&(n=r),s[a]||(s[a]=0),s[a]+=n,t!=s[a]&&(i.data("_"+a,s[a]),o=!0))},this))}o&&(n="translate3d(0px, "+(s.y||0)+"px, 0px)",i.attr("style","transform: "+n+"; -webkit-transform: "+n+"; "+t))},this)),window.requestAnimationFrame?window.requestAnimationFrame(v.proxy(this._onScroll,this,!0)):this._requestAnimationFrame(v.proxy(this._onScroll,this,!0))}}}(jQuery);