!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jquery)}(function(a){"use strict";var c,d,e,f;a.extend({islzstring:function(a){return"[object string]"===object.prototype.tostring.call(a)},islzobject:function(a){return"[object object]"===object.prototype.tostring.call(a)},islznumber:function(a){return"[object number]"===object.prototype.tostring.call(a)},islzwindow:function(a){return"[object window]"===object.prototype.tostring.call(a)},islzbrowser:function(){var b,a=navigator.useragent,c=a.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(c[1])?(b=/\brv[ :]+(\d+)/g.exec(a)||[],["ie ",b[1]||""]):"chrome"===c[1]&&(b=a.match(/\b(opr|edge)\/(\d+)/),null!=b)?b.slice(1):(c=c[2]?[c[1],c[2]]:[navigator.appname,navigator.appversion,"-?"],null!=(b=a.match(/version\/(\d+)/i))&&c.splice(1,1,b[1]),c)},ispc:function(){var d,a=navigator.useragent,b=new array("android","iphone","symbianos","windows phone","ipad","ipod"),c=!0;for(d=0;d0){c=!1;break}return c}}),c=function(b){var c=this;c.$ele=a(b),c.param=c.$ele.data("lzparallax-param"),c.status=c.$ele.data("lzparallax-status"),c.methods=c.$ele.data("lzparallaxmethods")},c.prototype={constructor:c,setevent:function(){var b=this,c=this.param;a.each(c.event,function(a,c){b[c]&&b[c]()})},scroll:function(){var b=this.methods;b.$scrollbox.on("scroll.lzparallax",function(){b._moveposition()})},mouseenter:function(){var a=this,b=a.methods,c=a.param,d=a.$ele;b.$ele.off("mouseenter.lzparallax").on("mouseenter.lzparallax",function(){d.children(".lz-parallax-bg").find(".lz-parallax-bg-img").addclass(c.hoverclass)}).off("mouseleave.lzparallax").on("mouseleave.lzparallax",function(){d.children(".lz-parallax-bg").find(".lz-parallax-bg-img").removeclass(c.hoverclass)})},resize:function(){var b=this,c=b.methods,e=(b.param,b.status);b.$ele,a(window).resize(function(){c._getwindowsize(),c._getboxsize(),c._getboxposition(),c.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-inner").css({left:e.boxposition[0],width:e.boxsize[0]}),c._moveposition()})}},d=function(b){var c=this;c.$ele=a(b),c.param=c.$ele.data("lzparallax-param"),c.status=c.$ele.data("lzparallax-status"),c.lzparallax=c.$ele.data("lzparallax"),c.lzparallax.$dom=c.$ele},d.prototype={constructor:d,_clone:function(){var g,h,c=this,d=c.$ele,e=c.param,f=c.lzparallax;f.$dom&&(d=c.$ele=f.$dom),a.islzobject(e)&&e.clone&&(g="
",d.children(".lz-parallax-bg_clone").remove(),d.prepend(g),"static"==d.css("position")&&d.css("position","relative"),h=d.children(".lz-parallax-bg_clone"),h.css(d.css(["backgroundimage","backgroundposition","backgroundrepeat","backgroundsize","backgroundcolor","margin","padding","minwidth","maxwidth","minheight","maxheight"])).css({position:"absolute",left:0,right:0,top:"-1px",bottom:"-1px",zindex:"0","pointer-events":"none"}),d.css("background","none"),c.$ele=f.$ele=h,c.$ele.data({"lzparallax-param":c.param,"lzparallax-status":c.status,lzparallax:c.lzparallax,lzparallaxmethods:this}))},_getwindowsize:function(){var b=this.status;b.windowsize=[a(window).width(),a(window).height()]},_findscroll:function(){for(var b=this,c=b.$ele.parent();;){if("auto"==c.css("overflow")||"scroll"==c.css("overflow")||0!==c.children(".lz-scrollbar").size()||"body"===c[0].tagname)break;c=c.parent()}b.$scrollbox="body"===c[0].tagname?a(window):c},_cleartransform:function(){var a=this,b=a.$ele;for(a.$ele[0].transformdom=[];;){if("body"===b[0].tagname)break;b=b.parent(),"none"!=b.css("transform")&&(a.el.transformdom.push({dom:b,val:b.css("transform")}),b.css({transform:"none"}))}},_getboxsize:function(){var a=this;a.status.boxsize=[a.$ele.outerwidth(),a.$ele.outerheight()]},_getboxposition:function(){var a=this,b=a.status,c=a.param.autoposition;null==c&&(c=!0),b.boxposition=[c?a.$ele.offset().left-a.$scrollbox.scrollleft():"",a.$ele.offset().top-a.$scrollbox.scrolltop()]},_getimgheight:function(){var a=this,d=(a.status,a.$scrollbox[0],a.param);"scroll"==d.effect?a.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-img").css("height","120%"):a.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-img").css({height:"100%",top:0})},_displayimage:function(){var d,a=this,b=a.status,c=a.param;void 0===b.stopevent&&(b.stopevent=c.stopevent),b.stopevent===!0&&(a.$ele.children(".lz-parallax-bg").css({clip:"",overflow:"hidden"}),a.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-inner").css({position:"absolute",height:b.windowsize[1],top:-b.boxposition[1]}),b.imgmin=!0,d=a.$ele.offset().top,a.$scrollbox.on("scroll",function(){a.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-inner").css({top:-(d-a.$scrollbox.scrolltop())})}))},_setdisplayimageposition:function(){var a=this,b=a.status;a.param,a.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-inner").css({top:-b.boxposition[1]})},_getmovesize:function(){var e,b=this,c=b.status,d=b.param;return"fixed"==d.effect?!1:(e=a(document).height()-(b.$scrollbox.scrolltop()+c.windowsize[1]),c.initpositionflag&&(c.boxposition[1]=e&&(c.pagescrollheight=e),c.boxposition[1]>c.windowsize[1]&&c.boxposition[1]+c.boxsize[1]=-d.boxsize[1]&&(b.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-img").css("transform","translate3d(0px,"+-d.gomove+"px,"+"0px)"),d.initpositionflag=!1)},_savebg:function(){var b=this,c=b.status;c.bgval["backgroundimage"]||(c.bgval={backgroundimage:b.$ele.css("backgroundimage"),backgroundposition:b.$ele.css("backgroundposition"),backgroundrepeat:b.$ele.css("backgroundrepeat"),backgroundsize:b.$ele.css("backgroundsize"),backgroundcolor:b.$ele.css("backgroundcolor")},b.$ele.css("backgroundimage","none"))},_layout:function(){var d,a=this,b=a.$ele.data("lzparallax-status"),c="
"+"
"+"
"+"
";a.$ele.children(".lz-parallax-content,.lz-parallax-bg").remove(),d=a.$ele.children(),a.$ele.html(c),"static"==a.$ele.css("position")&&a.$ele.css("position","relative"),a.$ele.children(".lz-parallax-content").prepend(d),a.$ele.children(".lz-parallax-bg").find(".lz-parallax-bg-img").css(b.bgval)}},e=function(b){var c=this;c.$ele=a(b),c.$ele.data("lzparallax-status",{bgval:[],boxposition:[],windowsize:[],boxsize:[],initposition:0,bgtop:0,gotos:0,initpositionflag:!0}),c.status=c.$ele.data("lzparallax-status")},e.prototype={constructor:e,defaults:{hoverclass:"",effect:"scroll",autoposition:!1,clone:!1,stopevent:!1,event:["scroll","mouseenter","resize"]},_initparam:function(b){var c=this.defaults;return a.islzobject(b)&&(c=a.extend({},c,b)),c},_initlayout:function(){var d,a=this,b=a.$ele.data("lzparallax-param"),c=a.$ele.data("lzparallaxmethods");("fixed"==b.effect||"scroll"==b.effect)&&(a.status.initpositionflag=!0,c._clone(),c._findscroll(),c._cleartransform(),c._getwindowsize(),c._getboxsize(),c._getboxposition(),c._savebg(),c._layout(),d=c.$scrollbox.scrolltop(),c.$scrollbox.scrolltop(a.$ele.offset().top0&&b.effect<1?"scroll":0==b.effect?"fixed":""),!j&&a.ispc()?a(this).each(function(g,h){var i,j;0==a(h).closest(".w-fullpage-wrap").size()&&(i=a(h).data("lzparallax"),i||(a.islzobject(b)&&(c=b),i=new e(h,c),a(h).data("lzparallax",i)),a.islzobject(b)?i._init(b):a.islzstring(b)&&(j=a(h).data("lzparallaxtool"),j||(j=new f(h),a(h).data("lzparallaxtool",j)),!!j[b]&&j[b](c,d)))}):a(this)}});