/* skel-layers.js v1.0.1 | (c) n33 | getskel.com | MIT licensed */
skel.registerPlugin("layers",function(e){function fn(e,r,i){var o,u;this.id=e,this.index=i,this[n]={breakpoints:x,states:x,position:x,side:x,animation:pt,orientation:pt,width:0,height:0,zIndex:this.index,html:"",hidden:H,exclusive:Pt,resetScroll:Pt,resetForms:Pt,swipeToHide:Pt,clickToHide:H},t._.extend(this[n],r),this[W]=t._.newDiv(this[n][Bt]),this[W].id=e,this[W]._layer=this,this[s]=x,this[gt]=x,this[bt]=x,this[U]=H,u=t._.newElement(this.id,this[W],at,1),u.onAttach=function(){var e=this[Wt]._layer;e[et]()||e.init(),e.resume()},u.onDetach=function(){var e=this[Wt]._layer;e.suspend()},this[n].states&&this[n].states!=t._.sd?(t._.cacheElement(u),o=t._[un](this[n].states),t._[_t](o,function(e){t._.addCachedElementToState(o[e],u)})):this[n].breakpoints?(t._.cacheElement(u),o=t._[un](this[n].breakpoints),t._[_t](o,function(e){t._.addCachedElementToBreakpoint(o[e],u)})):t._.attachElement(u)}var t,n="config",r="_skel_layers_translateOrigin",i="cache",s="$element",o="_skel_layers_translate",u="_skel_layers_resetForms",f="visibleWrapper",l="_skel_layers_resume",c="exclusiveLayer",h="_skel_layers_promote",p="_skel_layers_demote",d="moveToVisibleWrapper",v="moveToHiddenWrapper",m="right",g="width",y="bottom",b="position",w="useActive",E="css",S="setTimeout",x=null,T="center",N="_skel_layers_suspend",C="prototype",k="left",L="wrapper",A="skel-layers-layer-z-index",O="_skel_layers_init",M="children",_="height",D="skel-layers-moved",P="overflow-x",H=!1,B="scrollTop",j="length",F="transform",I=".skel-layers-fixed:not(.skel-layers-moved)",q="top",R="touchstart.lock click.lock scroll.lock",U="visible",z="hiddenWrapper",W="element",X='
1){for(t=0;t
0&&(t[lt](),t[E](g,(t.data(Vt)+r)/12*100+"%"))},e.fn[Nt]=function(){return e(this).parents()[j]>0},e.fn[lt]=function(){var t=e(this);t[Ct]("class").match(/(\s+|^)([0-9]+)u(\s+|$)/)&&t.data(Vt,parseInt(RegExp.$2))},e.fn[h]=function(r){var i,s,o;if(this[j]>1){for(i=0;i0&&o[E](g,o[E](g))[E](_,o[E](_))),u=this[Et][e[b]],o[Ht]("skel-layer-"+e[b]).data(nt,e[b]);switch(u.v){case q:o[E](q,0);break;case y:o[E](y,0);break;case T:o[E](q,"50%")[E]("margin-top",Jt+t.getHalf(e[_]))}switch(u.h){case k:o[E](k,0);break;case m:o[E](m,0);break;case T:o[E](k,"50%")[E]("margin-left",Jt+t.getHalf(e[g]))}this[ot][r][tn](this),e[tt]&&e.exclusive&&(t[i][$t][Ht](K),t[i][c]=this),this[U]=Pt},fn[C][Ft]=function(){var e,r;if(!this[U]){t[i][z][At](this[W]);return}e=this[n],r=t._[w](e[Y]),r in this[ot]||(r=pt),this[ot][r][Ft](this),e[tt]&&e.exclusive&&t[i][c]===this&&(t[i][$t][zt](K),t[i][c]=x),this[U]=H},fn[C].init=function(){var r=this[n],i=e(this[W]),o=this;i[O](),i[yt](sn).each(function(){t.parseInit(e(this))}),i[Ht]("skel-layer").data(it,this.index)[E](rt,t[n].baseZIndex)[E](b,"fixed")[E]("-ms-overflow-style","-ms-autohiding-scrollbar")[E]("-webkit-overflow-scrolling","touch")[Ft]();switch(r.orientation){case"vertical":i[E]("overflow-y",jt);break;case"horizontal":i[E](P,jt);break;case pt:default:}if(!r[b]||!(r[b]in this[Et]))r[b]="top-left";r[Gt]||(r[Gt]=this[Et][r[b]][Gt]);if(!r[Y]||typeof r[Y]!==Wt&&!(r[Y]in this[ot]))r[Y]=pt;r.clickToHide&&i[yt]("a")[E](Z,Ut).on("click.skel-layers",function(r){var i,s,u=e(this);if(u.hasClass("skel-layers-ignore"))return;r[kt](),r[wt](),o[Ft]();if(u.hasClass("skel-layers-ignoreHref"))return;i=u[Ct]("href"),s=u[Ct]("target"),typeof i!==dt&&i!=""&&window[S](function(){s=="_blank"&&t._.vars[Lt]!="wp"?window.open(i):window.location.href=i},t[n][mt]+10)}),i.on("touchstart",function(e){o[gt]=e[G][Yt][0].pageX,o[bt]=e[G][Yt][0].pageY}).on("touchmove",function(e){var t,n,s,u,a,f,l;if(o[gt]===x||o[bt]===x)return;t=o[gt]-e[G][Yt][0].pageX,n=o[bt]-e[G][Yt][0].pageY,s=i.outerHeight(),u=i.get(0).scrollHeight-i[B]();if(r[tt]&&r.swipeToHide){a=H,f=20,l=50;switch(r[Gt]){case k:a=n-1*f&&t>l;break;case m:a=n-1*f&&t<-1*l;break;case q:a=t-1*f&&n>l;break;case y:a=t-1*f&&n<-1*l}if(a)return o[gt]=x,o[bt]=x,o[Ft](),H}if(i[B]()==0&&n<0||u>s-2&&u0)return H}),this[s]=i},fn[C][et]=function(){return this[s]!==x},fn[C][Zt]=function(){return this[s].is(":visible")},fn[C][d]=function(){t[i][f][At](this[s])},fn[C][v]=function(){if(!this[s][Nt]())return;t[i][z][At](this[s])},fn[C].resume=function(r){if(!this[et]())return;this[s][yt](sn).each(function(){t.parseResume(e(this))}),this[n][tt]||this[tn](r)},fn[C].suspend=function(){if(!this[et]())return;this[s][r](),this[s][yt](sn).each(function(){t.parseSuspend(e(this))}),this[U]&&this[Ft]()},t={cache:{visibleWrapper:x,body:x,exclusiveLayer:x,html:x,htmlbody:x,hiddenWrapper:x,layers:{},window:x,wrapper:x},config:{baseZIndex:1e4,layers:{},speed:250,transform:Pt,transformBreakpoints:x,transformTest:x},eventType:"click touchend",show:function(e){t._[Dt](function(){t[i][ft][e][tn]()})},hide:function(e){t._[Dt](function(){t[i][ft][e][Ft]()})},toggle:function(e){t._[Dt](function(){var n=t[i][ft][e];n[Zt]()?n[Ft]():n[tn]()})},getBaseFontSize:function(){return t._.vars.IEVersion<9?16.5:parseFloat(getComputedStyle(t[i][$t].get(0)).fontSize)},getHalf:function(e){var t=parseInt(e);return typeof e=="string"&&e.charAt(e[j]-1)=="%"?Math.floor(t/2)+"%":Math.floor(t/2)+Kt},lockView:function(e){t[i][St]._skel_layers_scrollPos=t[i][St][B](),e==nn&&t[i][an][E](P,tt),t[i][L].on(R,function(e){e[kt](),e[wt](),t[i][c]&&t[i][c][Ft]()}),t[i][St].on(vt,function(e){t[i][c]&&t[i][c][Ft]()}),t._.vars.isMobile||t[i][St].on(ht,function(e){t[i][c]&&t[i][c][Ft]()})},parseInit:function(n){var r,s,o=n.get(0),u=n[Ct]("data-action"),a=n[Ct]("data-args"),f,h;u&&a&&(a=a.split(","));switch(u){case"toggleLayer":case"layerToggle":n[E](Z,Ut)[E]("cursor","pointer"),r=function(n){n[kt](),n[wt]();if(t[i][c])return t[i][c][Ft](),H;var r=e(this),s=t[i][ft][a[0]];s[Zt]()?s[Ft]():s[tn]()},n.on(t.eventType,r);break;case"navList":f=e(rn+a[0]),r=f[yt]("a"),s=[],r.each(function(){var t=e(this),n,r;n=Math.max(0,t.parents("li")[j]-1),r=t[Ct]("href"),s.push(''+t.text()+"")}),s[j]>0&&n[Bt]("");break;case"copyText":f=e(rn+a[0]),n[Bt](f.text());break;case"copyHTML":f=e(rn+a[0]),n[Bt](f[Bt]());break;case"moveElementContents":f=e(rn+a[0]),o[l]=function(){f[M]().each(function(){var t=e(this);n[At](t),t[Ht](D)})},o[N]=function(){n[M]().each(function(){var n=e(this);f[At](n),n[zt](D),t.refresh(n)})},o[l]();break;case"moveElement":f=e(rn+a[0]),o[l]=function(){e(X+f[Ct]("id")+'" />').insertBefore(f),n[At](f),f[Ht](D)},o[N]=function(){e(st+f[Ct]("id")).replaceWith(f),f[zt](D),t.refresh(f)},o[l]();break;case"moveCell":f=e(rn+a[0]),h=e(rn+a[1]),o[l]=function(){e(X+f[Ct]("id")+'" />').insertBefore(f),n[At](f),f[E](g,jt),h&&h[Tt]()},o[N]=function(){e(st+f[Ct]("id")).replaceWith(f),f[E](g,""),h&&h[E](g,"")},o[l]();break;default:}},parseResume:function(e){var t=e.get(0);t[l]&&t[l]()},parseSuspend:function(e){var t=e.get(0);t[N]&&t[N]()},recalc:function(e,n){var r=t._.parseMeasurement(e),i;switch(r[1]){case"%":i=Math.floor(n*(r[0]/100));break;case"em":i=t.getBaseFontSize()*r[0];break;default:case Kt:i=r[0]}return i},recalcH:function(n){return t.recalc(n,e(window)[_]())},recalcW:function(n){return t.recalc(n,e(window)[g]())},refresh:function(r){var s;t[n][F]&&(r?s=r.filter(I):s=e(I),s[O]()[Xt](t[i][f]))},unlockView:function(e){e==nn&&t[i][an][E](P,U),t[i][L].off(R),t[i][St].off(vt),t._.vars.isMobile||t[i][St].off(ht)},init:function(){n in t[n]&&(t._.extend(t[n],t[n][n]),delete t[n][n]),t._[_t](t[n],function(e){t[n][e]&&typeof t[n][e]==Wt&&b in t[n][e]&&(t[n][ft][e]=t[n][e],delete t[n][e])}),t[n][on]&&(t[n][F]=t[n][on]());if(t[n][F]){if(t._.vars[Lt]=="android"&&t._.vars.deviceVersion<4||t._.vars[Lt]=="wp")t[n][F]=H;t._.vars.IEVersion<10&&(t[n][F]=H),t[n][qt]&&!t._.hasActive(t._[un](t[n][qt]))&&(t[n][F]=H)}t.initObjects(),t.initTransforms(),t._[Dt](function(){t.initLayers(),t.initIncludes(),t._.updateState(),t.refresh()})},initIncludes:function(){e(".skel-layers-include").each(function(){t.parseInit(e(this))})},initLayers:function(){var r,s,o,u=1;t._[_t](t[n][ft],function(r){var s;if(!(b in t[n][ft][r]))return;if(!t[n][ft][r][Bt]&&(s=e(rn+r))[j]==0)return;o=new fn(r,t[n][ft][r],u++),t[i][ft][r]=o,s&&(s[M]()[Xt](o[W]),s.remove())})},initObjects:function(){t[i][St]=e(window),t._[Dt](function(){t[i][Bt]=e(Bt),t[i][$t]=e($t),t[i][an]=e("html,body"),t[i][$t].wrapInner(''),t[i][L]=e("#skel-layers-wrapper"),t[i][L][E](b,en)[E](k,"0")[E](m,"0")[E](q,"0")[O](),t[i][z]=e('')[Xt](t[i][$t]),t[i][z][E](_,"100%"),t[i][f]=e('')[Xt](t[i][$t]),t[i][f][E](b,en),t._[ct](at,t[i][z][0]),t._[ct]("skel_layers_visibleWrapper",t[i][f][0]),t._[ct]("skel_layers_wrapper",t[i][L][0]),e("[autofocus]").focus()})},initTransforms:function(){if(t[n][F])e.fn[r]=function(){return e(this)[o](0,0)},e.fn[o]=function(t,n){return e(this)[E](F,"translate("+t+"px, "+n+"px)")},e.fn[O]=function(){return e(this)[E]("backface-visibility",tt)[E]("perspective","500")[It]("transition","transform "+t[n][mt]/1e3+"s ease-in-out")};else{var s,u=[];t[i][St].resize(function(){if(t[n][mt]!=0){var e=t[n][mt];t[n][mt]=0,window[S](function(){t[n][mt]=e,u=[]},e)}}),e.fn[r]=function(){for(var r=0;r