function Layzr(a){this._lastScroll=0,this._ticking=!1,a=a||{},this._optionsContainer=document.querySelector(a.container)||window,this._optionsSelector=a.selector||"[data-layzr]",this._optionsAttr=a.attr||"data-layzr",this._optionsAttrSrcSet=a.attrSrcSet||"data-layzr-srcset",this._optionsAttrRetina=a.retinaAttr||"data-layzr-retina",this._optionsAttrBg=a.bgAttr||"data-layzr-bg",this._optionsAttrHidden=a.hiddenAttr||"data-layzr-hidden",this._optionsThreshold=a.threshold||0,this._optionsBefore=a.before||null,this._optionsAfter=a.after||null,this._optionsCallback=a.callback||null,this._retina=window.devicePixelRatio>1,this._srcAttr=this._retina?this._optionsAttrRetina:this._optionsAttr,this._nodes=document.querySelectorAll(this._optionsSelector),this._handlerBind=this._requestScroll.bind(this),this._create()}function simple_tooltip(a,b){jQuery(a).each(function(a){jQuery("body").append("
"+jQuery(this).find("span.tooltip-c").html()+"
");var c=jQuery("#"+b+a);jQuery(this).removeAttr("title").mouseover(function(){c.css({opacity:1,display:"none"}).fadeIn(400)}).mousemove(function(a){var b,d,e=jQuery(window).scrollTop(),f=jQuery(window).width(),g=15;b=f-2*g>=c.width()+a.pageX?a.pageX+g:f-c.width()-g,d=e+2*g>=a.pageY-c.height()?e+g:a.pageY-c.height()-2.2*g,c.css({left:b,top:d})}).mouseout(function(){c.css({left:"-9999px"})})})}jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h=b-f&&d<=c+f&&!a.hasAttribute(this._optionsAttrHidden)},Layzr.prototype._reveal=function(a){var b=a.getAttribute(this._srcAttr)||a.getAttribute(this._optionsAttr),c=this;if("function"==typeof this._optionsCallback){a.addEventListener?a.addEventListener("load",function(){c._optionsCallback.call(a)}):a.attachEvent("onload",function(){c._optionsCallback.call(a)})}"function"==typeof this._optionsBefore&&this._optionsBefore.call(a),a.hasAttribute(this._optionsAttrBg)?a.style.backgroundImage="url("+b+")":(b&&a.setAttribute("src",b),a.hasAttribute(this._optionsAttrSrcSet)&&a.setAttribute("srcset",a.getAttribute(this._optionsAttrSrcSet))),"function"==typeof this._optionsAfter&&this._optionsAfter.call(a),a.removeAttribute(this._optionsAttr),a.removeAttribute(this._optionsAttrSrcSet),a.removeAttribute(this._optionsAttrRetina),a.removeAttribute(this._optionsAttrBg),a.removeAttribute(this._optionsAttrHidden)},Layzr.prototype.updateSelector=function(){this._nodes=document.querySelectorAll(this._optionsSelector)},Layzr.prototype.update=function(){for(var a=this._nodes.length,b=0;b0,window.requestAnimationFrame&&(d.raf=window.requestAnimationFrame,d.caf=window.cancelAnimationFrame),d.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!d.pointerEvent){var f=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var g=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);g&&g.length>0&&(g=parseInt(g[1],10),g>=1&&g<8&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(i<4.4&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;n<4;n++){c=m[n];for(var o=0;o<3;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;hb-1?a-b:a<0?b+a:a},Ba={},Ca=function(a,b){return Ba[a]||(Ba[a]=[]),Ba[a].push(b)},Da=function(a){var b=Ba[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;df.currItem.fitRatio?ya||(mc(f.currItem,!1,!0),ya=!0):ya&&(mc(f.currItem),ya=!1)),Ga(ea,pa.x,pa.y,s))},Ia=function(a){a.container&&Ga(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ja=function(a,b){b[E]=u+a+"px, 0px"+v},Ka=function(a,b){if(!i.loop&&b){var c=m+(ta.x*ra-a)/ta.x,d=Math.round(a-tb.x);(c<0&&d>0||c>=ac()-1&&d<0)&&(a=tb.x+d*i.mainScrollEndFriction)}tb.x=a,Ja(a,n)},La=function(a,b){var c=ub[a]-sa[a];return oa[a]+na[a]+c-c*(b/t)},Ma=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Na=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},Oa=null,Pa=function(){Oa&&(e.unbind(document,"mousemove",Pa),e.addClass(a,"pswp--has_mouse"),i.mouseUsed=!0,Da("mouseUsed")),Oa=setTimeout(function(){Oa=null},100)},Qa=function(){e.bind(document,"keydown",f),N.transform&&e.bind(f.scrollWrap,"click",f),i.mouseUsed||e.bind(document,"mousemove",Pa),e.bind(window,"resize scroll orientationchange",f),Da("bindEvents")},Ra=function(){e.unbind(window,"resize scroll orientationchange",f),e.unbind(window,"scroll",r.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Pa),N.transform&&e.unbind(f.scrollWrap,"click",f),V&&e.unbind(window,p,f),clearTimeout(O),Da("unbindEvents")},Sa=function(a,b){var c=ic(f.currItem,qa,a);return b&&(da=c),c},Ta=function(a){return a||(a=f.currItem),a.initialZoomLevel},Ua=function(a){return a||(a=f.currItem),a.w>0?i.maxSpreadZoom:1},Va=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=La(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]1?1:a.fitRatio,c=a.container.style,d=b*a.w,e=b*a.h;c.width=d+"px",c.height=e+"px",c.left=a.initialPosition.x+"px",c.top=a.initialPosition.y+"px"},Ha=function(){if(ea){var a=ea,b=f.currItem,c=b.fitRatio>1?1:b.fitRatio,d=c*b.w,e=c*b.h;a.width=d+"px",a.height=e+"px",a.left=pa.x+"px",a.top=pa.y+"px"}}},Xa=function(a){var b="";i.escKey&&27===a.keyCode?b="close":i.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next")),b&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(a.preventDefault?a.preventDefault():a.returnValue=!1,f[b]()))},Ya=function(a){a&&(Y||X||fa||T)&&(a.preventDefault(),a.stopPropagation())},Za=function(){f.setScrollOffset(0,e.getScrollY())},$a={},_a=0,ab=function(a){$a[a]&&($a[a].raf&&I($a[a].raf),_a--,delete $a[a])},bb=function(a){$a[a]&&ab(a),$a[a]||(_a++,$a[a]={})},cb=function(){for(var a in $a)$a.hasOwnProperty(a)&&ab(a)},db=function(a,b,c,d,e,f,g){var h,i=Ea();bb(a);var j=function(){if($a[a]){if(h=Ea()-i,h>=d)return ab(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),$a[a].raf=H(j)}};j()},eb={shout:Da,listen:Ca,viewportSize:qa,options:i,isMainScrollAnimating:function(){return fa},getZoomLevel:function(){return s},getCurrentIndex:function(){return m},isDragging:function(){return V},isZooming:function(){return aa},setScrollOffset:function(a,b){sa.x=a,M=sa.y=b,Da("updateScrollOffset",sa)},applyZoomPan:function(a,b,c,d){pa.x=b,pa.y=c,s=a,Ha(d)},init:function(){if(!j&&!k){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),J=a.className,j=!0,N=e.detectFeatures(),H=N.raf,I=N.caf,E=N.transform,L=N.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),n=f.container.style,f.itemHolders=y=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],y[0].el.style.display=y[2].el.style.display="none",Wa(),r={resize:f.updateSize,orientationchange:function(){clearTimeout(O),O=setTimeout(function(){qa.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:Za,keydown:Xa,click:Ya};var d=N.isOldIOSPhone||N.isOldAndroid||N.isMobileOpera;for(N.animationName&&N.transform&&!d||(i.showAnimationDuration=i.hideAnimationDuration=0),c=0;c=ac())&&(m=0),f.currItem=_b(m),(N.isOldIOSPhone||N.isOldAndroid)&&(va=!1),a.setAttribute("aria-hidden","false"),i.modal&&(va?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===M&&(Da("initialLayout"),M=K=e.getScrollY());var l="pswp--open ";for(i.mainClass&&(l+=i.mainClass+" "),i.showHideOpacity&&(l+="pswp--animate_opacity "),l+=G?"pswp--touch":"pswp--notouch",l+=N.animationName?" pswp--css_animation":"",l+=N.svg?" pswp--svg":"",e.addClass(a,l),f.updateSize(),o=-1,ua=null,c=0;cda.min.x?a=da.min.x:ada.min.y?b=da.min.y:b=h&&(o+=ua+(ua>0?-h:h),c=h);for(var d=0;d0?(b=y.shift(),y[h-1]=b,o++,Ja((o+2)*ta.x,b.el.style),f.setContent(b,m-c+d+1+1)):(b=y.pop(),y.unshift(b),o--,Ja(o*ta.x,b.el.style),f.setContent(b,m+c-d-1-1));if(ea&&1===Math.abs(ua)){var e=_b(z);e.initialZoomLevel!==s&&(ic(e,qa),mc(e),Ia(e))}ua=0,f.updateCurrZoomItem(),z=m,Da("afterChange")}}},updateSize:function(b){if(!va&&i.modal){var c=e.getScrollY();if(M!==c&&(a.style.top=c+"px",M=c),!b&&xa.x===window.innerWidth&&xa.y===window.innerHeight)return;xa.x=window.innerWidth,xa.y=window.innerHeight,a.style.height=xa.y+"px"}if(qa.x=f.scrollWrap.clientWidth,qa.y=f.scrollWrap.clientHeight,Za(),ta.x=qa.x+Math.round(qa.x*i.spacing),ta.y=qa.y,Ka(ta.x*ra),Da("beforeResize"),void 0!==o){for(var d,g,j,k=0;k2&&(j=Aa(j)),g=_b(j),g&&(x||g.needsUpdate||!g.bounds)?(f.cleanSlide(g),f.setContent(d,j),1===k&&(f.currItem=g,f.updateCurrZoomItem(!0)),g.needsUpdate=!1):d.index===-1&&j>=0&&f.setContent(d,j),g&&g.container&&(ic(g,qa),mc(g),Ia(g));x=!1}t=s=f.currItem.initialZoomLevel,da=f.currItem.bounds,da&&(pa.x=da.center.x,pa.y=da.center.y,Ha(!0)),Da("resize")},zoomTo:function(a,b,c,d,f){b&&(t=s,ub.x=Math.abs(b.x)-pa.x,ub.y=Math.abs(b.y)-pa.y,Ma(oa,pa));var g=Sa(a,!1),h={};Va("x",g,h,a),Va("y",g,h,a);var i=s,j={x:pa.x,y:pa.y};Na(h);var k=function(b){1===b?(s=a,pa.x=h.x,pa.y=h.y):(s=(a-i)*b+i,pa.x=(h.x-j.x)*b+j.x,pa.y=(h.y-j.y)*b+j.y),f&&f(b),Ha(1===b)};c?db("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},fb=30,gb=10,hb={},ib={},jb={},kb={},lb={},mb=[],nb={},ob=[],pb={},qb=0,rb=ma(),sb=0,tb=ma(),ub=ma(),vb=ma(),wb=function(a,b){return a.x===b.x&&a.y===b.y},xb=function(a,b){return Math.abs(a.x-b.x)-1)&&(b(a)?a:Cb(a.parentNode,b))},Db={},Eb=function(a,b){return Db.prevent=!Cb(a.target,i.isClickableElement),Da("preventDragEvent",a,b,Db),Db.prevent},Fb=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Gb=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Hb=function(a,b,c){if(a-Q>50){var d=ob.length>2?ob.shift():{};d.x=b,d.y=c,ob.push(d),Q=a}},Ib=function(){var a=pa.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(qa.y/2))},Jb={},Kb={},Lb=[],Mb=function(a){for(;Lb.length>0;)Lb.pop();return F?(la=0,mb.forEach(function(a){0===la?Lb[0]=a:1===la&&(Lb[1]=a),la++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Lb[0]=Fb(a.touches[0],Jb),a.touches.length>1&&(Lb[1]=Fb(a.touches[1],Kb))):(Jb.x=a.pageX,Jb.y=a.pageY,Jb.id="",Lb[0]=Jb),Lb},Nb=function(a,b){var c,d,e,g,h=0,j=pa[a]+b[a],k=b[a]>0,l=tb.x+b.x,m=tb.x-nb.x;return c=j>da.min[a]||jda.min[a]&&(c=i.panEndFriction,h=da.min[a]-j,d=da.min[a]-oa[a]),(d<=0||m<0)&&ac()>1?(g=l,m<0&&l>nb.x&&(g=nb.x)):da.min.x!==da.max.x&&(e=j)):(j0)&&ac()>1?(g=l,m>0&&lf.currItem.fitRatio&&(pa[a]+=b[a]*c)):(void 0!==g&&(Ka(g,!0),$=g!==nb.x),da.min.x!==da.max.x&&(void 0!==e?pa.x=e:$||(pa.x+=b.x*c)),void 0!==g)},Ob=function(a){if(!("mousedown"===a.type&&a.button>0)){if($b)return void a.preventDefault();if(!U||"mousedown"!==a.type){if(Eb(a,!0)&&a.preventDefault(),Da("pointerDown"),F){var b=e.arraySearch(mb,a.pointerId,"id");b<0&&(b=mb.length),mb[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Mb(a),d=c.length;_=null,cb(),V&&1!==d||(V=ha=!0,e.bind(window,p,f),S=ka=ia=T=$=Y=W=X=!1,ga=null,Da("firstTouchStart",c),Ma(oa,pa),na.x=na.y=0,Ma(kb,c[0]),Ma(lb,kb),nb.x=ta.x*ra,ob=[{x:kb.x,y:kb.y}],Q=P=Ea(),Sa(s,!0),zb(),Ab()),!aa&&d>1&&!fa&&!$&&(t=s,X=!1,aa=W=!0,na.y=na.x=0,Ma(oa,pa),Ma(hb,c[0]),Ma(ib,c[1]),Gb(hb,ib,vb),ub.x=Math.abs(vb.x)-pa.x,ub.y=Math.abs(vb.y)-pa.y,ba=ca=yb(hb,ib))}}},Pb=function(a){if(a.preventDefault(),F){var b=e.arraySearch(mb,a.pointerId,"id");if(b>-1){var c=mb[b];c.x=a.pageX,c.y=a.pageY}}if(V){var d=Mb(a);if(ga||Y||aa)_=d;else if(tb.x!==ta.x*ra)ga="h";else{var f=Math.abs(d[0].x-kb.x)-Math.abs(d[0].y-kb.y);Math.abs(f)>=gb&&(ga=f>0?"h":"v",_=d)}}},Qb=function(){if(_){var a=_.length;if(0!==a)if(Ma(hb,_[0]),jb.x=hb.x-kb.x,jb.y=hb.y-kb.y,aa&&a>1){if(kb.x=hb.x,kb.y=hb.y,!jb.x&&!jb.y&&wb(_[1],ib))return;Ma(ib,_[1]),X||(X=!0,Da("zoomGestureStarted"));var b=yb(hb,ib),c=Vb(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ka=!0);var d=1,e=Ta(),g=Ua();if(c1&&(d=1),c=e-d*(e/3);else c>g&&(d=(c-g)/(6*e),d>1&&(d=1),c=g+d*e);d<0&&(d=0),ba=b,Gb(hb,ib,rb),na.x+=rb.x-vb.x,na.y+=rb.y-vb.y,Ma(vb,rb),pa.x=La("x",c),pa.y=La("y",c),S=c>s,s=c,Ha()}else{if(!ga)return;if(ha&&(ha=!1,Math.abs(jb.x)>=gb&&(jb.x-=_[0].x-lb.x),Math.abs(jb.y)>=gb&&(jb.y-=_[0].y-lb.y)),kb.x=hb.x,kb.y=hb.y,0===jb.x&&0===jb.y)return;if("v"===ga&&i.closeOnVerticalDrag&&!Bb()){na.y+=jb.y,pa.y+=jb.y;var k=Ib();return T=!0,Da("onVerticalDrag",k),Fa(k),void Ha()}Hb(Ea(),hb.x,hb.y),Y=!0,da=f.currItem.bounds;var l=Nb("x",jb);l||(Nb("y",jb),Na(pa),Ha())}}},Rb=function(a){if(N.isOldAndroid){if(U&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(U),U=setTimeout(function(){U=0},600))}Da("pointerUp"),Eb(a,!1)&&a.preventDefault();var b;if(F){var c=e.arraySearch(mb,a.pointerId,"id");if(c>-1)if(b=mb.splice(c,1)[0],navigator.pointerEnabled)b.type=a.pointerType||"mouse";else{var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}}var g,h=Mb(a),j=h.length;if("mouseup"===a.type&&(j=0),2===j)return _=null,!0;1===j&&Ma(lb,h[0]),0!==j||ga||fa||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Da("touchRelease",a,b));var k=-1;if(0===j&&(V=!1,e.unbind(window,p,f),zb(),aa?k=0:sb!==-1&&(k=Ea()-sb)),sb=1===j?Ea():-1,g=k!==-1&&k<150?"zoom":"swipe",aa&&j<2&&(aa=!1,1===j&&(g="zoomPointerUp"),Da("zoomGestureEnded")),_=null,Y||X||fa||T)if(cb(),R||(R=Sb()),R.calculateSwipeSpeed("x"),T){var l=Ib();if(lf.currItem.fitRatio&&Tb(R))}},Sb=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){ob.length>1?(a=Ea()-Q+50,b=ob[ob.length-2][d]):(a=Ea()-P,b=lb[d]),c.lastFlickOffset[d]=kb[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickDist[d]>20?c.lastFlickSpeed[d]=c.lastFlickOffset[d]/a:c.lastFlickSpeed[d]=0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(pa[a]>da.min[a]?c.backAnimDestination[a]=da.min[a]:pa[a]fb&&(h||b.lastFlickOffset.x>20)?d=-1:g<-fb&&(h||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(m+=d,m<0?(m=i.loop?ac()-1:0,j=!0):m>=ac()&&(m=i.loop?0:ac()-1,j=!0),j&&!i.loop||(ua+=d,ra-=d,c=!0));var k,l=ta.x*ra,n=Math.abs(l-tb.x);return c||l>tb.x==b.lastFlickSpeed.x>0?(k=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,k=Math.min(k,400),k=Math.max(k,250)):k=333,qb===m&&(c=!1),fa=!0,Da("mainScrollAnimStart"),db("mainScroll",tb.x,l,k,e.easing.cubic.out,Ka,function(){cb(),fa=!1,qb=-1,(c||qb!==m)&&f.updateCurrItem(),Da("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Vb=function(a){return 1/ca*a*t},Wb=function(){var a=s,b=Ta(),c=Ua();sc&&(a=c);var d,g=1,h=ja;return ia&&!S&&!ka&&s1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=G,r[A]=Ob,r[B]=Pb,r[C]=Rb,D&&(r[D]=r[C]),N.touch&&(q+=" mousedown",p+=" mousemove mouseup",r.mousedown=r[A],r.mousemove=r[B],r.mouseup=r[C]),G||(i.allowPanToNext=!1)}}});var Xb,Yb,Zb,$b,_b,ac,bc,cc=function(b,c,d,g){Xb&&clearTimeout(Xb),$b=!0,Zb=!0;var h;b.initialLayout?(h=b.initialLayout,b.initialLayout=null):h=i.getThumbBoundsFn&&i.getThumbBoundsFn(m);var j=d?i.hideAnimationDuration:i.showAnimationDuration,k=function(){ab("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Fa(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Da("initialZoom"+(d?"OutEnd":"InEnd"))),g&&g(),$b=!1};if(!j||!h||void 0===h.x)return Da("initialZoom"+(d?"Out":"In")),s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),a.style.opacity=d?0:1,Fa(1),void(j?setTimeout(function(){k()},j):k());var n=function(){var c=l,g=!f.currItem.src||f.currItem.loadError||i.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(s=h.w/b.w,pa.x=h.x,pa.y=h.y-K,f[g?"template":"bg"].style.opacity=.001,Ha()),bb("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),g&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Xb=setTimeout(function(){if(Da("initialZoom"+(d?"Out":"In")),d){var f=h.w/b.w,i={x:pa.x,y:pa.y},l=s,m=ja,n=function(b){1===b?(s=f,pa.x=h.x,pa.y=h.y-M):(s=(f-l)*b+l,pa.x=(h.x-i.x)*b+i.x,pa.y=(h.y-M-i.y)*b+i.y),Ha(),g?a.style.opacity=1-b:Fa(m-b*m)};c?db("initialZoom",0,1,j,e.easing.cubic.out,n,k):(n(1),Xb=setTimeout(k,j+20))}else s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),Fa(1),g?a.style.opacity=1:Fa(1),Xb=setTimeout(k,j+20)},d?25:90)};n()},dc={},ec=[],fc={index:0,errorMsg:'',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Yb.length}},gc=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},hc=function(a,b,c){var d=a.bounds;d.center.x=Math.round((dc.x-b)/2),d.center.y=Math.round((dc.y-c)/2)+a.vGap.top,d.max.x=b>dc.x?Math.round(dc.x-b):d.center.x,d.max.y=c>dc.y?Math.round(dc.y-c)+a.vGap.top:d.center.y,d.min.x=b>dc.x?0:d.center.x,d.min.y=c>dc.y?a.vGap.top:d.center.y},ic=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Da("parseVerticalMargin",a)),dc.x=b.x,dc.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=dc.x/a.w,f=dc.y/a.h;a.fitRatio=e1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=gc())}if(!c)return;return hc(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=gc(),a.initialPosition=a.bounds.center,a.bounds},jc=function(a,b,c,d,e,g){b.loadError||d&&(b.imageAppended=!0,mc(b,d,b===f.currItem&&ya),
c.appendChild(d),g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500))},kc=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},lc=function(a,b){if(a.src&&a.loadError&&a.container)return b&&(a.container.innerHTML=""),a.container.innerHTML=i.errorMsg.replace("%url%",a.src),!0},mc=function(a,b,c){if(a.src){b||(b=a.container.lastChild);var d=c?a.w:Math.round(a.w*a.fitRatio),e=c?a.h:Math.round(a.h*a.fitRatio);a.placeholder&&!a.loaded&&(a.placeholder.style.width=d+"px",a.placeholder.style.height=e+"px"),b.style.width=d+"px",b.style.height=e+"px"}},nc=function(){if(ec.length){for(var a,b=0;b=0,e=Math.min(c[0],ac()),g=Math.min(c[1],ac());for(b=1;b<=(d?g:e);b++)f.lazyLoadItem(m+b);for(b=1;b<=(d?e:g);b++)f.lazyLoadItem(m-b)}),Ca("initialLayout",function(){f.currItem.initialLayout=i.getThumbBoundsFn&&i.getThumbBoundsFn(m)}),Ca("mainScrollAnimComplete",nc),Ca("initialZoomInEnd",nc),Ca("destroy",function(){for(var a,b=0;b=0&&void 0!==Yb[a]&&Yb[a]},allowProgressiveImg:function(){return i.forceProgressiveLoading||!G||i.mouseUsed||screen.width>1200},setContent:function(a,b){i.loop&&(b=Aa(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,g=f.getItemAt(b);if(!g)return void(a.el.innerHTML="");Da("gettingData",b,g),a.index=b,a.item=g;var h=g.container=e.createEl("pswp__zoom-wrap");if(!g.src&&g.html&&(g.html.tagName?h.appendChild(g.html):h.innerHTML=g.html),lc(g),ic(g,qa),!g.src||g.loadError||g.loaded)g.src&&!g.loadError&&(d=e.createEl("pswp__img","img"),d.style.opacity=1,d.src=g.src,mc(g,d),jc(b,g,h,d,!0));else{if(g.loadComplete=function(c){if(j){if(a&&a.index===b){if(lc(c,!0))return c.loadComplete=c.img=null,ic(c,qa),Ia(c),void(a.index===m&&f.updateCurrZoomItem());c.imageAppended?!$b&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):N.transform&&(fa||$b)?ec.push({item:c,baseDiv:h,img:c.img,index:b,holder:a,clearPlaceholder:!0}):jc(b,c,h,c.img,fa||$b,!0)}c.loadComplete=null,c.img=null,Da("imageLoadComplete",b,c)}},e.features.transform){var k="pswp__img pswp__img--placeholder";k+=g.msrc?"":" pswp__img--placeholder--blank";var l=e.createEl(k,g.msrc?"img":"");g.msrc&&(l.src=g.msrc),mc(g,l),h.appendChild(l),g.placeholder=l}g.loading||kc(g),f.allowProgressiveImg()&&(!Zb&&N.transform?ec.push({item:g,baseDiv:h,img:g.img,index:b,holder:a}):jc(b,g,h,g.img,!0,!0))}Zb||b!==m?Ia(g):(ea=h.style,cc(g,d||g.img)),a.el.innerHTML="",a.el.appendChild(h)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var oc,pc={},qc=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};za("Tap",{publicMethods:{initTap:function(){Ca("firstTouchStart",f.onTapStart),Ca("touchRelease",f.onTapRelease),Ca("destroy",function(){pc={},oc=null})},onTapStart:function(a){a.length>1&&(clearTimeout(oc),oc=null)},onTapRelease:function(a,b){if(b&&!Y&&!W&&!_a){var c=b;if(oc&&(clearTimeout(oc),oc=null,xb(c,pc)))return void Da("doubleTap",c);if("mouse"===b.type)return void qc(a,b,"mouse");var d=a.target.tagName.toUpperCase();if("BUTTON"===d||e.hasClass(a.target,"pswp__single-tap"))return void qc(a,b);Ma(pc,c),oc=setTimeout(function(){qc(a,b),oc=null},300)}}}});var rc;za("DesktopZoom",{publicMethods:{initDesktopZoom:function(){L||(G?Ca("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){rc={};var c="wheel mousewheel DOMMouseScroll";Ca("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),Ca("unbindEvents",function(){rc&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),s<1?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};Ca("resize",g),Ca("afterChange",g),Ca("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),Ca("pointerUp",h),b||g()},handleMouseWheel:function(a){if(s<=f.currItem.fitRatio)return i.modal&&(!i.closeOnScroll||_a||V?a.preventDefault():E&&Math.abs(a.deltaY)>2&&(l=!0,f.close())),!0;if(a.stopPropagation(),rc.x=0,"deltaX"in a)1===a.deltaMode?(rc.x=18*a.deltaX,rc.y=18*a.deltaY):(rc.x=a.deltaX,rc.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(rc.x=-.16*a.wheelDeltaX),a.wheelDeltaY?rc.y=-.16*a.wheelDeltaY:rc.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;rc.y=a.detail}Sa(s,!0);var b=pa.x-rc.x,c=pa.y-rc.y;(i.modal||b<=da.min.x&&b>=da.max.x&&c<=da.min.y&&c>=da.max.y)&&a.preventDefault(),f.panTo(b,c)},toggleDesktopZoom:function(b){b=b||{x:qa.x/2+sa.x,y:qa.y/2+sa.y};var c=i.getDoubleTapZoom(!0,f.currItem),d=s===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec={history:!0,galleryUID:1},Fc=function(){return Cc.hash.substring(1)},Gc=function(){sc&&clearTimeout(sc),uc&&clearTimeout(uc)},Hc=function(){var a=Fc(),b={};if(a.length<5)return b;var c,d=a.split("&");for(c=0;c-1&&(yc=yc.split("&gid=")[0],yc=yc.split("?gid=")[0]),Ca("afterChange",f.updateURL),Ca("unbindEvents",function(){e.unbind(window,"hashchange",f.onHashChange)});var a=function(){xc=!0,Ac||(Bc?history.back():yc?Cc.hash=yc:Dc?history.pushState("",document.title,Cc.pathname+Cc.search):Cc.hash=""),Gc()};Ca("unbindEvents",function(){l&&a()}),Ca("destroy",function(){xc||a()}),Ca("firstUpdate",function(){m=Hc().pid});var b=yc.indexOf("pid=");b>-1&&(yc=yc.substring(0,b),"&"===yc.slice(-1)&&(yc=yc.slice(0,-1))),setTimeout(function(){j&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Fc()===yc?(Ac=!0,void f.close()):void(vc||(wc=!0,f.goTo(Hc().pid),wc=!1))},updateURL:function(){Gc(),wc||(zc?sc=setTimeout(Ic,800):Ic())}}}),e.extend(f,eb)};return a}),!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!(!c.href||!c.hasAttribute("download")&&(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),1))},H=function(){for(var a,b,c,d,e,f="",g=0;g"+a.label+"",q.parseShareButtonOut&&(f=q.parseShareButtonOut(a,f));i.children[0].innerHTML=f,i.children[0].onclick=G},I=function(a){for(var c=0;c=.95&&v.showControls()});var a;l("onPinchClose",function(b){x&&b<.9?(v.hideControls(),a=!0):a&&!x&&b>.9&&v.showControls()}),l("zoomGestureEnded",function(){a=!1,a&&!x&&v.showControls()})},S=[{name:"caption",option:"captionEl",onInit:function(a){e=a}},{name:"share-modal",option:"shareEl",onInit:function(a){i=a},onTap:function(){F()}},{name:"button--share",option:"shareEl",onInit:function(a){h=a},onTap:function(){F()}},{name:"button--zoom",option:"zoomEl",onTap:a.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(a){g=a}},{name:"button--close",option:"closeEl",onTap:a.close},{name:"button--arrow--left",option:"arrowEl",onTap:a.prev},{name:"button--arrow--right",option:"arrowEl",onTap:a.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){c.isFullscreen()?c.exit():c.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(a){m=a}}],T=function(){var a,c,e,f=function(d){if(d)for(var f=d.length,g=0;g-1&&(q[e.option]?(b.removeClass(a,"pswp__element--disabled"),e.onInit&&e.onInit(a)):b.addClass(a,"pswp__element--disabled"))}};f(d.children);var g=b.getChildByClass(d,"pswp__top-bar");g&&f(g.children)};v.init=function(){b.extend(a.options,z,!0),q=a.options,d=b.getChildByClass(a.scrollWrap,"pswp__ui"),l=a.listen,R(),l("beforeChange",v.update),l("doubleTap",function(b){var c=a.currItem.initialZoomLevel;a.getZoomLevel()!==c?a.zoomTo(c,b,333):a.zoomTo(q.getDoubleTapZoom(!1,a.currItem),b,333)}),l("preventDragEvent",function(a,b,c){var d=a.target||a.srcElement;d&&d.getAttribute("class")&&a.type.indexOf("mouse")>-1&&(d.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(d.tagName))&&(c.prevent=!1)}),l("bindEvents",function(){b.bind(d,"pswpTap click",A),b.bind(a.scrollWrap,"pswpTap",v.onGlobalTap),a.likelyTouchDevice||b.bind(a.scrollWrap,"mouseover",v.onMouseOver)}),l("unbindEvents",function(){y||F(),t&&clearInterval(t),b.unbind(document,"mouseout",L),b.unbind(document,"mousemove",K),b.unbind(d,"pswpTap click",A),b.unbind(a.scrollWrap,"pswpTap",v.onGlobalTap),b.unbind(a.scrollWrap,"mouseover",v.onMouseOver),c&&(b.unbind(document,c.eventK,v.updateFullscreen),c.isFullscreen()&&(q.hideAnimationDuration=0,c.exit()),c=null)}),l("destroy",function(){q.captionEl&&(f&&d.removeChild(f),b.removeClass(e,"pswp__caption--empty")),i&&(i.children[0].onclick=null),b.removeClass(d,"pswp__ui--over-close"),b.addClass(d,"pswp__ui--hidden"),v.setIdle(!1)}),q.showAnimationDuration||b.removeClass(d,"pswp__ui--hidden"),l("initialZoomIn",function(){q.showAnimationDuration&&b.removeClass(d,"pswp__ui--hidden")}),l("initialZoomOut",function(){b.addClass(d,"pswp__ui--hidden")}),l("parseVerticalMargin",P),T(),q.shareEl&&h&&i&&(y=!0),D(),Q(),M(),N()},v.setIdle=function(a){k=a,C(d,"ui--idle",a)},v.update=function(){x&&a.currItem?(v.updateIndexIndicator(),q.captionEl&&(q.addCaptionHTMLFn(a.currItem,e),C(e,"caption--empty",!a.currItem.title)),w=!0):w=!1,y||F(),D()},v.updateFullscreen=function(d){d&&setTimeout(function(){a.setScrollOffset(0,b.getScrollY())},50),b[(c.isFullscreen()?"add":"remove")+"Class"](a.template,"pswp--fs")},v.updateIndexIndicator=function(){q.counterEl&&(g.innerHTML=a.getCurrentIndex()+1+q.indexIndicatorSep+q.getNumItemsFn())},v.onGlobalTap=function(c){c=c||window.event;var d=c.target||c.srcElement;if(!r)if(c.detail&&"mouse"===c.detail.pointerType){if(I(d))return void a.close();b.hasClass(d,"pswp__img")&&(1===a.getZoomLevel()&&a.getZoomLevel()<=a.currItem.fitRatio?q.clickToCloseNonZoomable&&a.close():a.toggleDesktopZoom(c.detail.releasePoint))}else if(q.tapToToggleControls&&(x?v.hideControls():v.showControls()),q.tapToClose&&(b.hasClass(d,"pswp__img")||I(d)))return void a.close()},v.onMouseOver=function(a){a=a||window.event;var b=a.target||a.srcElement;C(d,"ui--over-close",I(b))},v.hideControls=function(){b.addClass(d,"pswp__ui--hidden"),x=!1},v.showControls=function(){x=!0,w||v.update(),b.removeClass(d,"pswp__ui--hidden")},v.supportsFullscreen=function(){var a=document;return!!(a.exitFullscreen||a.mozCancelFullScreen||a.webkitExitFullscreen||a.msExitFullscreen)},v.getFullscreenAPI=function(){var b,c=document.documentElement,d="fullscreenchange";return c.requestFullscreen?b={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:d}:c.mozRequestFullScreen?b={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+d}:c.webkitRequestFullscreen?b={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+d}:c.msRequestFullscreen&&(b={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),b&&(b.enter=function(){return j=q.closeOnScroll,q.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?a.template[this.enterK]():void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},b.exit=function(){return q.closeOnScroll=j,document[this.exitK]()},b.isFullscreen=function(){return document[this.elementK]}),b}};return a}),jQuery(document).ready(function(a){a(".twentytwenty-container").length>0&&(a.fn.twentytwenty=function(b){var b=a.extend({default_offset_pct:.5,orientation:"horizontal",navigation_follow:!1},b);return this.each(function(){var c=b.default_offset_pct,d=a(this),e=b.orientation,f="vertical"===e?"down":"left",g="vertical"===e?"up":"right",h=b.navigation_follow;d.wrap("");var i=d.find("img:first"),j=d.find("img:last"),k=i.attr("title"),l=j.attr("title");d.append("");var m=d.find(".twentytwenty-handle");m.append(""),m.append(""),d.addClass("twentytwenty-container"),i.addClass("twentytwenty-before"),j.addClass("twentytwenty-after"),"undefined"!=typeof k&&k&&k.length>0&&d.append(""+k+"
"),"undefined"!=typeof l&&l&&l.length>0&&d.append(""+l+"
");var n=function(a){var b=i.width(),c=i.height();return{w:b+"px",h:c+"px",cw:a*b+"px",ch:a*c+"px"}},o=function(a){"vertical"===e?i.css("clip","rect(0,"+a.w+","+a.ch+",0)"):i.css("clip","rect(0,"+a.cw+","+a.h+",0)"),d.css("height",a.h)},p=function(a){var b=n(a);m.css("vertical"===e?"top":"left","vertical"===e?b.ch:b.cw),o(b)};a(window).on("resize.twentytwenty",function(a){p(c)});var q=0,r=0;m.on("movestart",function(a){(a.distX>a.distY&&a.distX<-a.distY||a.distX-a.distY)&&"vertical"!==e?a.preventDefault():(a.distXa.distY&&a.distX>-a.distY)&&"vertical"===e&&a.preventDefault(),d.addClass("active"),d.removeClass("active-click"),q=d.offset().left,offsetY=d.offset().top,r=i.width(),imgHeight=i.height()}),m.on("moveend",function(a){d.removeClass("active")}),m.on("move",function(a){d.hasClass("active")&&(c="vertical"===e?(a.pageY-offsetY)/imgHeight:(a.pageX-q)/r,c<0&&(c=0),c>1&&(c=1),p(c))}),h||d.hasClass("active")||(d.on("mouseup",function(a){d.removeClass("active-click")}),d.on("mousedown",function(a){d.addClass("active-click"),q=d.offset().left,offsetY=d.offset().top,r=i.width(),imgHeight=i.height(),c="vertical"===e?(a.pageY-offsetY)/imgHeight:(a.pageX-q)/r,c<0&&(c=0),c>1&&(c=1),p(c)})),d.find("img").on("mousedown",function(a){a.preventDefault()}),h&&(d.on("mouseenter",function(a){d.addClass("active"),q=d.offset().left,offsetY=d.offset().top,r=i.width(),imgHeight=i.height()}),d.on("mouseleave",function(a){d.removeClass("active")}),d.on("mousemove",function(a){d.hasClass("active")&&(c="vertical"===e?(a.pageY-offsetY)/imgHeight:(a.pageX-q)/r,c<0&&(c=0),c>1&&(c=1),p(c))})),a(window).trigger("resize.twentytwenty")})})}),jQuery(document).ready(function(a){"ontouchstart"in window||!("on"==dtLocal.themeSettings.smoothScroll||"on_parallax"==dtLocal.themeSettings.smoothScroll&&a(".stripe-parallax-bg").length>0)||a("body").css({"scroll-behavior":"smooth"})}),jQuery(document).ready(function(a){var b=a(window),c=b.height();b.resize(function(){c=b.height()}),a.fn.parallax=function(d,e,f){function g(){var b=dtGlobals.winScrollTop;k.each(function(){var f=a(this),g=f.offset().top,i=h(f);g+ib+c||k.css("backgroundPosition",d+" "+Math.round((g-b)*e)+"px")})}var h,i,j,k=a(this);k.each(function(){i=k.offset().top}),h=f?function(a){return a.outerHeight(!0)}:function(a){return a.height()},(arguments.length<1||null===d)&&(d="50%"),(arguments.length<2||null===e)&&(e=.1),(arguments.length<3||null===f)&&(f=!0),b.bind("scroll",g).resize(function(){g()}).bind("debouncedresize",function(){clearTimeout(j),j=setTimeout(function(){g()},20)}),g()}}),function(a){"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(a){!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),a()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0,autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&V(b),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),v.call(this),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g.children())),e.overflowed=z.call(this),D.call(this),f.autoDraggerLength&&w.call(this),x.call(this),B.call(this);var i=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?h[0].height()>h[0].parent().height()?A.call(this):(W(b,i[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(A.call(this),"y"===f.axis?C.call(this):"yx"===f.axis&&e.overflowed[1]&&W(b,i[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?h[1].width()>h[1].parent().width()?A.call(this):(W(b,i[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(A.call(this),"x"===f.axis?C.call(this):"yx"===f.axis&&e.overflowed[0]&&W(b,i[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),T.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=R.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=S.call(this,j[0],"y"),j[1]=S.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",W(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",W(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&V(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);if(c.data(d)){c.data(d);T.call(this,"remove"),C.call(this),b&&A.call(this),D.call(this,!0),c.addClass(k[3])}})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),T.call(this,"remove"),C.call(this),A.call(this),e.removeData(d),$(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=!(a.inArray(b.theme,c)>-1)&&b.autoDraggerLength,b.autoExpandScrollbar=!(a.inArray(b.theme,d)>-1)&&b.autoExpandScrollbar,b.scrollButtons.enable=!(a.inArray(b.theme,e)>-1)&&b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1||b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),$(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["",""],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("");
var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p.children())),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){return Math.max.apply(Math,b.map(function(){return a(this).outerWidth(!0)}).get())},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis&&f.css({position:"absolute",width:"auto"}).wrap("").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),position:"relative"}).unwrap()},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=ba(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["","","",""],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=b.css("max-height")||"none",g=f.indexOf("%")!==-1,h=b.css("box-sizing");if("none"!==f){var i=g?b.parent().height()*parseInt(f)/100:parseInt(f);"border-box"===h&&(i-=b.innerHeight()-b.height()+(b.outerHeight()-b.innerHeight())),e.css("max-height",Math.round(i))}},w=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]e.height(),h>e.width()]},A=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(V(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),W(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),W(b,"_resetX")}},B=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),I.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(F.call(this),f.contentTouchScroll&&G.call(this),H.call(this),f.mouseWheel.enable){var g;b()}L.call(this),N.call(this),f.advanced.autoScrollOnFocus&&M.call(this),f.scrollButtons.enable&&O.call(this),f.keyboard.enable&&P.call(this),e.bindEvents=!0}},C=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),c.bindEvents&&(a(document).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),$(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),$(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),$(i[0],"onCompleteTimeout"),c.bindEvents=!1)},D=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},E=function(a){var b=a.type;switch(b){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a.target.ownerDocument!==document?[a.originalEvent.screenY,a.originalEvent.screenX,!1]:[a.originalEvent.pageY,a.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var c=a.originalEvent.touches[0]||a.originalEvent.changedTouches[0],d=a.originalEvent.touches.length||a.originalEvent.changedTouches.length;return a.target.ownerDocument!==document?[c.screenY,c.screenX,d>1]:[c.pageY,c.pageX,d>1];default:return[a.pageY,a.pageX,!1]}},F=function(){function b(a){var b=o.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}}function c(a,b,c,d){if(o[0].idleTimer=l.scrollInertia<233?250:0,e.attr("id")===n[1])var f="x",g=(e[0].offsetLeft-b+d)*k.scrollRatio.x;else var f="y",g=(e[0].offsetTop-a+c)*k.scrollRatio.y;W(h,g.toString(),{dir:f,drag:!0})}var e,f,g,h=a(this),k=h.data(d),l=k.opt,m=d+"_"+k.idx,n=["mCSB_"+k.idx+"_dragger_vertical","mCSB_"+k.idx+"_dragger_horizontal"],o=a("#mCSB_"+k.idx+"_container"),p=a("#"+n[0]+",#"+n[1]),q=l.advanced.releaseDraggableSelectors?p.add(a(l.advanced.releaseDraggableSelectors)):p;p.bind("mousedown."+m+" touchstart."+m+" pointerdown."+m+" MSPointerDown."+m,function(c){if(c.stopImmediatePropagation(),c.preventDefault(),_(c)){j=!0,i&&(document.onselectstart=function(){return!1}),b(!1),V(h),e=a(this);var d=e.offset(),k=E(c)[0]-d.top,m=E(c)[1]-d.left,n=e.height()+d.top,o=e.width()+d.left;k0&&m0&&(f=k,g=m),y(e,"active",l.autoExpandScrollbar)}}).bind("touchmove."+m,function(a){a.stopImmediatePropagation(),a.preventDefault();var b=e.offset(),d=E(a)[0]-b.top,h=E(a)[1]-b.left;c(f,g,d,h)}),a(document).bind("mousemove."+m+" pointermove."+m+" MSPointerMove."+m,function(a){if(e){var b=e.offset(),d=E(a)[0]-b.top,h=E(a)[1]-b.left;if(f===d)return;c(f,g,d,h)}}).add(q).bind("mouseup."+m+" touchend."+m+" pointerup."+m+" MSPointerUp."+m,function(a){e&&(y(e,"active",l.autoExpandScrollbar),e=null),j=!1,i&&(document.onselectstart=null),b(!0)})},G=function(){function c(a){if(!aa(a)||j||E(a)[2])return void(b=0);b=1,v=0,w=0,x.removeClass("mCS_touch_action");var c=C.offset();k=E(a)[0]-c.top,l=E(a)[1]-c.left,K=[E(a)[0],E(a)[1]]}function e(a){if(aa(a)&&!j&&!E(a)[2]&&(a.stopImmediatePropagation(),!w||v)){p=Y();var b=B.offset(),c=E(a)[0]-b.top,d=E(a)[1]-b.left,e="mcsLinearOut";if(F.push(c),G.push(d),K[2]=Math.abs(E(a)[0]-K[0]),K[3]=Math.abs(E(a)[1]-K[1]),y.overflowed[0])var f=D[0].parent().height()-D[0].height(),g=k-c>0&&c-k>-(f*y.scrollRatio.y)&&(2*K[3]0&&d-l>-(h*y.scrollRatio.x)&&(2*K[2]30)){s=1e3/(q-o);var e="mcsEaseOut",f=s<2.5,g=f?[F[F.length-2],G[G.length-2]]:[0,0];r=f?[c-g[0],d-g[1]]:[c-m,d-n];var k=[Math.abs(r[0]),Math.abs(r[1])];s=f?[Math.abs(r[0]/4),Math.abs(r[1]/4)]:[s,s];var l=[Math.abs(C[0].offsetTop)-r[0]*h(k[0]/s[0],s[0]),Math.abs(C[0].offsetLeft)-r[1]*h(k[1]/s[1],s[1])];t="yx"===z.axis?[l[0],l[1]]:"x"===z.axis?[null,l[1]]:[l[0],null],u=[4*k[0]+z.scrollInertia,4*k[1]+z.scrollInertia];var x=parseInt(z.contentTouchScroll)||0;t[0]=k[0]>x?t[0]:0,t[1]=k[1]>x?t[1]:0,y.overflowed[0]&&i(t[0],u[0],e,"y",I,!1),y.overflowed[1]&&i(t[1],u[1],e,"x",I,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&W(x,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x=a(this),y=x.data(d),z=y.opt,A=d+"_"+y.idx,B=a("#mCSB_"+y.idx),C=a("#mCSB_"+y.idx+"_container"),D=[a("#mCSB_"+y.idx+"_dragger_vertical"),a("#mCSB_"+y.idx+"_dragger_horizontal")],F=[],G=[],H=0,I="yx"===z.axis?"none":"all",K=[],L=C.find("iframe"),M=["touchstart."+A+" pointerdown."+A+" MSPointerDown."+A,"touchmove."+A+" pointermove."+A+" MSPointerMove."+A,"touchend."+A+" pointerup."+A+" MSPointerUp."+A];C.bind(M[0],function(a){c(a)}).bind(M[1],function(a){e(a)}),B.bind(M[0],function(a){f(a)}).bind(M[2],function(a){g(a)}),L.length&&L.each(function(){a(this).load(function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(M[0],function(a){c(a),f(a)}).bind(M[1],function(a){e(a)}).bind(M[2],function(a){g(a)})})})},H=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,Q(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(a){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=E(a)[0]-d.top+m[0].offsetTop,j=E(a)[1]-d.left+m[0].offsetLeft;g>0&&g0&&jn.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(j<0?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l,function(a){b||(f&&(f=0,e("off",null)),j=!1)})},I=function(){function b(b,d){if(V(c),!K(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100;if("x"===f.axis||"x"===f.mouseWheel.axis)var k="x",l=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],m="auto"!==f.mouseWheel.scrollAmount?l[1]:l[0]>=h.width()?.9*h.width():l[0],n=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),o=j[1][0].offsetLeft,p=j[1].parent().width()-j[1].width(),q=b.deltaX||b.deltaY||d;else var k="y",l=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],m="auto"!==f.mouseWheel.scrollAmount?l[1]:l[0]>=h.height()?.9*h.height():l[0],n=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),o=j[0][0].offsetTop,p=j[0].parent().height()-j[0].height(),q=b.deltaY||d;"y"===k&&!e.overflowed[0]||"x"===k&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(q=-q),f.mouseWheel.normalizeDelta&&(q=q<0?-1:1),(q>0&&0!==o||q<0&&o!==p||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),W(c,(n-q*m).toString(),{dir:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).load(function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},J=function(a){var b=null;try{var c=a.contentDocument||a.contentWindow.document;b=c.body.innerHTML}catch(a){}return null!==b},K=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},L=function(){var b=a(this),c=b.data(d),e=d+"_"+c.idx,f=a("#mCSB_"+c.idx+"_container"),g=f.parent(),h=a(".mCSB_"+c.idx+"_scrollbar ."+k[12]);h.bind("touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(a){j=!0}).bind("touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(a){j=!1}).bind("click."+e,function(d){if(a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail")){V(b);var e=a(this),h=e.find(".mCSB_dragger");if(e.parent(".mCSB_scrollTools_horizontal").length>0){if(!c.overflowed[1])return;var i="x",j=d.pageX>h.offset().left?-1:1,l=Math.abs(f[0].offsetLeft)-j*(.9*g.width())}else{if(!c.overflowed[0])return;var i="y",j=d.pageY>h.offset().top?-1:1,l=Math.abs(f[0].offsetTop)-j*(.9*g.height())}W(b,l.toString(),{dir:i,scrollEasing:"mcsEaseInOut"})}})},M=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(c){var d=a(document.activeElement),f=g.find(".mCustomScrollBox").length,i=0;d.is(e.advanced.autoScrollOnFocus)&&(V(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=f?(i+17)*f:0,b[0]._focusTimeout=setTimeout(function(){var a=[ca(d)[0],ca(d)[1]],c=[g[0].offsetTop,g[0].offsetLeft],f=[c[0]+a[0]>=0&&c[0]+a[0]=0&&c[0]+a[1]a");i.bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.snapAmount||e.scrollButtons.scrollAmount,Q(b,a,c)}if(d.preventDefault(),_(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},P=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.snapAmount||f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||Q(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){V(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());W(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;W(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).load(function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},Q=function(b,c,e,f,g){function h(a){var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],l="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),o="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),r="auto"!==m.scrollAmount?o:l,s=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",t=!!a;return a&&d<17&&(r="x"===m.dir[0]?i[1]:i[0]),W(b,r.toString(),{dir:m.dir[0],scrollEasing:s,dur:d,onComplete:t}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),$(m,"step"),V(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],V(b),ba(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},R=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},S=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1):h.outerHeight(!1),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?ca(o)[1]:ca(o)[0];case"string":case"number":if(ba(b))return Math.abs(b);if(b.indexOf("%")!==-1)return Math.abs(k*parseInt(b)/100);if(b.indexOf("-=")!==-1)return Math.abs(m-parseInt(b.split("-=")[1]));if(b.indexOf("+=")!==-1){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(b.indexOf("px")!==-1&&ba(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?ca(o)[1]:ca(o)[0]}return a(b).length?"x"===c?ca(a(b))[1]:ca(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},T=function(b){function c(){return clearTimeout(n[0].autoUpdate),0===i.parents("html").length?void(i=null):void(n[0].autoUpdate=setTimeout(function(){return m.advanced.updateOnSelectorChange&&(o=g(),o!==u)?(h(3),void(u=o)):(m.advanced.updateOnContentResize&&(p=[n.outerHeight(!1),n.outerWidth(!1),r.height(),r.width(),t()[0],t()[1]],p[0]===v[0]&&p[1]===v[1]&&p[2]===v[2]&&p[3]===v[3]&&p[4]===v[4]&&p[5]===v[5]||(h(p[0]!==v[0]||p[1]!==v[1]),v=p)),m.advanced.updateOnImageLoad&&(q=e(),q!==w&&(n.find("img").each(function(){f(this)}),w=q)),void((m.advanced.updateOnSelectorChange||m.advanced.updateOnContentResize||m.advanced.updateOnImageLoad)&&c()))},m.advanced.autoUpdateTimeout))}function e(){var a=0;return m.advanced.updateOnImageLoad&&(a=n.find("img").length),a}function f(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),h(2)}if(a(b).hasClass(k[2]))return void h();var e=new Image;e.onload=c(e,d),e.src=b.src}function g(){m.advanced.updateOnSelectorChange===!0&&(m.advanced.updateOnSelectorChange="*");var b=0,c=n.find(m.advanced.updateOnSelectorChange);return m.advanced.updateOnSelectorChange&&c.length>0&&c.each(function(){b+=a(this).height()+a(this).width()}),b}function h(a){clearTimeout(n[0].autoUpdate),l.update.call(null,i[0],a)}var i=a(this),j=i.data(d),m=j.opt,n=a("#mCSB_"+j.idx+"_container");if(b)return clearTimeout(n[0].autoUpdate),void $(n[0],"autoUpdate");var o,p,q,r=n.parent(),s=[a("#mCSB_"+j.idx+"_scrollbar_vertical"),a("#mCSB_"+j.idx+"_scrollbar_horizontal")],t=function(){return[s[0].is(":visible")?s[0].outerHeight(!0):0,s[1].is(":visible")?s[1].outerWidth(!0):0]},u=g(),v=[n.outerHeight(!1),n.outerWidth(!1),r.height(),r.width(),t()[0],t()[1]],w=e();c()},U=function(a,b,c){return Math.round(a/b)*b-c},V=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){Z.call(this)})},W=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||t>=u[0]+w,j.callbacks.alwaysTriggerOffsets||t<=-x]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[r[0].offsetTop,r[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?R.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?R.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){switch(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount&&(c=U(c,j.snapAmount,j.snapOffset)),e.dir){case"x":var r=a("#mCSB_"+i.idx+"_dragger_horizontal"),s="left",t=n[0].offsetLeft,u=[m.width()-n.outerWidth(!1),r.parent().width()-r.width()],v=[c,0===c?0:c/i.scrollRatio.x],w=p[1],x=q[1],z=w>0?w/i.scrollRatio.x:0,A=x>0?x/i.scrollRatio.x:0;break;case"y":var r=a("#mCSB_"+i.idx+"_dragger_vertical"),s="top",t=n[0].offsetTop,u=[m.height()-n.outerHeight(!1),r.parent().height()-r.height()],v=[c,0===c?0:c/i.scrollRatio.y],w=p[0],x=q[0],z=w>0?w/i.scrollRatio.y:0,A=x>0?x/i.scrollRatio.y:0}v[1]<0||0===v[0]&&0===v[1]?v=[0,0]:v[1]>=u[1]?v=[u[0],u[1]]:v[0]=-v[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),!i.tweenRunning&&(0===t&&v[0]>=0||t===u[0]&&v[0]<=u[0])||(X(r[0],s,Math.round(v[1]),l[1],e.scrollEasing),X(n[0],s,Math.round(v[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,y(r),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&v[1]>=u[1]-z&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&v[1]<=A&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,y(r,"hide")},a)}}}))}},X=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=Y()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,a<1?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,a<1?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,a<1?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=Y(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},Y=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c=0&&d[0]+ca(e)[0]=0&&d[1]+ca(e)[1]").addClass(f("Inner")),h=a("");c.after(h.append(g)),h.addClass(d),b.mapClass&&h.addClass(c.attr("class")),b.mapStyle&&h.attr("style",c.attr("style")),c.addClass("hasCustomSelect").on("update",function(){e(c,h);var a=parseInt(c.outerWidth(),10)-(parseInt(h.outerWidth(),10)-parseInt(h.width(),10));h.css({display:"inline-block"});var b=h.outerHeight();c.attr("disabled")?h.addClass(f("Disabled")):h.removeClass(f("Disabled")),g.css({width:a,display:"inline-block"}),c.css({"-webkit-appearance":"menulist-button",width:h.outerWidth(),position:"absolute",opacity:0,height:b,fontSize:h.css("font-size")})}).on("change",function(){h.addClass(f("Changed")),e(c,h)}).on("keyup",function(a){h.hasClass(f("Open"))?13!=a.which&&27!=a.which||e(c,h):(c.blur(),c.focus())}).on("mousedown",function(a){h.removeClass(f("Changed"))}).on("mouseup",function(b){h.hasClass(f("Open"))||(a("."+f("Open")).not(h).length>0&&"undefined"!=typeof InstallTrigger?c.focus():(h.addClass(f("Open")),b.stopPropagation(),a(document).one("mouseup."+f("Open"),function(b){b.target!=c.get(0)&&a.inArray(b.target,c.find("*").get())<0?c.blur():e(c,h)})))}).focus(function(){h.removeClass(f("Changed")).addClass(f("Focus"))}).blur(function(){h.removeClass(f("Focus")+" "+f("Open"))}).hover(function(){h.addClass(f("Hover"))},function(){h.removeClass(f("Hover"))}).trigger("update")})}})}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(c){b(a,c)}):"object"==typeof module&&module.exports?module.exports=b(a,require("jquery")):a.jQueryBridget=b(a,a.jQuery)}(window,function(a,b){"use strict";function c(c,f,h){function i(a,b,d){var e,f="$()."+c+'("'+b+'")';return a.each(function(a,i){var j=h.data(i,c);if(!j)return void g(c+" not initialized. Cannot call methods, i.e. "+f);var k=j[b];if(!k||"_"==b.charAt(0))return void g(f+" is not a valid method");var l=k.apply(j,d);e=void 0===e?l:e}),void 0!==e?e:a}function j(a,b){a.each(function(a,d){var e=h.data(d,c);e?(e.option(b),e._init()):(e=new f(d,b),h.data(d,c,e))})}h=h||b||a.jQuery,h&&(f.prototype.option||(f.prototype.option=function(a){h.isPlainObject(a)&&(this.options=h.extend(!0,this.options,a))}),h.fn[c]=function(a){if("string"==typeof a){var b=e.call(arguments,1);return i(this,a,b)}return j(this,a),this},d(h))}function d(a){!a||a&&a.bridget||(a.bridget=c)}var e=Array.prototype.slice,f=a.console,g="undefined"==typeof f?function(){}:function(a){
f.error(a)};return d(b||a.jQuery),c}),function(a,b){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",b):"object"==typeof module&&module.exports?module.exports=b():a.EvEmitter=b()}(this,function(){function a(){}var b=a.prototype;return b.on=function(a,b){if(a&&b){var c=this._events=this._events||{},d=c[a]=c[a]||[];return d.indexOf(b)==-1&&d.push(b),this}},b.once=function(a,b){if(a&&b){this.on(a,b);var c=this._onceEvents=this._onceEvents||{},d=c[a]=c[a]||{};return d[b]=!0,this}},b.off=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=c.indexOf(b);return d!=-1&&c.splice(d,1),this}},b.emitEvent=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=0,e=c[d];b=b||[];for(var f=this._onceEvents&&this._onceEvents[a];e;){var g=f&&f[e];g&&(this.off(a,e),delete f[e]),e.apply(this,b),d+=g?0:1,e=c[d]}return this}},a}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return b()}):"object"==typeof module&&module.exports?module.exports=b():a.getSize=b()}(window,function(){"use strict";function a(a){var b=parseFloat(a),c=a.indexOf("%")==-1&&!isNaN(b);return c&&b}function b(){}function c(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0;bc&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},c._getContainerSize=function(){return{height:this.maxY}},b}),function(a,b){"function"==typeof define&&define.amd?define("isotope/layout-modes/vertical",["../layout-mode"],b):"object"==typeof module&&module.exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("vertical",{horizontalAlignment:0}),c=b.prototype;return c._resetLayout=function(){this.y=0},c._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},c._getContainerSize=function(){return{height:this.y}},b}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","./item","./layout-mode","./layout-modes/masonry","./layout-modes/fit-rows","./layout-modes/vertical"],function(c,d,e,f,g,h){return b(a,c,d,e,f,g,h)}):"object"==typeof module&&module.exports?module.exports=b(a,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=b(a,a.Outlayer,a.getSize,a.matchesSelector,a.fizzyUIUtils,a.Isotope.Item,a.Isotope.LayoutMode)}(window,function(a,b,c,d,e,f,g){function h(a,b){return function(c,d){for(var e=0;eh||gh?1:-1)*j}}return 0}}function i(a){var b=a.create("fitRows");return b.prototype._resetLayout=function(){if(this.x=0,this.y=0,this.maxY=0,this.row=0,this.rows=[],this._getMeasurement("gutter","outerWidth"),this.isotope.options.equalheight)for(var a=0;ac&&(this.x=0,this.y=this.maxY),0==this.x&&0!=this.y&&this.row++;var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,"undefined"==typeof this.rows[this.row]?(this.rows[this.row]=[],this.rows[this.row].start=this.y,this.rows[this.row].end=this.maxY):this.rows[this.row].end=Math.max(this.rows[this.row].end,this.maxY),a.row=this.row,d},b.prototype._equalHeight=function(){for(var a=0;a',nextButtonClass:"nav-next",nextButtonLabel:'',loadMoreButtonClass:"button-load-more",loadMoreButtonLabel:"Load more",pagerClass:"page",activeClass:"act",log:!1},h=a(this),s=b.paginationMode||i.paginationMode,t=a(b.pageControls||i.pageControls),j=a(b.filterControls||i.filterControls),k=a(b.sortControls||i.sortControls),l=a(b.orderControls||i.orderControls),m=b.controlsSelecter||i.controlsSelecter,n=b.controlsSelecterChecked||i.controlsSelecterChecked,d=1;var z=a(".phantom-sticky").exists(),A=a(".sticky-top-line").exists();if(z||A)var B=a(".masthead");else var B=a("#phantom");return r=a([]),r.$nodesCache=a([]),h.find("> article, .wf-cell").each(function(){var b=a(this);r.push({node:this,$node:b,name:b.attr("data-name"),date:new Date(b.attr("data-date"))}),r.$nodesCache.push(this)}),u=Math.ceil(r.length/b.pageLimit),p=function(){var a;"pages"!==s&&"load-more"!==s||(a=0,r.each(function(){if(this.$node.hasClass("visible"))return a++}),u=Math.ceil(a/(b.pageLimit||i.pageLimit)))},v=function(){if("pages"===s){var c,e;if(t.empty(),u>1){1!==d&&t.prepend(''+(b.previousButtonLabel||i.previousButtonLabel)+"");var f=5,g=f-1,j=Math.floor(g/2),k=Math.ceil(g/2),l=Math.max(d-j,1),m=d+k;l<=j&&(m=l+g),m>u&&(l=Math.max(u-g,1),m=u);var n=a(''),o=a('');for(c=e=1;1<=u?e<=u:e>=u;c=1<=u?++e:--e)c