/* skel-layers.js v2.0.2 | (c) n33 | getskel.com | MIT licensed */ (function(e){typeof define=="function"&&define.amd?define(["jquery","skel"],e):e(jQuery,skel)})(function(e,t){var n="config",r="cache",i="setTimeout",s="_skel_layers_translateOrigin",o="_skel_layers_resetForms",u="trigger",f="position",l="_skel_layers_translate",c="visibleWrapper",h="_skel_layers_promote",p="skel-layers-moved",d="_skel_layers_demote",v="$element",m="moveToVisibleWrapper",g="_skel_layers_resume",y="moveToHiddenWrapper",b="exclusiveLayer",w="exclusive",E="_skel_layers_cssNumericValue",S="center",x="css",T="right",N="bottom",C="prototype",k="skel-layers-css-values",L="width",A="_skel_layers_init",O="_skel_layers_suspend",M="left",_="_skel_layers_doTranslate",D="overflow-x",P="layers",H="wrapper",B="speed",j="skel-layers-layer-z-index",F="showstart",I="hidestart",q="transform",R="iterate",U="children",z="_height",W="transition",X="skel-layers-css",V=null,$="hiddenWrapper",J="scrollTop",K="parent",Q="length",G=".skel-layers-fixed:not(.skel-layers-moved)",Y=!1,Z="hideend",et="showend",tt="height",nt="auto",rt="deviceType",it="resetForms",st="unlockView",ot="top",ut="touchstart.lock click.lock scroll.lock",at="skel-layers-handled",ft="recalcW",lt="element",ct="hidden",ht="_width",pt=!0,dt='
1){for(t=0;t0&&(t[It](),t[x](L,(t[vt](Nn)+r)/12*100+"%"))},e.fn[rn]=function(){return e(this).parents()[Q]>0},e.fn[It]=function(){var t=e(this);t[on]("class").match(/(\s+|^)([0-9]+)u(\s+|$)/)&&t[vt](Nn,parseInt(RegExp.$2))},e.fn[h]=function(t){var r,i,s;if(this[Q]>1){for(r=0;r-1*f&&n>l;break;case T:a=i-1*f&&n<-1*l;break;case ot:a=n-1*f&&i>l;break;case N:a=n-1*f&&i<-1*l}if(a)return s[Qt]=V,s[Gt]=V,s[Yt](),Y}if(r[J]()==0&&i<0||u>o-2&&u0)return Y}),this[v]=r},lr[C][Ot]=function(){return this[v]!==V},lr[C][qn]=function(){return this[v].is(":visible")},lr[C][m]=function(){fr[r][c][qt](this[v])},lr[C][y]=function(){if(!this[v][rn]())return;fr[r][$][qt](this[v])},lr[C].resume=function(t){if(!this[Ot]())return;this[v][Ut](Rn).each(function(){fr.parseResume(e(this))}),this[n][ct]||this[xn](t)},lr[C].suspend=function(){if(!this[Ot]())return;this[v][s](),this[v][Ut](Rn).each(function(){fr.parseSuspend(e(this))}),this[hn]&&this[Yt]()},fr={cache:{visibleWrapper:V,body:V,exclusiveLayer:V,document:V,html:V,htmlbody:V,hiddenWrapper:V,layers:{},parent:V,window:V,wrapper:V},config:{baseZIndex:1e4,layers:{},mode:f,speed:500,easing:"ease",wrap:pt},layerIndex:1,create:function(t,i,s){var o,u;if(t in fr[r][P])return;if(f in i){if(!i[Jn]&&(o=e($n+t))[Q]==0)return;return fr[n].wrap||(fr[n].wrap=pt,fr.initWrappers()),u=new lr(t,i,fr.layerIndex++),fr[r][P][t]=u,o&&(o[U]()[On](u[lt]),o.remove()),s||fr._.updateState(),u}return},destroy:function(i){if(i in fr[r][P]){var s=fr[r][P][i];return s.suspend(),s[n][Ln]&&s[n][Ln]!=fr._.sd&&(a=fr._[An](s[n][Ln]),fr._[R](a,function(e){fr._.removeCachedElementFromState(a[e],i)})),s[n][Jt]&&(a=fr._[An](s[n][Jt]),fr._[R](a,function(e){fr._.removeCachedElementFromBreakpoint(a[e],i)})),e(s[lt]).remove(),delete fr[r][P][i],t.uncacheElement(i),pt}return},get:function(e){if(e in fr[r][P])return fr[r][P][e];return},hide:function(e){fr[r][P][e][Yt]()},show:function(e){fr[r][P][e][xn]()},toggle:function(e){var t=fr[r][P][e];t[qn]()?t[Yt]():t[xn]()},getBaseFontSize:function(){return fr._.vars.IEVersion<9?16.5:parseFloat(getComputedStyle(fr[r][Xn].get(0)).fontSize)},getHalf:function(e){var t=parseInt(e);return typeof e=="string"&&e.charAt(e[Q]-1)=="%"?Math.floor(t/2)+"%":Math.floor(t/2)+jn},lockView:function(e){e==Dn&&fr[r][Vn][x](D,ct),fr[n][Pn]!=q&&t.vars[rt]==Cn&&fr[r][K][x](tt,fr[r].document[tt]()),fr[r][H].on(ut,function(e){e[tn](),e[Kt](),fr[r][b]&&fr[r][b][Yt]()}),fr[r][an].on(Vt,function(e){fr[r][b]&&fr[r][b][Yt]()}),fr._.vars.isMobile||window[i](function(){fr[r][an].on(Rt,function(e){fr[r][b]&&fr[r][b][Yt]()})},fr[n][B]+50)},parseInit:function(t){var n,s,o=t.get(0),u=t[on]("data-action"),a=t[on]("data-args"),f,l;u&&a&&(a=a.split(","));switch(u){case"toggleLayer":case"layerToggle":t[x](Mt,Sn)[x]("cursor","pointer").on("touchend click",function(t){var n=e(this);t[tn](),t[Kt]();if(n[vt](at)===pt)return;n[vt](at,pt),window[i](function(){n.removeData(at)},500);if(fr[r][b])return fr[r][b][Yt](),Y;var s=fr[r][P][a[0]];s[qn]()?s[Yt]():s[xn]()});break;case"navList":f=e($n+a[0]),n=f[Ut]("a"),s=[],n.each(function(){var t=e(this),n,r;n=Math.max(0,t.parents("li")[Q]-1),r=t[on]("href"),s.push(''+t.text()+"")}),s[Q]>0&&t[Jn]("");break;case"copyText":f=e($n+a[0]),t[Jn](f.text());break;case"copyHTML":f=e($n+a[0]),t[Jn](f[Jn]());break;case"moveElementContents":f=e($n+a[0]),o[g]=function(){f[U]().each(function(){var n=e(this);if(n[Wt](p))return;t[qt](n),n[ln](p),n[mt]()})},o[O]=function(){t[U]().each(function(){var t=e(this);if(!t[Wt](p))return;f[qt](t),t[En](p),fr.refresh(t),t[yt]()})},o[g]();break;case"moveElement":f=e($n+a[0]),o[g]=function(){if(f[Wt](p))return;e(dt+f[on]("id")+'" />').insertBefore(f),t[qt](f),f[ln](p),f[mt]()},o[O]=function(){if(!f[Wt](p))return;e(jt+f[on]("id")).replaceWith(f),f[En](p),fr.refresh(f),f[yt]()},o[g]();break;case"moveCell":f=e($n+a[0]),l=e($n+a[1]),o[g]=function(){e(dt+f[on]("id")+'" />').insertBefore(f),t[qt](f),f[x](L,nt),l&&l[en]()},o[O]=function(){e(jt+f[on]("id")).replaceWith(f),f[x](L,""),l&&l[x](L,"")},o[g]();break;default:}},parseResume:function(e){var t=e.get(0);t[g]&&t[g]()},parseSuspend:function(e){var t=e.get(0);t[O]&&t[O]()},recalc:function(e,t){var n=fr._.parseMeasurement(e),r;switch(n[1]){case"%":r=Math.floor(t*(n[0]/100));break;case"em":r=fr.getBaseFontSize()*n[0];break;default:case jn:r=n[0]}return r},recalcH:function(t){return fr.recalc(t,e(window)[tt]())},recalcW:function(t){return fr.recalc(t,e(window)[L]())},refresh:function(t){var n;t?n=t.filter(G):n=e(G),n[A](pt)[On](fr[r][c])},unlockView:function(e){e==Dn&&fr[r][Vn][x](D,""),fr[n][Pn]!=q&&t.vars[rt]==Cn&&fr[r][K][x](tt,""),fr[r][H].off(ut),fr[r][an].off(Vt),fr._.vars.isMobile||fr[r][an].off(Rt)},init:function(){n in fr[n]&&(fr._.extend(fr[n],fr[n][n]),delete fr[n][n]),fr._[R](fr[n],function(e){fr[n][e]&&typeof fr[n][e]==kn&&f in fr[n][e]&&(fr[n][P][e]=fr[n][e],delete fr[n][e])}),typeof fr[n][Pn]=="function"&&(fr[n][Pn]=fr[n][Pn]()),fr[n][Pn]==q&&(!fr._[nn](q)||!fr._[nn](W))&&(fr[n][Pn]=f),fr[n][Pn]==f&&!fr._[nn](W)&&(fr[n][Pn]=Bt),fr._.vars[rt]=="wp"&&(fr[n][Pn]=Bt),fr[r][an]=e(window),e(function(){fr.initAnimation(),fr.initObjects(),fr[n].wrap&&fr.initWrappers(),fr.initLayers(),fr.initIncludes(),fr._.updateState()})},initIncludes:function(){e(".skel-layers-include").each(function(){fr.parseInit(e(this))})},initLayers:function(){fr._[R](fr[n][P],function(e){fr.create(e,fr[n][P][e],pt)})},initObjects:function(){fr[r].document=e(document),fr[r][Jn]=e(Jn),fr[r][Xn]=e(Xn),fr[r][Vn]=e("html,body")},initAnimation:function(){fr[n][Pn]==Bt?(e.fn[wt]=function(t){e(this).fadeTo(fr[n][B],1,t)},e.fn[gt]=function(t){e(this).fadeTo(fr[n][B],0,t)}):(e.fn[wt]=function(t){e(this)[x](wn,1),t&&window[i](t,fr[n][B]+50)},e.fn[gt]=function(t){e(this)[x](wn,0),t&&window[i](t,fr[n][B]+50)});if(fr[n][Pn]==q)e.fn[s]=function(){return e(this)[l](0,0)},e.fn[l]=function(t,n){return e(this)[x](q,"translate("+t+"px, "+n+"px)")},e.fn[A]=function(){return e(this)[x](sn,ct)[x](_n,"500")[gn](W,"transform "+fr[n][B]/1e3+Mn+fr[n][Ct]+","+zn+fr[n][B]/1e3+Mn+fr[n][Ct])[vt](X,[sn,_n,mn,fn,Tn,bn,W])};else{var o=[];fr[n][Pn]==Bt?(fr[r][an].resize(function(){if(fr[n][B]!=0){var e=fr[n][B];fr[n][B]=0,window[i](function(){fr[n][B]=e,o=[]},0)}}),fr[n][Ct].substr(0,4)=="ease"?(fr[n][Ct]="swing",fr[n][B]=fr[n][B]*.65):fr[n][Ct]="linear",e.fn[_]=function(t,r){e(this)[Bt](t,fr[n][B],fr[n][Ct],r)},e.fn[A]=function(t){return e(this)[x](f,t?Hn:dn)[vt](X,[f])}):(fr[r][an].resize(function(){window[i](function(){o=[]},0)}),e.fn[_]=function(t,r){var s=e(this);fr._[R](t,function(e){s[x](e,t[e])}),window[i](r,fr[n][B])},e.fn[A]=function(t){return e(this)[x](W,"top "+fr[n][B]/1e3+Mn+fr[n][Ct]+","+"right "+fr[n][B]/1e3+Mn+fr[n][Ct]+","+"bottom "+fr[n][B]/1e3+Mn+fr[n][Ct]+","+"left "+fr[n][B]/1e3+Mn+fr[n][Ct]+","+zn+fr[n][B]/1e3+Mn+fr[n][Ct])[x](f,t?Hn:dn)[vt](X,[mn,fn,Tn,bn,W,f])}),e[E]=function(e){return e&&e.slice(-1)=="%"?e:parseInt(e)},e.fn[s]=function(){for(var t=0;t'),fr[r][K]=e("#skel-layers-parent"),fr[r][K][x](f,dn)[x](M,0)[x](ot,0)[x]("min-height",Et)[x](L,Et)):fr[r][K]=fr[r][Xn],fr[r][K].wrapInner('
'),fr[r][H]=e("#skel-layers-wrapper"),fr[r][H][x](f,Wn)[x](M,0)[x](T,0)[x](ot,0)[A](),fr[r][$]=e('
')[On](fr[r][K]),fr[r][$][x](tt,Et),fr[r][c]=e('
')[On](fr[r][K]),fr[r][c][x](f,Wn),fr._[zt](Ft,fr[r][$][0]),fr._[zt]("skel_layers_visibleWrapper",fr[r][c][0]),fr._[zt]("skel_layers_wrapper",fr[r][H][0]),e("[autofocus]").focus(),fr.refresh()}},fr)}(jQuery))});