diff --git a/assets/js/main.js b/assets/js/main.js
index 62823d4..7697321 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -20352,7 +20352,7 @@ URL: https://github.com/hammerjs/jquery.hammer.js
}
// /* ====== ON WINDOW LOAD ====== */
- $window.load(function() {
+ $window.on("load", function() {
softInit();
eventHandlers();
loop();
diff --git a/assets/js/main.min.js b/assets/js/main.min.js
index 709263e..dc2fdcd 100644
--- a/assets/js/main.min.js
+++ b/assets/js/main.min.js
@@ -1 +1 @@
-!function(t){var e,i,n=t.event;e=n.special.debouncedresize={setup:function(){t(this).on("resize",e.handler)},teardown:function(){t(this).off("resize",e.handler)},handler:function(t,r){var o=this,a=arguments,s=function(){t.type="debouncedresize",n.dispatch.apply(o,a)};i&&clearTimeout(i),r?s():i=setTimeout(s,e.threshold)},threshold:150}}(jQuery),function(t){t.fn.extend({getColumnsWidth:function(){$this=t(this).append("");var e,i=$this.find("span:last-of-type").position().left;return jQuery.browser.webkit?e="-webkit-":jQuery.browser.opera?e="-o-":jQuery.browser.mozilla?e="-moz-":jQuery.browser.msie&&(e="-ms-"),i+=parseInt($this.css(e+"column-width"),10),i-=parseInt($this.css(e+"column-gap"),10),t(this).find("span:last-of-type").remove(),i}})}(jQuery),function(t,e,i,n){"use strict";var r=["","webkit","moz","MS","ms","o"],o=e.createElement("div"),a="function",s=Math.round,l=Math.abs,c=Date.now;function u(t,e,i){return setTimeout(g(t,i),e)}function d(t,e,i){return!!Array.isArray(t)&&(h(t,i[e],i),!0)}function h(t,e,i){var r;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(r=0;r-1}function C(t){return t.trim().split(/\s+/g)}function S(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function E(t,e){for(var i,o,a=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=Q(e):1===o&&(i.firstMultiple=!1);var a=i.firstInput,s=i.firstMultiple,u=s?s.center:a.center,d=e.center=K(r);e.timeStamp=c(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=tt(u,d),e.distance=J(u,d),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==L&&o.eventType!==O||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y});e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=Z(e.deltaX,e.deltaY),e.scale=s?(h=s.pointers,f=r,J(f[0],f[1],V)/J(h[0],h[1],V)):1,e.rotation=s?function(t,e){return tt(e[1],e[0],V)-tt(t[1],t[0],V)}(s.pointers,r):0,function(t,e){var i,r,o,a,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(e.eventType!=P&&(c>D||s.velocity===n)){var u=s.deltaX-e.deltaX,d=s.deltaY-e.deltaY,h=function(t,e,i){return{x:e/t||0,y:i/t||0}}(c,u,d);r=h.x,o=h.y,i=l(h.x)>l(h.y)?h.x:h.y,a=Z(u,d),t.lastInterval=e}else i=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;e.velocity=i,e.velocityX=r,e.velocityY=o,e.direction=a}(i,e);var h,f;var p=t.element;b(e.srcEvent.target,p)&&(p=e.srcEvent.target);e.target=p}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Q(t){for(var e=[],i=0;i=l(e)?t>0?N:R:e>0?q:X}function J(t,e,i){i||(i=$);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function tt(t,e,i){i||(i=$);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}U.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(A(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(A(this.element),this.evWin,this.domHandler)}};var et={mousedown:L,mousemove:B,mouseup:O},it="mousedown",nt="mousemove mouseup";function rt(){this.evEl=it,this.evWin=nt,this.allow=!0,this.pressed=!1,U.apply(this,arguments)}m(rt,U,{handler:function(t){var e=et[t.type];e&L&&0===t.button&&(this.pressed=!0),e&B&&1!==t.which&&(e=O),this.pressed&&this.allow&&(e&O&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var ot={pointerdown:L,pointermove:B,pointerup:O,pointercancel:P,pointerout:P},at={2:"touch",3:"pen",4:"mouse",5:"kinect"},st="pointerdown",lt="pointermove pointerup pointercancel";function ct(){this.evEl=st,this.evWin=lt,U.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&(st="MSPointerDown",lt="MSPointerMove MSPointerUp MSPointerCancel"),m(ct,U,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),r=ot[n],o=at[t.pointerType]||t.pointerType,a="touch"==o,s=S(e,t.pointerId,"pointerId");r&L&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):r&(O|P)&&(i=!0),s<0||(e[s]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),i&&e.splice(s,1))}});var ut={touchstart:L,touchmove:B,touchend:O,touchcancel:P},dt="touchstart",ht="touchstart touchmove touchend touchcancel";function ft(){this.evTarget=dt,this.evWin=ht,this.started=!1,U.apply(this,arguments)}m(ft,U,{handler:function(t){var e=ut[t.type];if(e===L&&(this.started=!0),this.started){var i=function(t,e){var i=_(t.touches),n=_(t.changedTouches);e&(O|P)&&(i=k(i.concat(n),"identifier",!0));return[i,n]}.call(this,t,e);e&(O|P)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}}});var pt={touchstart:L,touchmove:B,touchend:O,touchcancel:P},mt="touchstart touchmove touchend touchcancel";function gt(){this.evTarget=mt,this.targetIds={},U.apply(this,arguments)}function vt(){U.apply(this,arguments);var t=g(this.handler,this);this.touch=new gt(this.manager,t),this.mouse=new rt(this.manager,t)}m(gt,U,{handler:function(t){var e=pt[t.type],i=function(t,e){var i=_(t.touches),n=this.targetIds;if(e&(L|B)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,o,a=_(t.changedTouches),s=[],l=this.target;if(o=i.filter(function(t){return b(t.target,l)}),e===L)for(r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(n){e.manager.emit(e.options.event+(n?function(t){if(t&zt)return"cancel";if(t&At)return"end";if(t&Ft)return"move";if(t&Et)return"start";return""}(i):""),t)}i=At&&n(!0)},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return Bt.prototype.attrTest.call(this,t)&&(this.state&Et||!(this.state&Et)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Dt(t.direction);e&&this.manager.emit(this.options.event+e,t),this._super.emit.call(this,t)}}),m(Pt,Bt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Tt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Et)},emit:function(t){if(this._super.emit.call(this,t),1!==t.scale){var e=t.scale<1?"in":"out";this.manager.emit(this.options.event+e,t)}}}),m(It,jt,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[xt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(O|P)&&!r)this.reset();else if(t.eventType&L)this.reset(),this._timer=u(function(){this.state=Mt,this.tryEmit()},e.time,this);else if(t.eventType&O)return Mt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Mt&&(t&&t.eventType&O?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}}),m(Nt,Bt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Tt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Et)}}),m(Rt,Bt,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:H|W,pointers:1},getTouchAction:function(){return Ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(H|W)?e=t.velocity:i&H?e=t.velocityX:i&W&&(e=t.velocityY),this._super.attrTest.call(this,t)&&i&t.direction&&t.distance>this.options.threshold&&l(e)>this.options.velocity&&t.eventType&O},emit:function(t){var e=Dt(t.direction);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),m(qt,jt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[bt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=r&&l-(i.data("appear-top-offset")||0)<=r+o.height()&&s+i.width()>=n&&s-(i.data("appear-left-offset")||0)<=n+o.width()},t.fn.extend({appear:function(o){var l=t.extend({},r,o||{}),c=this.selector||this;if(!i){var u=function(){n||(n=!0,setTimeout(s,l.interval))};t(window).scroll(u).resize(u),i=!0}return l.force_process&&setTimeout(s,l.interval),function(t){e.push(t),a.push()}(c),t(c)}}),t.extend({force_appear:function(){return!!i&&(s(),!0)}})}("undefined"!=typeof module?require("jquery"):jQuery),function(t,e){"use strict";t.support.cors=!0,t.fn.djax=function(e,i,n){if(!history.pushState)return t(this);var r=this,o=e,a=i&&i.length?i:[],s=n||t.fn.replaceWith;window.history.replaceState({url:window.location.href,title:t("title").text()},t("title").text(),window.location.href),r.clearDjaxing=function(){r.djaxing=!1},r.attachClick=function(e,i){var n=t(e),o=!1;return t.each(a,function(t,e){-1!==n.attr("href").indexOf(e)&&(o=!0),-1!==window.location.href.indexOf(e)&&(o=!0)}),t(e).is("[target^=_blank], [rel^=external]")&&(o=!0),o?t(e):(i.preventDefault(),r.djaxing?(setTimeout(r.clearDjaxing,1e3),t(e)):(t(window).trigger("djaxClick",[e]),r.reqUrl=n.attr("href"),r.triggered=!1,void r.navigate(n.attr("href"),!0)))},r.navigate=function(e,i){var n=t(o);r.djaxing=!0,t(window).trigger("djaxLoading",[{url:e}]);var a=function(a){if(e!==r.reqUrl)return r.navigate(r.reqUrl,!1),!0;var l=t(a),c=t(l).find(o);!0===i&&window.history.pushState({url:e,title:t(l).filter("title").text()},t(l).filter("title").text(),e),document.title=t(l).filter("title").text(),n.each(function(){var e="#"+t(this).attr("id"),i=c.filter(e),n=t(this);t("a",i).filter(function(){return this.hostname===location.hostname}).addClass("dJAX_internal").on("click",function(t){return r.attachClick(this,t)}),i.length?n.html()!==i.html()&&s.call(n,i):n.remove()}),t.each(c,function(){var e,i=t(this),n="#"+t(this).attr("id");t(n).length||((e=t(l).find(n).prev()).length?i.insertAfter("#"+e.attr("id")):i.prependTo("#"+i.parent().attr("id")),t("a",i).filter(function(){return this.hostname===location.hostname}).addClass("dJAX_internal").on("click",function(t){return r.attachClick(this,t)}))}),r.triggered||(t(window).trigger("djaxLoad",[{url:e,title:t(l).filter("title").text(),response:a}]),r.triggered=!0,r.djaxing=!1),t(window).trigger("djaxLoaded",[{url:e,title:t(l).filter("title").text(),response:a}])};t.ajax({url:e,success:function(t){a(t)},error:function(t,e,i){console.log("error",t,e,i),a(t.responseText)}})},t(this).find("a").filter(function(){return this.hostname===location.hostname}).addClass("dJAX_internal"),t(this).on("click",".dJAX_internal",function(t){if(this.hostname===location.hostname)return r.attachClick(this,t)}),t(window).bind("popstate",function(t){r.triggered=!1,t.originalEvent.state&&(r.reqUrl=t.originalEvent.state.url,r.navigate(t.originalEvent.state.url,!1))})}}(jQuery,window),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){"use strict";var e=!1,i=!1,n=0,r=2e3,o=0,a=t,s=document,l=window,c=a(l),u=[];var d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||!1,h=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||!1;if(d)l.cancelAnimationFrame||(h=function(t){});else{var f=0;d=function(t,e){var i=(new Date).getTime(),n=Math.max(0,16-(i-f)),r=l.setTimeout(function(){t(i+n)},n);return f=i+n,r},h=function(t){l.clearTimeout(t)}}var p,m,g,v=l.MutationObserver||l.WebKitMutationObserver||!1,y=Date.now||function(){return(new Date).getTime()},w={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:(m=s.currentScript||!!(p=s.getElementsByTagName("script")).length&&p[p.length-1],g=m?m.src.split("?")[0]:"",g.split("/").length>0?g.split("/").slice(0,-1).join("/")+"/":""),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},x=!1,b=function(t,f){var p=this;this.version="3.7.6",this.name="nicescroll",this.me=f;var m=a("body"),g=this.opt={doc:m,win:!1};if(a.extend(g,w),g.snapbackspeed=80,t)for(var b in g)void 0!==t[b]&&(g[b]=t[b]);if(g.disablemutationobserver&&(v=!1),this.doc=g.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(g.win?g.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==g.win,this.win=g.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=m,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=g.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==g.rtlmode){var C=this.win[0]==l?this.body:this.win,S=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==S||"lr-tb"==S||""===S?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==S||"tb"==S||"tb-rl"==S||"rl-tb"==S,this.isvertical="vertical-rl"==S||"tb"==S||"tb-rl"==S)}else this.isrtlmode=!0===g.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==g.scrollbarid)this.id=g.scrollbarid;else do{this.id="ascrail"+r++}while(s.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=g.overflowx,this.overflowy=g.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=function(){if(x)return x;var t=s.createElement("DIV"),e=t.style,i=navigator.userAgent,n=navigator.platform,r={};return r.haspointerlock="pointerLockElement"in s||"webkitPointerLockElement"in s||"mozPointerLockElement"in s,r.isopera="opera"in l,r.isopera12=r.isopera&&"getUserMedia"in navigator,r.isoperamini="[object OperaMini]"===Object.prototype.toString.call(l.operamini),r.isie="all"in s&&"attachEvent"in t&&!r.isopera,r.isieold=r.isie&&!("msInterpolationMode"in e),r.isie7=r.isie&&!r.isieold&&(!("documentMode"in s)||7===s.documentMode),r.isie8=r.isie&&"documentMode"in s&&8===s.documentMode,r.isie9=r.isie&&"performance"in l&&9===s.documentMode,r.isie10=r.isie&&"performance"in l&&10===s.documentMode,r.isie11="msRequestFullscreen"in t&&s.documentMode>=11,r.ismsedge="msCredentials"in l,r.ismozilla="MozAppearance"in e,r.iswebkit=!r.ismsedge&&"WebkitAppearance"in e,r.ischrome=r.iswebkit&&"chrome"in l,r.ischrome38=r.ischrome&&"touchAction"in e,r.ischrome22=!r.ischrome38&&r.ischrome&&r.haspointerlock,r.ischrome26=!r.ischrome38&&r.ischrome&&"transition"in e,r.cantouch="ontouchstart"in s.documentElement||"ontouchstart"in l,r.hasw3ctouch=!!l.PointerEvent&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),r.hasmstouch=!r.hasw3ctouch&&(l.MSPointerEvent||!1),r.ismac=/^mac$/i.test(n),r.isios=r.cantouch&&/iphone|ipad|ipod/i.test(n),r.isios4=r.isios&&!("seal"in Object),r.isios7=r.isios&&"webkitHidden"in s,r.isios8=r.isios&&"hidden"in s,r.isios10=r.isios&&l.Proxy,r.isandroid=/android/i.test(i),r.haseventlistener="addEventListener"in t,r.trstyle=!1,r.hastransform=!1,r.hastranslate3d=!1,r.transitionstyle=!1,r.hastransition=!1,r.transitionend=!1,r.trstyle="transform",r.hastransform="transform"in e||function(){for(var t=["msTransform","webkitTransform","MozTransform","OTransform"],i=0,n=t.length;i=1?this.ed:this.st+this.df*e|0},update:function(t,e){return this.st=this.getNow(),this.ed=t,this.spd=e,this.ts=y(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},_.hastranslate3d&&_.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(t){if(!t){var e=E();if(e)return 16==e.length?-e[13]:-e[5];if(p.timerscroll&&p.timerscroll.bz)return p.timerscroll.bz.getNow()}return p.doc.translate.y},this.getScrollLeft=function(t){if(!t){var e=E();if(e)return 16==e.length?-e[12]:-e[4];if(p.timerscroll&&p.timerscroll.bh)return p.timerscroll.bh.getNow()}return p.doc.translate.x},this.notifyScrollEvent=function(t){var e=s.createEvent("UIEvents");e.initUIEvent("scroll",!1,!1,l,1),e.niceevent=!0,t.dispatchEvent(e)};var F=this.isrtlmode?1:-1;_.hastranslate3d&&g.enabletranslate3d?(this.setScrollTop=function(t,e){p.doc.translate.y=t,p.doc.translate.ty=-1*t+"px",p.doc.css(_.trstyle,"translate3d("+p.doc.translate.tx+","+p.doc.translate.ty+",0)"),e||p.notifyScrollEvent(p.win[0])},this.setScrollLeft=function(t,e){p.doc.translate.x=t,p.doc.translate.tx=t*F+"px",p.doc.css(_.trstyle,"translate3d("+p.doc.translate.tx+","+p.doc.translate.ty+",0)"),e||p.notifyScrollEvent(p.win[0])}):(this.setScrollTop=function(t,e){p.doc.translate.y=t,p.doc.translate.ty=-1*t+"px",p.doc.css(_.trstyle,"translate("+p.doc.translate.tx+","+p.doc.translate.ty+")"),e||p.notifyScrollEvent(p.win[0])},this.setScrollLeft=function(t,e){p.doc.translate.x=t,p.doc.translate.tx=t*F+"px",p.doc.css(_.trstyle,"translate("+p.doc.translate.tx+","+p.doc.translate.ty+")"),e||p.notifyScrollEvent(p.win[0])})}else this.getScrollTop=function(){return p.docscroll.scrollTop()},this.setScrollTop=function(t){p.docscroll.scrollTop(t)},this.getScrollLeft=function(){return p.hasreversehr?p.detected.ismozilla?p.page.maxw-Math.abs(p.docscroll.scrollLeft()):p.page.maxw-p.docscroll.scrollLeft():p.docscroll.scrollLeft()},this.setScrollLeft=function(t){return setTimeout(function(){if(p)return p.hasreversehr&&(t=p.detected.ismozilla?-(p.page.maxw-t):p.page.maxw-t),p.docscroll.scrollLeft(t)},1)};this.getTarget=function(t){return!!t&&(t.target?t.target:!!t.srcElement&&t.srcElement)},this.hasParent=function(t,e){if(!t)return!1;for(var i=t.target||t.srcElement||t||!1;i&&i.id!=e;)i=i.parentNode||!1;return!1!==i};var A={thin:1,medium:3,thick:5};function M(t,e,i){var n=t.css(e),r=parseFloat(n);if(isNaN(r)){var o=3==(r=A[n]||0)?i?p.win.outerHeight()-p.win.innerHeight():p.win.outerWidth()-p.win.innerWidth():1;return p.isie8&&r&&(r+=1),o?r:0}return r}this.getDocumentScrollOffset=function(){return{top:l.pageYOffset||s.documentElement.scrollTop,left:l.pageXOffset||s.documentElement.scrollLeft}},this.getOffset=function(){if(p.isfixed){var t=p.win.offset(),e=p.getDocumentScrollOffset();return t.top-=e.top,t.left-=e.left,t}var i=p.win.offset();if(!p.viewport)return i;var n=p.viewport.offset();return{top:i.top-n.top,left:i.left-n.left}},this.updateScrollBar=function(t){var e,i;if(p.ishwscroll)p.rail.css({height:p.win.innerHeight()-(g.railpadding.top+g.railpadding.bottom)}),p.railh&&p.railh.css({width:p.win.innerWidth()-(g.railpadding.left+g.railpadding.right)});else{var n=p.getOffset();if((e={top:n.top,left:n.left-(g.railpadding.left+g.railpadding.right)}).top+=M(p.win,"border-top-width",!0),e.left+=p.rail.align?p.win.outerWidth()-M(p.win,"border-right-width")-p.rail.width:M(p.win,"border-left-width"),(i=g.railoffset)&&(i.top&&(e.top+=i.top),i.left&&(e.left+=i.left)),p.railslocked||p.rail.css({top:e.top,left:e.left,height:(t?t.h:p.win.innerHeight())-(g.railpadding.top+g.railpadding.bottom)}),p.zoom&&p.zoom.css({top:e.top+1,left:1==p.rail.align?e.left-20:e.left+p.rail.width+4}),p.railh&&!p.railslocked){e={top:n.top,left:n.left},(i=g.railhoffset)&&(i.top&&(e.top+=i.top),i.left&&(e.left+=i.left));var r=p.railh.align?e.top+M(p.win,"border-top-width",!0)+p.win.innerHeight()-p.railh.height:e.top+M(p.win,"border-top-width",!0),o=e.left+M(p.win,"border-left-width");p.railh.css({top:r-(g.railpadding.top+g.railpadding.bottom),left:o,width:p.railh.width})}}},this.doRailClick=function(t,e,i){var n,r,o,a;p.railslocked||(p.cancelEvent(t),"pageY"in t||(t.pageX=t.clientX+s.documentElement.scrollLeft,t.pageY=t.clientY+s.documentElement.scrollTop),e?(n=i?p.doScrollLeft:p.doScrollTop,o=i?(t.pageX-p.railh.offset().left-p.cursorwidth/2)*p.scrollratio.x:(t.pageY-p.rail.offset().top-p.cursorheight/2)*p.scrollratio.y,p.unsynched("relativexy"),n(0|o)):(n=i?p.doScrollLeftBy:p.doScrollBy,o=i?p.scroll.x:p.scroll.y,a=i?t.pageX-p.railh.offset().left:t.pageY-p.rail.offset().top,r=i?p.view.w:p.view.h,n(o>=a?r:-r)))},p.newscrolly=p.newscrollx=0,p.hasanimationframe="requestAnimationFrame"in l,p.hascancelanimationframe="cancelAnimationFrame"in l,p.hasborderbox=!1,this.init=function(){if(p.saved.css=[],_.isoperamini)return!0;if(_.isandroid&&!("hidden"in s))return!0;g.emulatetouch=g.emulatetouch||g.touchbehavior,p.hasborderbox=l.getComputedStyle&&"border-box"===l.getComputedStyle(s.body)["box-sizing"];var t={"overflow-y":"hidden"};if((_.isie11||_.isie10)&&(t["-ms-overflow-style"]="none"),p.ishwscroll&&(this.doc.css(_.transitionstyle,_.prefixstyle+"transform 0ms ease-out"),_.transitionend&&p.bind(p.doc,_.transitionend,p.onScrollTransitionEnd,!1)),p.zindex="auto",p.ispage||"auto"!=g.zindex?p.zindex=g.zindex:p.zindex=function(){var t=p.win;if("zIndex"in t)return t.zIndex();for(;t.length>0;){if(9==t[0].nodeType)return!1;var e=t.css("zIndex");if(!isNaN(e)&&0!==e)return parseInt(e);t=t.parent()}return!1}()||"auto",!p.ispage&&"auto"!=p.zindex&&p.zindex>o&&(o=p.zindex),p.isie&&0===p.zindex&&"auto"==g.zindex&&(p.zindex="auto"),!p.ispage||!_.isieold){var r=p.docscroll;p.ispage&&(r=p.haswrapper?p.win:p.doc),p.css(r,t),p.ispage&&(_.isie11||_.isie)&&p.css(a("html"),t),!_.isios||p.ispage||p.haswrapper||p.css(m,{"-webkit-overflow-scrolling":"touch"});var u=a(s.createElement("div"));u.css({position:"relative",top:0,float:"right",width:g.cursorwidth,height:0,"background-color":g.cursorcolor,border:g.cursorborder,"background-clip":"padding-box","-webkit-border-radius":g.cursorborderradius,"-moz-border-radius":g.cursorborderradius,"border-radius":g.cursorborderradius}),u.addClass("nicescroll-cursors"),p.cursor=u;var d=a(s.createElement("div"));d.attr("id",p.id),d.addClass("nicescroll-rails nicescroll-rails-vr");var h,f,y=["left","right","top","bottom"];for(var w in y)f=y[w],(h=g.railpadding[f]||0)&&d.css("padding-"+f,h+"px");d.append(u),d.width=Math.max(parseFloat(g.cursorwidth),u.outerWidth()),d.css({width:d.width+"px",zIndex:p.zindex,background:g.background,cursor:"default"}),d.visibility=!0,d.scrollable=!0,d.align="left"==g.railalign?0:1,p.rail=d,p.rail.drag=!1;var x,b=!1;if(!g.boxzoom||p.ispage||_.isieold||(b=s.createElement("div"),p.bind(b,"click",p.doZoom),p.bind(b,"mouseenter",function(){p.zoom.css("opacity",g.cursoropacitymax)}),p.bind(b,"mouseleave",function(){p.zoom.css("opacity",g.cursoropacitymin)}),p.zoom=a(b),p.zoom.css({cursor:"pointer",zIndex:p.zindex,backgroundImage:"url("+g.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),g.dblclickzoom&&p.bind(p.win,"dblclick",p.doZoom),_.cantouch&&g.gesturezoom&&(p.ongesturezoom=function(t){return t.scale>1.5&&p.doZoomIn(t),t.scale<.8&&p.doZoomOut(t),p.cancelEvent(t)},p.bind(p.win,"gestureend",p.ongesturezoom))),p.railh=!1,g.horizrailenabled&&(p.css(r,{overflowX:"hidden"}),(u=a(s.createElement("div"))).css({position:"absolute",top:0,height:g.cursorwidth,width:0,backgroundColor:g.cursorcolor,border:g.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":g.cursorborderradius,"-moz-border-radius":g.cursorborderradius,"border-radius":g.cursorborderradius}),_.isieold&&u.css("overflow","hidden"),u.addClass("nicescroll-cursors"),p.cursorh=u,(x=a(s.createElement("div"))).attr("id",p.id+"-hr"),x.addClass("nicescroll-rails nicescroll-rails-hr"),x.height=Math.max(parseFloat(g.cursorwidth),u.outerHeight()),x.css({height:x.height+"px",zIndex:p.zindex,background:g.background}),x.append(u),x.visibility=!0,x.scrollable=!0,x.align="top"==g.railvalign?0:1,p.railh=x,p.railh.drag=!1),p.ispage)d.css({position:"fixed",top:0,height:"100%"}),d.css(d.align?{right:0}:{left:0}),p.body.append(d),p.railh&&(x.css({position:"fixed",left:0,width:"100%"}),x.css(x.align?{bottom:0}:{top:0}),p.body.append(x));else{if(p.ishwscroll){"static"==p.win.css("position")&&p.css(p.win,{position:"relative"});var C="HTML"==p.win[0].nodeName?p.body:p.win;a(C).scrollTop(0).scrollLeft(0),p.zoom&&(p.zoom.css({position:"absolute",top:1,right:0,"margin-right":d.width+4}),C.append(p.zoom)),d.css({position:"absolute",top:0}),d.css(d.align?{right:0}:{left:0}),C.append(d),x&&(x.css({position:"absolute",left:0,bottom:0}),x.css(x.align?{bottom:0}:{top:0}),C.append(x))}else{p.isfixed="fixed"==p.win.css("position");var S=p.isfixed?"fixed":"absolute";p.isfixed||(p.viewport=p.getViewport(p.win[0])),p.viewport&&(p.body=p.viewport,/fixed|absolute/.test(p.viewport.css("position"))||p.css(p.viewport,{position:"relative"})),d.css({position:S}),p.zoom&&p.zoom.css({position:S}),p.updateScrollBar(),p.body.append(d),p.zoom&&p.body.append(p.zoom),p.railh&&(x.css({position:S}),p.body.append(x))}_.isios&&p.css(p.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),g.disableoutline&&(_.isie&&p.win.attr("hideFocus","true"),_.iswebkit&&p.win.css("outline","none"))}if(!1===g.autohidemode?(p.autohidedom=!1,p.rail.css({opacity:g.cursoropacitymax}),p.railh&&p.railh.css({opacity:g.cursoropacitymax})):!0===g.autohidemode||"leave"===g.autohidemode?(p.autohidedom=a().add(p.rail),_.isie8&&(p.autohidedom=p.autohidedom.add(p.cursor)),p.railh&&(p.autohidedom=p.autohidedom.add(p.railh)),p.railh&&_.isie8&&(p.autohidedom=p.autohidedom.add(p.cursorh))):"scroll"==g.autohidemode?(p.autohidedom=a().add(p.rail),p.railh&&(p.autohidedom=p.autohidedom.add(p.railh))):"cursor"==g.autohidemode?(p.autohidedom=a().add(p.cursor),p.railh&&(p.autohidedom=p.autohidedom.add(p.cursorh))):"hidden"==g.autohidemode&&(p.autohidedom=!1,p.hide(),p.railslocked=!1),_.cantouch||p.istouchcapable||g.emulatetouch||_.hasmstouch){p.scrollmom=new T(p);p.ontouchstart=function(t){if(p.locked)return!1;if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!1;if(p.hasmoving=!1,p.scrollmom.timer&&(p.triggerScrollEnd(),p.scrollmom.stop()),!p.railslocked){var e=p.getTarget(t);if(e)if(/INPUT/i.test(e.nodeName)&&/range/i.test(e.type))return p.stopPropagation(t);var i="mousedown"===t.type;if(!("clientX"in t)&&"changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),p.forcescreen){var n=t;(t={original:t.original?t.original:t}).clientX=n.screenX,t.clientY=n.screenY}if(p.rail.drag={x:t.clientX,y:t.clientY,sx:p.scroll.x,sy:p.scroll.y,st:p.getScrollTop(),sl:p.getScrollLeft(),pt:2,dl:!1,tg:e},p.ispage||!g.directionlockdeadzone)p.rail.drag.dl="f";else{var r={w:c.width(),h:c.height()},o=p.getContentSize(),s=o.h-r.h,l=o.w-r.w;p.rail.scrollable&&!p.railh.scrollable?p.rail.drag.ck=s>0&&"v":!p.rail.scrollable&&p.railh.scrollable?p.rail.drag.ck=l>0&&"h":p.rail.drag.ck=!1}if(g.emulatetouch&&p.isiframe&&_.isie){var u=p.win.position();p.rail.drag.x+=u.left,p.rail.drag.y+=u.top}if(p.hasmoving=!1,p.lastmouseup=!1,p.scrollmom.reset(t.clientX,t.clientY),e&&i){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(e.nodeName))return _.hasmousecapture&&e.setCapture(),g.emulatetouch?(e.onclick&&!e._onclick&&(e._onclick=e.onclick,e.onclick=function(t){if(p.hasmoving)return!1;e._onclick.call(this,t)}),p.cancelEvent(t)):p.stopPropagation(t);/SUBMIT|CANCEL|BUTTON/i.test(a(e).attr("type"))&&(p.preventclick={tg:e,click:!1})}}},p.ontouchend=function(t){if(!p.rail.drag)return!0;if(2==p.rail.drag.pt){if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!1;p.rail.drag=!1;var e="mouseup"===t.type;if(p.hasmoving&&(p.scrollmom.doMomentum(),p.lastmouseup=!0,p.hideCursor(),_.hasmousecapture&&s.releaseCapture(),e))return p.cancelEvent(t)}else if(1==p.rail.drag.pt)return p.onmouseup(t)};var k=g.emulatetouch&&p.isiframe&&!_.hasmousecapture,E=.3*g.directionlockdeadzone|0;p.ontouchmove=function(t,e){if(!p.rail.drag)return!0;if(t.targetTouches&&g.preventmultitouchscrolling&&t.targetTouches.length>1)return!0;if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!0;if(2==p.rail.drag.pt){var i,n;if("changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),n=i=0,k&&!e){var r=p.win.position();n=-r.left,i=-r.top}var o=t.clientY+i,a=o-p.rail.drag.y,l=t.clientX+n,c=l-p.rail.drag.x,u=p.rail.drag.st-a;if(p.ishwscroll&&g.bouncescroll)u<0?u=Math.round(u/2):u>p.page.maxh&&(u=p.page.maxh+Math.round((u-p.page.maxh)/2));else if(u<0?(u=0,o=0):u>p.page.maxh&&(u=p.page.maxh,o=0),0===o&&!p.hasmoving)return p.ispage||(p.rail.drag=!1),!0;var d=p.getScrollLeft();if(p.railh&&p.railh.scrollable&&(d=p.isrtlmode?c-p.rail.drag.sl:p.rail.drag.sl-c,p.ishwscroll&&g.bouncescroll?d<0?d=Math.round(d/2):d>p.page.maxw&&(d=p.page.maxw+Math.round((d-p.page.maxw)/2)):(d<0&&(d=0,l=0),d>p.page.maxw&&(d=p.page.maxw,l=0))),!p.hasmoving){if(p.rail.drag.y===t.clientY&&p.rail.drag.x===t.clientX)return p.cancelEvent(t);var h=Math.abs(a),f=Math.abs(c),m=g.directionlockdeadzone;if(p.rail.drag.ck?"v"==p.rail.drag.ck?f>m&&h<=E?p.rail.drag=!1:h>m&&(p.rail.drag.dl="v"):"h"==p.rail.drag.ck&&(h>m&&f<=E?p.rail.drag=!1:f>m&&(p.rail.drag.dl="h")):h>m&&f>m?p.rail.drag.dl="f":h>m?p.rail.drag.dl=f>E?"f":"v":f>m&&(p.rail.drag.dl=h>E?"f":"h"),!p.rail.drag.dl)return p.cancelEvent(t);p.triggerScrollStart(t.clientX,t.clientY,0,0,0),p.hasmoving=!0}return p.preventclick&&!p.preventclick.click&&(p.preventclick.click=p.preventclick.tg.onclick||!1,p.preventclick.tg.onclick=p.onpreventclick),p.rail.drag.dl&&("v"==p.rail.drag.dl?d=p.rail.drag.sl:"h"==p.rail.drag.dl&&(u=p.rail.drag.st)),p.synched("touchmove",function(){p.rail.drag&&2==p.rail.drag.pt&&(p.prepareTransition&&p.resetTransition(),p.rail.scrollable&&p.setScrollTop(u),p.scrollmom.update(l,o),p.railh&&p.railh.scrollable?(p.setScrollLeft(d),p.showCursor(u,d)):p.showCursor(u),_.isie10&&s.selection.clear())}),p.cancelEvent(t)}return 1==p.rail.drag.pt?p.onmousemove(t):void 0},p.ontouchstartCursor=function(t,e){if(!p.rail.drag||3==p.rail.drag.pt){if(p.locked)return p.cancelEvent(t);p.cancelScroll(),p.rail.drag={x:t.touches[0].clientX,y:t.touches[0].clientY,sx:p.scroll.x,sy:p.scroll.y,pt:3,hr:!!e};var i=p.getTarget(t);return!p.ispage&&_.hasmousecapture&&i.setCapture(),p.isiframe&&!_.hasmousecapture&&(p.saved.csspointerevents=p.doc.css("pointer-events"),p.css(p.doc,{"pointer-events":"none"})),p.cancelEvent(t)}},p.ontouchendCursor=function(t){if(p.rail.drag){if(_.hasmousecapture&&s.releaseCapture(),p.isiframe&&!_.hasmousecapture&&p.doc.css("pointer-events",p.saved.csspointerevents),3!=p.rail.drag.pt)return;return p.rail.drag=!1,p.cancelEvent(t)}},p.ontouchmoveCursor=function(t){if(p.rail.drag){if(3!=p.rail.drag.pt)return;if(p.cursorfreezed=!0,p.rail.drag.hr){p.scroll.x=p.rail.drag.sx+(t.touches[0].clientX-p.rail.drag.x),p.scroll.x<0&&(p.scroll.x=0);var e=p.scrollvaluemaxw;p.scroll.x>e&&(p.scroll.x=e)}else{p.scroll.y=p.rail.drag.sy+(t.touches[0].clientY-p.rail.drag.y),p.scroll.y<0&&(p.scroll.y=0);var i=p.scrollvaluemax;p.scroll.y>i&&(p.scroll.y=i)}return p.synched("touchmove",function(){p.rail.drag&&3==p.rail.drag.pt&&(p.showCursor(),p.rail.drag.hr?p.doScrollLeft(Math.round(p.scroll.x*p.scrollratio.x),g.cursordragspeed):p.doScrollTop(Math.round(p.scroll.y*p.scrollratio.y),g.cursordragspeed))}),p.cancelEvent(t)}}}if(p.onmousedown=function(t,e){if(!p.rail.drag||1==p.rail.drag.pt){if(p.railslocked)return p.cancelEvent(t);p.cancelScroll(),p.rail.drag={x:t.clientX,y:t.clientY,sx:p.scroll.x,sy:p.scroll.y,pt:1,hr:e||!1};var i=p.getTarget(t);return _.hasmousecapture&&i.setCapture(),p.isiframe&&!_.hasmousecapture&&(p.saved.csspointerevents=p.doc.css("pointer-events"),p.css(p.doc,{"pointer-events":"none"})),p.hasmoving=!1,p.cancelEvent(t)}},p.onmouseup=function(t){if(p.rail.drag)return 1!=p.rail.drag.pt||(_.hasmousecapture&&s.releaseCapture(),p.isiframe&&!_.hasmousecapture&&p.doc.css("pointer-events",p.saved.csspointerevents),p.rail.drag=!1,p.cursorfreezed=!1,p.hasmoving&&p.triggerScrollEnd(),p.cancelEvent(t))},p.onmousemove=function(t){if(p.rail.drag){if(1!==p.rail.drag.pt)return;if(_.ischrome&&0===t.which)return p.onmouseup(t);if(p.cursorfreezed=!0,p.hasmoving||p.triggerScrollStart(t.clientX,t.clientY,0,0,0),p.hasmoving=!0,p.rail.drag.hr){p.scroll.x=p.rail.drag.sx+(t.clientX-p.rail.drag.x),p.scroll.x<0&&(p.scroll.x=0);var e=p.scrollvaluemaxw;p.scroll.x>e&&(p.scroll.x=e)}else{p.scroll.y=p.rail.drag.sy+(t.clientY-p.rail.drag.y),p.scroll.y<0&&(p.scroll.y=0);var i=p.scrollvaluemax;p.scroll.y>i&&(p.scroll.y=i)}return p.synched("mousemove",function(){p.cursorfreezed&&(p.showCursor(),p.rail.drag.hr?p.scrollLeft(Math.round(p.scroll.x*p.scrollratio.x)):p.scrollTop(Math.round(p.scroll.y*p.scrollratio.y)))}),p.cancelEvent(t)}p.checkarea=0},_.cantouch||g.emulatetouch)p.onpreventclick=function(t){if(p.preventclick)return p.preventclick.tg.onclick=p.preventclick.click,p.preventclick=!1,p.cancelEvent(t)},p.onclick=!_.isios&&function(t){return!p.lastmouseup||(p.lastmouseup=!1,p.cancelEvent(t))},g.grabcursorenabled&&_.cursorgrabvalue&&(p.css(p.ispage?p.doc:p.win,{cursor:_.cursorgrabvalue}),p.css(p.rail,{cursor:_.cursorgrabvalue}));else{var F=function(t){if(p.selectiondrag){if(t){var e=p.win.outerHeight(),i=t.pageY-p.selectiondrag.top;i>0&&i=e&&(i-=e),p.selectiondrag.df=i}if(0!==p.selectiondrag.df){var n=-2*p.selectiondrag.df/6|0;p.doScrollBy(n),p.debounced("doselectionscroll",function(){F()},50)}}};p.hasTextSelected="getSelection"in s?function(){return s.getSelection().rangeCount>0}:"selection"in s?function(){return"None"!=s.selection.type}:function(){return!1},p.onselectionstart=function(t){p.ispage||(p.selectiondrag=p.win.offset())},p.onselectionend=function(t){p.selectiondrag=!1},p.onselectiondrag=function(t){p.selectiondrag&&p.hasTextSelected()&&p.debounced("selectionscroll",function(){F(t)},250)}}if(_.hasw3ctouch?(p.css(p.ispage?a("html"):p.win,{"touch-action":"none"}),p.css(p.rail,{"touch-action":"none"}),p.css(p.cursor,{"touch-action":"none"}),p.bind(p.win,"pointerdown",p.ontouchstart),p.bind(s,"pointerup",p.ontouchend),p.delegate(s,"pointermove",p.ontouchmove)):_.hasmstouch?(p.css(p.ispage?a("html"):p.win,{"-ms-touch-action":"none"}),p.css(p.rail,{"-ms-touch-action":"none"}),p.css(p.cursor,{"-ms-touch-action":"none"}),p.bind(p.win,"MSPointerDown",p.ontouchstart),p.bind(s,"MSPointerUp",p.ontouchend),p.delegate(s,"MSPointerMove",p.ontouchmove),p.bind(p.cursor,"MSGestureHold",function(t){t.preventDefault()}),p.bind(p.cursor,"contextmenu",function(t){t.preventDefault()})):_.cantouch&&(p.bind(p.win,"touchstart",p.ontouchstart,!1,!0),p.bind(s,"touchend",p.ontouchend,!1,!0),p.bind(s,"touchcancel",p.ontouchend,!1,!0),p.delegate(s,"touchmove",p.ontouchmove,!1,!0)),g.emulatetouch&&(p.bind(p.win,"mousedown",p.ontouchstart,!1,!0),p.bind(s,"mouseup",p.ontouchend,!1,!0),p.bind(s,"mousemove",p.ontouchmove,!1,!0)),(g.cursordragontouch||!_.cantouch&&!g.emulatetouch)&&(p.rail.css({cursor:"default"}),p.railh&&p.railh.css({cursor:"default"}),p.jqbind(p.rail,"mouseenter",function(){if(!p.ispage&&!p.win.is(":visible"))return!1;p.canshowonmouseevent&&p.showCursor(),p.rail.active=!0}),p.jqbind(p.rail,"mouseleave",function(){p.rail.active=!1,p.rail.drag||p.hideCursor()}),g.sensitiverail&&(p.bind(p.rail,"click",function(t){p.doRailClick(t,!1,!1)}),p.bind(p.rail,"dblclick",function(t){p.doRailClick(t,!0,!1)}),p.bind(p.cursor,"click",function(t){p.cancelEvent(t)}),p.bind(p.cursor,"dblclick",function(t){p.cancelEvent(t)})),p.railh&&(p.jqbind(p.railh,"mouseenter",function(){if(!p.ispage&&!p.win.is(":visible"))return!1;p.canshowonmouseevent&&p.showCursor(),p.rail.active=!0}),p.jqbind(p.railh,"mouseleave",function(){p.rail.active=!1,p.rail.drag||p.hideCursor()}),g.sensitiverail&&(p.bind(p.railh,"click",function(t){p.doRailClick(t,!1,!0)}),p.bind(p.railh,"dblclick",function(t){p.doRailClick(t,!0,!0)}),p.bind(p.cursorh,"click",function(t){p.cancelEvent(t)}),p.bind(p.cursorh,"dblclick",function(t){p.cancelEvent(t)})))),g.cursordragontouch&&(this.istouchcapable||_.cantouch)&&(p.bind(p.cursor,"touchstart",p.ontouchstartCursor),p.bind(p.cursor,"touchmove",p.ontouchmoveCursor),p.bind(p.cursor,"touchend",p.ontouchendCursor),p.cursorh&&p.bind(p.cursorh,"touchstart",function(t){p.ontouchstartCursor(t,!0)}),p.cursorh&&p.bind(p.cursorh,"touchmove",p.ontouchmoveCursor),p.cursorh&&p.bind(p.cursorh,"touchend",p.ontouchendCursor)),g.emulatetouch||_.isandroid||_.isios?(p.bind(_.hasmousecapture?p.win:s,"mouseup",p.ontouchend),p.onclick&&p.bind(s,"click",p.onclick),g.cursordragontouch?(p.bind(p.cursor,"mousedown",p.onmousedown),p.bind(p.cursor,"mouseup",p.onmouseup),p.cursorh&&p.bind(p.cursorh,"mousedown",function(t){p.onmousedown(t,!0)}),p.cursorh&&p.bind(p.cursorh,"mouseup",p.onmouseup)):(p.bind(p.rail,"mousedown",function(t){t.preventDefault()}),p.railh&&p.bind(p.railh,"mousedown",function(t){t.preventDefault()}))):(p.bind(_.hasmousecapture?p.win:s,"mouseup",p.onmouseup),p.bind(s,"mousemove",p.onmousemove),p.onclick&&p.bind(s,"click",p.onclick),p.bind(p.cursor,"mousedown",p.onmousedown),p.bind(p.cursor,"mouseup",p.onmouseup),p.railh&&(p.bind(p.cursorh,"mousedown",function(t){p.onmousedown(t,!0)}),p.bind(p.cursorh,"mouseup",p.onmouseup)),!p.ispage&&g.enablescrollonselection&&(p.bind(p.win[0],"mousedown",p.onselectionstart),p.bind(s,"mouseup",p.onselectionend),p.bind(p.cursor,"mouseup",p.onselectionend),p.cursorh&&p.bind(p.cursorh,"mouseup",p.onselectionend),p.bind(s,"mousemove",p.onselectiondrag)),p.zoom&&(p.jqbind(p.zoom,"mouseenter",function(){p.canshowonmouseevent&&p.showCursor(),p.rail.active=!0}),p.jqbind(p.zoom,"mouseleave",function(){p.rail.active=!1,p.rail.drag||p.hideCursor()}))),g.enablemousewheel&&(p.isiframe||p.mousewheel(_.isie&&p.ispage?s:p.win,p.onmousewheel),p.mousewheel(p.rail,p.onmousewheel),p.railh&&p.mousewheel(p.railh,p.onmousewheelhr)),p.ispage||_.cantouch||/HTML|^BODY/.test(p.win[0].nodeName)||(p.win.attr("tabindex")||p.win.attr({tabindex:++n}),p.bind(p.win,"focus",function(t){e=p.getTarget(t).id||p.getTarget(t)||!1,p.hasfocus=!0,p.canshowonmouseevent&&p.noticeCursor()}),p.bind(p.win,"blur",function(t){e=!1,p.hasfocus=!1}),p.bind(p.win,"mouseenter",function(t){i=p.getTarget(t).id||p.getTarget(t)||!1,p.hasmousefocus=!0,p.canshowonmouseevent&&p.noticeCursor()}),p.bind(p.win,"mouseleave",function(t){i=!1,p.hasmousefocus=!1,p.rail.drag||p.hideCursor()})),p.onkeypress=function(t){if(p.railslocked&&0===p.page.maxh)return!0;t=t||l.event;var n=p.getTarget(t);if(n&&/INPUT|TEXTAREA|SELECT|OPTION/.test(n.nodeName)&&(!(n.getAttribute("type")||n.type||!1)||!/submit|button|cancel/i.tp))return!0;if(a(n).attr("contenteditable"))return!0;if(p.hasfocus||p.hasmousefocus&&!e||p.ispage&&!e&&!i){var r=t.keyCode;if(p.railslocked&&27!=r)return p.cancelEvent(t);var o=t.ctrlKey||!1,s=t.shiftKey||!1,c=!1;switch(r){case 38:case 63233:p.doScrollBy(72),c=!0;break;case 40:case 63235:p.doScrollBy(-72),c=!0;break;case 37:case 63232:p.railh&&(o?p.doScrollLeft(0):p.doScrollLeftBy(72),c=!0);break;case 39:case 63234:p.railh&&(o?p.doScrollLeft(p.page.maxw):p.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:p.doScrollBy(p.view.h),c=!0;break;case 34:case 63277:p.doScrollBy(-p.view.h),c=!0;break;case 36:case 63273:p.railh&&o?p.doScrollPos(0,0):p.doScrollTo(0),c=!0;break;case 35:case 63275:p.railh&&o?p.doScrollPos(p.page.maxw,p.page.maxh):p.doScrollTo(p.page.maxh),c=!0;break;case 32:g.spacebarenabled&&(s?p.doScrollBy(p.view.h):p.doScrollBy(-p.view.h),c=!0);break;case 27:p.zoomactive&&(p.doZoom(),c=!0)}if(c)return p.cancelEvent(t)}},g.enablekeyboard&&p.bind(s,_.isopera&&!_.isopera12?"keypress":"keydown",p.onkeypress),p.bind(s,"keydown",function(t){(t.ctrlKey||!1)&&(p.wheelprevented=!0)}),p.bind(s,"keyup",function(t){t.ctrlKey||!1||(p.wheelprevented=!1)}),p.bind(l,"blur",function(t){p.wheelprevented=!1}),p.bind(l,"resize",p.onscreenresize),p.bind(l,"orientationchange",p.onscreenresize),p.bind(l,"load",p.lazyResize),_.ischrome&&!p.ispage&&!p.haswrapper){var A=p.win.attr("style"),M=parseFloat(p.win.css("width"))+1;p.win.css("width",M),p.synched("chromefix",function(){p.win.attr("style",A)})}if(p.onAttributeChange=function(t){p.lazyResize(p.isieold?250:30)},g.enableobserver&&(p.isie11||!1===v||(p.observerbody=new v(function(t){if(t.forEach(function(t){if("attributes"==t.type)return m.hasClass("modal-open")&&m.hasClass("modal-dialog")&&!a.contains(a(".modal-dialog")[0],p.doc[0])?p.hide():p.show()}),p.me.clientWidth!=p.page.width||p.me.clientHeight!=p.page.height)return p.lazyResize(30)}),p.observerbody.observe(s.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!p.ispage&&!p.haswrapper)){var z=p.win[0];!1!==v?(p.observer=new v(function(t){t.forEach(p.onAttributeChange)}),p.observer.observe(z,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),p.observerremover=new v(function(t){t.forEach(function(t){if(t.removedNodes.length>0)for(var e in t.removedNodes)if(p&&t.removedNodes[e]===z)return p.remove()})}),p.observerremover.observe(z.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(p.bind(z,_.isie&&!_.isie9?"propertychange":"DOMAttrModified",p.onAttributeChange),_.isie9&&z.attachEvent("onpropertychange",p.onAttributeChange),p.bind(z,"DOMNodeRemoved",function(t){t.target===z&&p.remove()}))}!p.ispage&&g.boxzoom&&p.bind(l,"resize",p.resizeZoom),p.istextarea&&(p.bind(p.win,"keydown",p.lazyResize),p.bind(p.win,"mouseup",p.lazyResize)),p.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var j=function(){var e;p.iframexd=!1;try{(e="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(t){p.iframexd=!0,e=!1}if(p.iframexd)return"console"in l&&console.log("NiceScroll error: policy restriced iframe"),!0;if(p.forcescreen=!0,p.isiframe&&(p.iframe={doc:a(e),html:p.doc.contents().find("html")[0],body:p.doc.contents().find("body")[0]},p.getContentSize=function(){return{w:Math.max(p.iframe.html.scrollWidth,p.iframe.body.scrollWidth),h:Math.max(p.iframe.html.scrollHeight,p.iframe.body.scrollHeight)}},p.docscroll=a(p.iframe.body)),!_.isios&&g.iframeautoresize&&!p.isiframe){p.win.scrollTop(0),p.doc.height("");var i=Math.max(e.getElementsByTagName("html")[0].scrollHeight,e.body.scrollHeight);p.doc.height(i)}p.lazyResize(30),p.css(a(p.iframe.body),t),_.isios&&p.haswrapper&&p.css(a(e.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?p.bind(this.contentWindow,"scroll",p.onscroll):p.bind(e,"scroll",p.onscroll),g.enablemousewheel&&p.mousewheel(e,p.onmousewheel),g.enablekeyboard&&p.bind(e,_.isopera?"keypress":"keydown",p.onkeypress),_.cantouch?(p.bind(e,"touchstart",p.ontouchstart),p.bind(e,"touchmove",p.ontouchmove)):g.emulatetouch&&(p.bind(e,"mousedown",p.ontouchstart),p.bind(e,"mousemove",function(t){return p.ontouchmove(t,!0)}),g.grabcursorenabled&&_.cursorgrabvalue&&p.css(a(e.body),{cursor:_.cursorgrabvalue})),p.bind(e,"mouseup",p.ontouchend),p.zoom&&(g.dblclickzoom&&p.bind(e,"dblclick",p.doZoom),p.ongesturezoom&&p.bind(e,"gestureend",p.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){j.call(p.doc[0],!1)},500),p.bind(this.doc,"load",j)}},this.showCursor=function(t,e){if(p.cursortimeout&&(clearTimeout(p.cursortimeout),p.cursortimeout=0),p.rail){if(p.autohidedom&&(p.autohidedom.stop().css({opacity:g.cursoropacitymax}),p.cursoractive=!0),p.rail.drag&&1==p.rail.drag.pt||(void 0!==t&&!1!==t&&(p.scroll.y=t/p.scrollratio.y|0),void 0!==e&&(p.scroll.x=e/p.scrollratio.x|0)),p.cursor.css({height:p.cursorheight,top:p.scroll.y}),p.cursorh){var i=p.hasreversehr?p.scrollvaluemaxw-p.scroll.x:p.scroll.x;p.cursorh.css({width:p.cursorwidth,left:!p.rail.align&&p.rail.visibility?i+p.rail.width:i}),p.cursoractive=!0}p.zoom&&p.zoom.stop().css({opacity:g.cursoropacitymax})}},this.hideCursor=function(t){p.cursortimeout||p.rail&&p.autohidedom&&(p.hasmousefocus&&"leave"===g.autohidemode||(p.cursortimeout=setTimeout(function(){p.rail.active&&p.showonmouseevent||(p.autohidedom.stop().animate({opacity:g.cursoropacitymin}),p.zoom&&p.zoom.stop().animate({opacity:g.cursoropacitymin}),p.cursoractive=!1),p.cursortimeout=0},t||g.hidecursordelay)))},this.noticeCursor=function(t,e,i){p.showCursor(e,i),p.rail.active||p.hideCursor(t)},this.getContentSize=p.ispage?function(){return{w:Math.max(s.body.scrollWidth,s.documentElement.scrollWidth),h:Math.max(s.body.scrollHeight,s.documentElement.scrollHeight)}}:p.haswrapper?function(){return{w:p.doc[0].offsetWidth,h:p.doc[0].offsetHeight}}:function(){return{w:p.docscroll[0].scrollWidth,h:p.docscroll[0].scrollHeight}},this.onResize=function(t,e){if(!p||!p.win)return!1;var i=p.page.maxh,n=p.page.maxw,r=p.view.h,o=p.view.w;if(p.view={w:p.ispage?p.win.width():p.win[0].clientWidth,h:p.ispage?p.win.height():p.win[0].clientHeight},p.page=e||p.getContentSize(),p.page.maxh=Math.max(0,p.page.h-p.view.h),p.page.maxw=Math.max(0,p.page.w-p.view.w),p.page.maxh==i&&p.page.maxw==n&&p.view.w==o&&p.view.h==r){if(p.ispage)return p;var a=p.win.offset();if(p.lastposition){var s=p.lastposition;if(s.top==a.top&&s.left==a.left)return p}p.lastposition=a}return 0===p.page.maxh?(p.hideRail(),p.scrollvaluemax=0,p.scroll.y=0,p.scrollratio.y=0,p.cursorheight=0,p.setScrollTop(0),p.rail&&(p.rail.scrollable=!1)):(p.page.maxh-=g.railpadding.top+g.railpadding.bottom,p.rail.scrollable=!0),0===p.page.maxw?(p.hideRailHr(),p.scrollvaluemaxw=0,p.scroll.x=0,p.scrollratio.x=0,p.cursorwidth=0,p.setScrollLeft(0),p.railh&&(p.railh.scrollable=!1)):(p.page.maxw-=g.railpadding.left+g.railpadding.right,p.railh&&(p.railh.scrollable=g.horizrailenabled)),p.railslocked=p.locked||0===p.page.maxh&&0===p.page.maxw,p.railslocked?(p.ispage||p.updateScrollBar(p.view),!1):(p.hidden||(p.rail.visibility||p.showRail(),p.railh&&!p.railh.visibility&&p.showRailHr()),p.istextarea&&p.win.css("resize")&&"none"!=p.win.css("resize")&&(p.view.h-=20),p.cursorheight=Math.min(p.view.h,Math.round(p.view.h*(p.view.h/p.page.h))),p.cursorheight=g.cursorfixedheight?g.cursorfixedheight:Math.max(g.cursorminheight,p.cursorheight),p.cursorwidth=Math.min(p.view.w,Math.round(p.view.w*(p.view.w/p.page.w))),p.cursorwidth=g.cursorfixedheight?g.cursorfixedheight:Math.max(g.cursorminheight,p.cursorwidth),p.scrollvaluemax=p.view.h-p.cursorheight-(g.railpadding.top+g.railpadding.bottom),p.hasborderbox||(p.scrollvaluemax-=p.cursor[0].offsetHeight-p.cursor[0].clientHeight),p.railh&&(p.railh.width=p.page.maxh>0?p.view.w-p.rail.width:p.view.w,p.scrollvaluemaxw=p.railh.width-p.cursorwidth-(g.railpadding.left+g.railpadding.right)),p.ispage||p.updateScrollBar(p.view),p.scrollratio={x:p.page.maxw/p.scrollvaluemaxw,y:p.page.maxh/p.scrollvaluemax},p.getScrollTop()>p.page.maxh?p.doScrollTop(p.page.maxh):(p.scroll.y=p.getScrollTop()/p.scrollratio.y|0,p.scroll.x=p.getScrollLeft()/p.scrollratio.x|0,p.cursoractive&&p.noticeCursor()),p.scroll.y&&0===p.getScrollTop()&&p.doScrollTo(p.scroll.y*p.scrollratio.y|0),p)},this.resize=p.onResize;var z=0;function j(t,e,i,n){p._bind(t,e,function(n){var r={original:n=n||l.event,target:n.target||n.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==n.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return n.preventDefault?n.preventDefault():n.returnValue=!1,!1},stopImmediatePropagation:function(){n.stopImmediatePropagation?n.stopImmediatePropagation():n.cancelBubble=!0}};return"mousewheel"==e?(n.wheelDeltaX&&(r.deltaX=-.025*n.wheelDeltaX),n.wheelDeltaY&&(r.deltaY=-.025*n.wheelDeltaY),!r.deltaY&&!r.deltaX&&(r.deltaY=-.025*n.wheelDelta)):r.deltaY=n.detail,i.call(t,r)},n)}this.onscreenresize=function(t){clearTimeout(z);var e=!p.ispage&&!p.haswrapper;e&&p.hideRails(),z=setTimeout(function(){p&&(e&&p.showRails(),p.resize()),z=0},120)},this.lazyResize=function(t){return clearTimeout(z),t=isNaN(t)?240:t,z=setTimeout(function(){p&&p.resize(),z=0},t),p},this.jqbind=function(t,e,i){p.events.push({e:t,n:e,f:i,q:!0}),a(t).on(e,i)},this.mousewheel=function(t,e,i){var n="jquery"in t?t[0]:t;if("onwheel"in s.createElement("div"))p._bind(n,"wheel",e,i||!1);else{var r=void 0!==s.onmousewheel?"mousewheel":"DOMMouseScroll";j(n,r,e,i||!1),"DOMMouseScroll"==r&&j(n,"MozMousePixelScroll",e,i||!1)}};var D=!1;if(_.haseventlistener){try{var L=Object.defineProperty({},"passive",{get:function(){D=!0}});l.addEventListener("test",null,L)}catch(t){}this.stopPropagation=function(t){return!!t&&((t=t.original?t.original:t).stopPropagation(),!1)},this.cancelEvent=function(t){return t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),t.preventManipulation&&t.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},l.constructor.prototype.addEventListener=s.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(t,e,i){this.attachEvent("on"+t,e)},l.constructor.prototype.removeEventListener=s.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(t,e,i){this.detachEvent("on"+t,e)},this.cancelEvent=function(t){return(t=t||l.event)&&(t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1),!1},this.stopPropagation=function(t){return(t=t||l.event)&&(t.cancelBubble=!0),!1};this.delegate=function(t,e,i,n,r){var o=u[e]||!1;o||(o={a:[],l:[],f:function(t){for(var e=o.l,i=!1,n=e.length-1;n>=0;n--)if(!1===(i=e[n].call(t.target,t)))return!1;return i}},p.bind(t,e,o.f,n,r),u[e]=o),p.ispage?(o.a=[p.id].concat(o.a),o.l=[i].concat(o.l)):(o.a.push(p.id),o.l.push(i))},this.undelegate=function(t,e,i,n,r){var o=u[e]||!1;if(o&&o.l)for(var a=0,s=o.l.length;a0)return i;e=!!e.parentNode&&e.parentNode}return!1},this.triggerScrollStart=function(t,e,i,n,r){if(p.onscrollstart){var o={type:"scrollstart",current:{x:t,y:e},request:{x:i,y:n},end:{x:p.newscrollx,y:p.newscrolly},speed:r};p.onscrollstart.call(p,o)}},this.triggerScrollEnd=function(){if(p.onscrollend){var t=p.getScrollLeft(),e=p.getScrollTop(),i={type:"scrollend",current:{x:t,y:e},end:{x:t,y:e}};p.onscrollend.call(p,i)}};var B=0,O=0,P=0,I=1;function N(t,e,i,n){p.scrollrunning||(p.newscrolly=p.getScrollTop(),p.newscrollx=p.getScrollLeft(),P=y());var r=y()-P;if(P=y(),r>350?I=1:I+=(2-I)/10,e=e*I|0,t=t*I|0){if(n)if(t<0){if(p.getScrollLeft()>=p.page.maxw)return!0}else if(p.getScrollLeft()<=0)return!0;var o=t>0?1:-1;O!==o&&(p.scrollmom&&p.scrollmom.stop(),p.newscrollx=p.getScrollLeft(),O=o),p.lastdeltax-=t}if(e){if(function(){var t=p.getScrollTop();if(e<0){if(t>=p.page.maxh)return!0}else if(t<=0)return!0}()){if(g.nativeparentscrolling&&i&&!p.ispage&&!p.zoomactive)return!0;var a=p.view.h>>1;p.newscrolly<-a?(p.newscrolly=-a,e=-1):p.newscrolly>p.page.maxh+a?(p.newscrolly=p.page.maxh+a,e=1):e=0}var s=e>0?1:-1;B!==s&&(p.scrollmom&&p.scrollmom.stop(),p.newscrolly=p.getScrollTop(),B=s),p.lastdeltay-=e}(e||t)&&p.synched("relativexy",function(){var t=p.lastdeltay+p.newscrolly;p.lastdeltay=0;var e=p.lastdeltax+p.newscrollx;p.lastdeltax=0,p.rail.drag||p.doScrollPos(e,t)})}var R=!1;function q(t,e,i){var n,r;if(!i&&R)return!0;(0===t.deltaMode?(n=-t.deltaX*(g.mousescrollstep/54)|0,r=-t.deltaY*(g.mousescrollstep/54)|0):1===t.deltaMode&&(n=-t.deltaX*g.mousescrollstep*50/80|0,r=-t.deltaY*g.mousescrollstep*50/80|0),e&&g.oneaxismousemode&&0===n&&r)&&(n=r,r=0,i&&(n<0?p.getScrollLeft()>=p.page.maxw:p.getScrollLeft()<=0)&&(r=n,n=0));if(p.isrtlmode&&(n=-n),!N(n,r,i,!0))return R=!1,t.stopImmediatePropagation(),t.preventDefault();i&&(R=!0)}if(this.onmousewheel=function(t){if(p.wheelprevented||p.locked)return!1;if(p.railslocked)return p.debounced("checkunlock",p.resize,250),!1;if(p.rail.drag)return p.cancelEvent(t);if("auto"===g.oneaxismousemode&&0!==t.deltaX&&(g.oneaxismousemode=!1),g.oneaxismousemode&&0===t.deltaX&&!p.rail.scrollable)return!p.railh||!p.railh.scrollable||p.onmousewheelhr(t);var e=y(),i=!1;if(g.preservenativescrolling&&p.checkarea+600p.page.maxh&&(e=p.page.maxh+(e-p.page.maxh)/2|0),t<0?t=t/2|0:t>p.page.maxw&&(t=p.page.maxw+(t-p.page.maxw)/2|0)):(e<0?e=0:e>p.page.maxh&&(e=p.page.maxh),t<0?t=0:t>p.page.maxw&&(t=p.page.maxw)),p.scrollrunning&&t==p.newscrollx&&e==p.newscrolly)return!1;p.newscrolly=e,p.newscrollx=t;var o=p.getScrollTop(),a=p.getScrollLeft(),s={};s.x=t-a,s.y=e-o;var l=0|Math.sqrt(s.x*s.x+s.y*s.y),c=p.prepareTransition(l);p.scrollrunning||(p.scrollrunning=!0,p.triggerScrollStart(a,o,t,e,c),p.cursorupdate.start()),p.scrollendtrapped=!0,_.transitionend||(p.scrollendtrapped&&clearTimeout(p.scrollendtrapped),p.scrollendtrapped=setTimeout(p.onScrollTransitionEnd,c)),p.setScrollTop(p.newscrolly),p.setScrollLeft(p.newscrollx)},this.cancelScroll=function(){if(!p.scrollendtrapped)return!0;var t=p.getScrollTop(),e=p.getScrollLeft();return p.scrollrunning=!1,_.transitionend||clearTimeout(_.transitionend),p.scrollendtrapped=!1,p.resetTransition(),p.setScrollTop(t),p.railh&&p.setScrollLeft(e),p.timerscroll&&p.timerscroll.tm&&clearInterval(p.timerscroll.tm),p.timerscroll=!1,p.cursorfreezed=!1,p.cursorupdate.stop(),p.showCursor(t,e),p},this.onScrollTransitionEnd=function(){if(p.scrollendtrapped){var t=p.getScrollTop(),e=p.getScrollLeft();if(t<0?t=0:t>p.page.maxh&&(t=p.page.maxh),e<0?e=0:e>p.page.maxw&&(e=p.page.maxw),t!=p.newscrolly||e!=p.newscrollx)return p.doScrollPos(e,t,g.snapbackspeed);p.scrollrunning&&p.triggerScrollEnd(),p.scrollrunning=!1,p.scrollendtrapped=!1,p.resetTransition(),p.timerscroll=!1,p.setScrollTop(t),p.railh&&p.setScrollLeft(e),p.cursorupdate.stop(),p.noticeCursor(!1,t,e),p.cursorfreezed=!1}}}else this.doScrollLeft=function(t,e){var i=p.scrollrunning?p.newscrolly:p.getScrollTop();p.doScrollPos(t,i,e)},this.doScrollTop=function(t,e){var i=p.scrollrunning?p.newscrollx:p.getScrollLeft();p.doScrollPos(i,t,e)},this.doScrollPos=function(t,e,i){var n=p.getScrollTop(),r=p.getScrollLeft();((p.newscrolly-n)*(e-n)<0||(p.newscrollx-r)*(t-r)<0)&&p.cancelScroll();var o=!1;if(p.bouncescroll&&p.rail.visibility||(e<0?(e=0,o=!0):e>p.page.maxh&&(e=p.page.maxh,o=!0)),p.bouncescroll&&p.railh.visibility||(t<0?(t=0,o=!0):t>p.page.maxw&&(t=p.page.maxw,o=!0)),p.scrollrunning&&p.newscrolly===e&&p.newscrollx===t)return!0;p.newscrolly=e,p.newscrollx=t,p.dst={},p.dst.x=t-r,p.dst.y=e-n,p.dst.px=r,p.dst.py=n;var a=0|Math.sqrt(p.dst.x*p.dst.x+p.dst.y*p.dst.y),s=p.getTransitionSpeed(a);p.bzscroll={};var l=o?1:.58;p.bzscroll.x=new k(r,p.newscrollx,s,0,0,l,1),p.bzscroll.y=new k(n,p.newscrolly,s,0,0,l,1);y();var c=function(){if(p.scrollrunning){var t=p.bzscroll.y.getPos();p.setScrollLeft(p.bzscroll.x.getNow()),p.setScrollTop(p.bzscroll.y.getNow()),t<=1?p.timer=d(c):(p.scrollrunning=!1,p.timer=0,p.triggerScrollEnd())}};p.scrollrunning||(p.triggerScrollStart(r,n,t,e,s),p.scrollrunning=!0,p.timer=d(c))},this.cancelScroll=function(){return p.timer&&h(p.timer),p.timer=0,p.bzscroll=!1,p.scrollrunning=!1,p};else this.doScrollLeft=function(t,e){var i=p.getScrollTop();p.doScrollPos(t,i,e)},this.doScrollTop=function(t,e){var i=p.getScrollLeft();p.doScrollPos(i,t,e)},this.doScrollPos=function(t,e,i){var n=t>p.page.maxw?p.page.maxw:t;n<0&&(n=0);var r=e>p.page.maxh?p.page.maxh:e;r<0&&(r=0),p.synched("scroll",function(){p.setScrollTop(r),p.setScrollLeft(n)})},this.cancelScroll=function(){};this.doScrollBy=function(t,e){N(0,t)},this.doScrollLeftBy=function(t,e){N(t,0)},this.doScrollTo=function(t,e){var i=e?Math.round(t*p.scrollratio.y):t;i<0?i=0:i>p.page.maxh&&(i=p.page.maxh),p.cursorfreezed=!1,p.doScrollTop(t)},this.checkContentSize=function(){var t=p.getContentSize();t.h==p.page.h&&t.w==p.page.w||p.resize(!1,t)},p.onscroll=function(t){p.rail.drag||p.cursorfreezed||p.synched("scroll",function(){p.scroll.y=Math.round(p.getScrollTop()/p.scrollratio.y),p.railh&&(p.scroll.x=Math.round(p.getScrollLeft()/p.scrollratio.x)),p.noticeCursor()})},p.bind(p.docscroll,"scroll",p.onscroll),this.doZoomIn=function(t){if(!p.zoomactive){p.zoomactive=!0,p.zoomrestore={style:{}};var e=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],i=p.win[0].style;for(var n in e){var r=e[n];p.zoomrestore.style[r]=void 0!==i[r]?i[r]:""}p.zoomrestore.style.width=p.win.css("width"),p.zoomrestore.style.height=p.win.css("height"),p.zoomrestore.padding={w:p.win.outerWidth()-p.win.width(),h:p.win.outerHeight()-p.win.height()},_.isios4&&(p.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),p.win.css({position:_.isios4?"absolute":"fixed",top:0,left:0,zIndex:o+100,margin:0});var a=p.win.css("backgroundColor");return(""===a||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(a))&&p.win.css("backgroundColor","#fff"),p.rail.css({zIndex:o+101}),p.zoom.css({zIndex:o+102}),p.zoom.css("backgroundPosition","0 -18px"),p.resizeZoom(),p.onzoomin&&p.onzoomin.call(p),p.cancelEvent(t)}},this.doZoomOut=function(t){if(p.zoomactive)return p.zoomactive=!1,p.win.css("margin",""),p.win.css(p.zoomrestore.style),_.isios4&&c.scrollTop(p.zoomrestore.scrollTop),p.rail.css({"z-index":p.zindex}),p.zoom.css({"z-index":p.zindex}),p.zoomrestore=!1,p.zoom.css("backgroundPosition","0 0"),p.onResize(),p.onzoomout&&p.onzoomout.call(p),p.cancelEvent(t)},this.doZoom=function(t){return p.zoomactive?p.doZoomOut(t):p.doZoomIn(t)},this.resizeZoom=function(){if(p.zoomactive){var t=p.getScrollTop();p.win.css({width:c.width()-p.zoomrestore.padding.w+"px",height:c.height()-p.zoomrestore.padding.h+"px"}),p.onResize(),p.setScrollTop(Math.min(p.page.maxh,t))}},this.init(),a.nicescroll.push(this)},T=function(t){var e=this;this.nc=t,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(t,i){e.stop(),e.steptime=0,e.lasttime=y(),e.speedx=0,e.speedy=0,e.lastx=t,e.lasty=i,e.lastscrollx=-1,e.lastscrolly=-1},this.update=function(t,i){var n=y();e.steptime=n-e.lasttime,e.lasttime=n;var r=i-e.lasty,o=t-e.lastx,a=e.nc.getScrollTop()+r,s=e.nc.getScrollLeft()+o;e.snapx=s<0||s>e.nc.page.maxw,e.snapy=a<0||a>e.nc.page.maxh,e.speedx=o,e.speedy=r,e.lastx=t,e.lasty=i},this.stop=function(){e.nc.unsynched("domomentum2d"),e.timer&&clearTimeout(e.timer),e.timer=0,e.lastscrollx=-1,e.lastscrolly=-1},this.doSnapy=function(t,i){var n=!1;i<0?(i=0,n=!0):i>e.nc.page.maxh&&(i=e.nc.page.maxh,n=!0),t<0?(t=0,n=!0):t>e.nc.page.maxw&&(t=e.nc.page.maxw,n=!0),n?e.nc.doScrollPos(t,i,e.nc.opt.snapbackspeed):e.nc.triggerScrollEnd()},this.doMomentum=function(t){var i=y(),n=t?i+t:e.lasttime,r=e.nc.getScrollLeft(),o=e.nc.getScrollTop(),a=e.nc.page.maxh,s=e.nc.page.maxw;e.speedx=s>0?Math.min(60,e.speedx):0,e.speedy=a>0?Math.min(60,e.speedy):0;var l=n&&i-n<=60;(o<0||o>a||r<0||r>s)&&(l=!1);var c=!(!e.speedy||!l)&&e.speedy,u=!(!e.speedx||!l)&&e.speedx;if(c||u){var d=Math.max(16,e.steptime);if(d>50){var h=d/50;e.speedx*=h,e.speedy*=h,d=50}e.demulxy=0,e.lastscrollx=e.nc.getScrollLeft(),e.chkx=e.lastscrollx,e.lastscrolly=e.nc.getScrollTop(),e.chky=e.lastscrolly;var f=e.lastscrollx,p=e.lastscrolly,m=function(){var t=y()-i>600?.04:.02;e.speedx&&(f=Math.floor(e.lastscrollx-e.speedx*(1-e.demulxy)),e.lastscrollx=f,(f<0||f>s)&&(t=.1)),e.speedy&&(p=Math.floor(e.lastscrolly-e.speedy*(1-e.demulxy)),e.lastscrolly=p,(p<0||p>a)&&(t=.1)),e.demulxy=Math.min(1,e.demulxy+t),e.nc.synched("domomentum2d",function(){if(e.speedx){e.nc.getScrollLeft();e.chkx=f,e.nc.setScrollLeft(f)}if(e.speedy){e.nc.getScrollTop();e.chky=p,e.nc.setScrollTop(p)}e.timer||(e.nc.hideCursor(),e.doSnapy(f,p))}),e.demulxy<1?e.timer=setTimeout(m,d):(e.stop(),e.nc.hideCursor(),e.doSnapy(f,p))};m()}else e.doSnapy(e.nc.getScrollLeft(),e.nc.getScrollTop())}},C=t.fn.scrollTop;t.cssHooks.pageYOffset={get:function(t,e,i){var n=a.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.getScrollTop():C.call(t)},set:function(t,e){var i=a.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollTop(parseInt(e)):C.call(t,e),this}},t.fn.scrollTop=function(t){if(void 0===t){var e=this[0]&&a.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollTop():C.call(this)}return this.each(function(){var e=a.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(t)):C.call(a(this),t)})};var S=t.fn.scrollLeft;a.cssHooks.pageXOffset={get:function(t,e,i){var n=a.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.getScrollLeft():S.call(t)},set:function(t,e){var i=a.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollLeft(parseInt(e)):S.call(t,e),this}},t.fn.scrollLeft=function(t){if(void 0===t){var e=this[0]&&a.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollLeft():S.call(this)}return this.each(function(){var e=a.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(t)):S.call(a(this),t)})};var _=function(t){var e=this;if(this.length=0,this.name="nicescrollarray",this.each=function(t){return a.each(e,t),e},this.push=function(t){e[e.length]=t,e.length++},this.eq=function(t){return e[t]},t)for(var i=0;i1?a(t,n):o,r.win=n}!("doc"in r)||"win"in r||(r.win=n);var s=n.data("__nicescroll")||!1;s||(r.doc=r.doc||n,s=new b(r,n),n.data("__nicescroll",s)),i.push(s)}),1===i.length?i[0]:i},l.NiceScroll={getjQuery:function(){return t}},a.nicescroll||(a.nicescroll=new _,a.nicescroll.options=w)}),function(t){"use strict";t.organicTabs=function(e,i){var n=this;n.$el=t(e),n.$nav=n.$el.find(".tabs__nav"),n.init=function(){n.options=t.extend({},t.organicTabs.defaultOptions,i);var e=n.$el.find(".tabs__content"),r=n.$el.find("a.current").attr("href").substring(1);e.height(n.$el.find("#"+r).height()),n.$nav.find("li > a").click(function(i){var r=n.$el.find("a.current").attr("href").substring(1),o=t(this),a=o.attr("href").substring(1);if(a!=r&&0==n.$el.find(":animated").length){n.$el.find("#"+r).css({opacity:0,"z-index":10,"pointer-events":"none"});var s=n.$el.find("#"+a).height();e.css({height:s}),setTimeout(function(){n.$el.find("#"+r),n.$el.find("#"+a).css({opacity:1,"z-index":100,"pointer-events":"auto"}),n.$el.find(".tabs__nav li a").removeClass("current"),o.addClass("current")},250)}i.preventDefault()})},n.init()},t.organicTabs.defaultOptions={speed:300},t.fn.organicTabs=function(e){return this.each(function(){new t.organicTabs(this,e)})}}(jQuery),Date.now||(Date.now=function(){return(new Date).getTime()}),function(){"use strict";for(var t=["webkit","moz"],e=0;e1)for(var a=0,l=i.length;a=1&&(delete n[a],s.s=1,o--,function(t){setTimeout(function(){e("mina.finish."+t.id,t)})}(s)),s.update()}i=!!o&&r(g)}else i||(i=r(g))},v=function(t,e,i,r,o,l,y){var w={id:s+(a++).toString(36),start:t,end:e,b:i,s:0,dur:r-i,spd:1,get:o,set:l,easing:y||v.linear,status:c,speed:u,duration:d,stop:h,pause:f,resume:p,update:m};n[w.id]=w;var x,b=0;for(x in n)if(n.hasOwnProperty(x)&&2==++b)break;return 1==b&&g(),w};return v.time=l,v.getById=function(t){return n[t]||null},v.linear=function(t){return t},v.easeout=function(t){return Math.pow(t,1.7)},v.easein=function(t){return Math.pow(t,.48)},v.easeinout=function(t){if(1==t)return 1;if(0==t)return 0;var e=.48-t/1.04,i=Math.sqrt(.1734+e*e),n=i-e,r=-i-e,o=Math.pow(Math.abs(n),1/3)*(n<0?-1:1)+Math.pow(Math.abs(r),1/3)*(r<0?-1:1)+.5;return 3*(1-o)*o*o+o*o*o},v.backin=function(t){if(1==t)return 1;var e=1.70158;return t*t*((e+1)*t-e)},v.backout=function(t){if(0==t)return 0;var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},v.elastic=function(t){return t==!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1},v.bounce=function(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},t.mina=v,v}(void 0===e?function(){}:e),n=function(t){function i(t,e){if(t){if(t.nodeType)return V(t);if(z(t,"array")&&i.set)return i.set.apply(i,t);if(t instanceof H)return t;if(null==e)try{return V(t=n.doc.querySelector(String(t)))}catch(t){return null}}return new $(t=null==t?"100%":t,e=null==e?"100%":e)}i.version="0.5.1",i.toString=function(){return"Snap v"+this.version},i._={};var n={win:t.window,doc:t.window.document};i._.glob=n;var r,o,a="hasOwnProperty",s=String,l=parseFloat,c=parseInt,u=Math,d=u.max,h=u.min,f=u.abs,p=(u.pow,u.PI),m=(u.round,""),v=Object.prototype.toString,y=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\))\s*$/i,w=(i._.separator=/[,\s]+/,/[\s]*,[\s]*/),x={hs:1,rg:1},b=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,T=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,C=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\s]*,?[\s]*/gi,S=0,_="S"+(+new Date).toString(36),k=function(t){return(t&&t.type?t.type:m)+_+(S++).toString(36)},E="http://www.w3.org/1999/xlink",F="http://www.w3.org/2000/svg",A={};i.url=function(t){return"url('#"+t+"')"};function M(t,e){if(e){if("#text"==t&&(t=n.doc.createTextNode(e.text||e["#text"]||"")),"#comment"==t&&(t=n.doc.createComment(e.text||e["#text"]||"")),"string"==typeof t&&(t=M(t)),"string"==typeof e)return 1==t.nodeType?"xlink:"==e.substring(0,6)?t.getAttributeNS(E,e.substring(6)):"xml:"==e.substring(0,4)?t.getAttributeNS(F,e.substring(4)):t.getAttribute(e):"text"==e?t.nodeValue:null;if(1==t.nodeType){for(var i in e)if(e[a](i)){var r=s(e[i]);r?"xlink:"==i.substring(0,6)?t.setAttributeNS(E,i.substring(6),r):"xml:"==i.substring(0,4)?t.setAttributeNS(F,i.substring(4),r):t.setAttribute(i,r):t.removeAttribute(i)}}else"text"in e&&(t.nodeValue=e.text)}else t=n.doc.createElementNS(F,t);return t}function z(t,e){return"finite"==(e=s.prototype.toLowerCase.call(e))?isFinite(t):!("array"!=e||!(t instanceof Array||Array.isArray&&Array.isArray(t)))||("null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||v.call(t).slice(8,-1).toLowerCase()==e)}function j(t,e,i){return function n(){var r=Array.prototype.slice.call(arguments,0),o=r.join("␀"),s=n.cache=n.cache||{},l=n.count=n.count||[];return s[a](o)?(function(t,e){for(var i=0,n=t.length;i=1e3&&delete s[l.shift()],l.push(o),s[o]=t.apply(e,r),i?i(s[o]):s[o])}}function D(t){return t%360*p/180}i._.$=M,i._.id=k,i.format=(r=/\{([^\}]+)\}/g,o=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(t,e){return s(t).replace(r,function(t,i){return function(t,e,i){var n=i;return e.replace(o,function(t,e,i,r,o){e=e||r,n&&(e in n&&(n=n[e]),"function"==typeof n&&o&&(n=n()))}),n=(null==n||n==i?t:n)+""}(t,i,e)})}),i._.clone=function t(e){if("function"==typeof e||Object(e)!==e)return e;var i=new e.constructor;for(var n in e)e[a](n)&&(i[n]=t(e[n]));return i},i._.cacher=j,i.rad=D,i.deg=function(t){return 180*t/p%360},i.sin=function(t){return u.sin(i.rad(t))},i.tan=function(t){return u.tan(i.rad(t))},i.cos=function(t){return u.cos(i.rad(t))},i.asin=function(t){return i.deg(u.asin(t))},i.acos=function(t){return i.deg(u.acos(t))},i.atan=function(t){return i.deg(u.atan(t))},i.atan2=function(t){return i.deg(u.atan2(t))},i.angle=function t(e,i,n,r,o,a){if(null==o){var s=e-n,l=i-r;return s||l?(180+180*u.atan2(-l,-s)/p+360)%360:0}return t(e,i,o,a)-t(n,r,o,a)},i.len=function(t,e,n,r){return Math.sqrt(i.len2(t,e,n,r))},i.len2=function(t,e,i,n){return(t-i)*(t-i)+(e-n)*(e-n)},i.closestPoint=function(t,e,i){function n(t){var n=t.x-e,r=t.y-i;return n*n+r*r}for(var r,o,a,s,l=t.node,c=l.getTotalLength(),u=c/l.pathSegList.numberOfItems*.125,d=1/0,h=0;h<=c;h+=u)(s=n(a=l.getPointAtLength(h))).5;){var f,p,m,g,v,y;(m=o-u)>=0&&(v=n(f=l.getPointAtLength(m)))t-i)return e-r+t}return e},i.getRGB=j(function(t){if(!t||(t=s(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:P};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:P};if(!x[a](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=L(t)),!t)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:P};var e,n,r,o,f,p,m=t.match(y);return m?(m[2]&&(r=c(m[2].substring(5),16),n=c(m[2].substring(3,5),16),e=c(m[2].substring(1,3),16)),m[3]&&(r=c((f=m[3].charAt(3))+f,16),n=c((f=m[3].charAt(2))+f,16),e=c((f=m[3].charAt(1))+f,16)),m[4]&&(p=m[4].split(w),e=l(p[0]),"%"==p[0].slice(-1)&&(e*=2.55),n=l(p[1]),"%"==p[1].slice(-1)&&(n*=2.55),r=l(p[2]),"%"==p[2].slice(-1)&&(r*=2.55),"rgba"==m[1].toLowerCase().slice(0,4)&&(o=l(p[3])),p[3]&&"%"==p[3].slice(-1)&&(o/=100)),m[5]?(p=m[5].split(w),e=l(p[0]),"%"==p[0].slice(-1)&&(e/=100),n=l(p[1]),"%"==p[1].slice(-1)&&(n/=100),r=l(p[2]),"%"==p[2].slice(-1)&&(r/=100),("deg"==p[0].slice(-3)||"°"==p[0].slice(-1))&&(e/=360),"hsba"==m[1].toLowerCase().slice(0,4)&&(o=l(p[3])),p[3]&&"%"==p[3].slice(-1)&&(o/=100),i.hsb2rgb(e,n,r,o)):m[6]?(p=m[6].split(w),e=l(p[0]),"%"==p[0].slice(-1)&&(e/=100),n=l(p[1]),"%"==p[1].slice(-1)&&(n/=100),r=l(p[2]),"%"==p[2].slice(-1)&&(r/=100),("deg"==p[0].slice(-3)||"°"==p[0].slice(-1))&&(e/=360),"hsla"==m[1].toLowerCase().slice(0,4)&&(o=l(p[3])),p[3]&&"%"==p[3].slice(-1)&&(o/=100),i.hsl2rgb(e,n,r,o)):(e=h(u.round(e),255),n=h(u.round(n),255),r=h(u.round(r),255),o=h(d(o,0),1),(m={r:e,g:n,b:r,toString:P}).hex="#"+(16777216|r|n<<8|e<<16).toString(16).slice(1),m.opacity=z(o,"finite")?o:1,m)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:P}},i),i.hsb=j(function(t,e,n){return i.hsb2rgb(t,e,n).hex}),i.hsl=j(function(t,e,n){return i.hsl2rgb(t,e,n).hex}),i.rgb=j(function(t,e,i,n){if(z(n,"finite")){var r=u.round;return"rgba("+[r(t),r(e),r(i),+n.toFixed(2)]+")"}return"#"+(16777216|i|e<<8|t<<16).toString(16).slice(1)});var L=function(t){var e=n.doc.getElementsByTagName("head")[0]||n.doc.getElementsByTagName("svg")[0],i="rgb(255, 0, 0)";return(L=j(function(t){if("red"==t.toLowerCase())return i;e.style.color=i,e.style.color=t;var r=n.doc.defaultView.getComputedStyle(e,m).getPropertyValue("color");return r==i?null:r}))(t)},B=function(){return"hsb("+[this.h,this.s,this.b]+")"},O=function(){return"hsl("+[this.h,this.s,this.l]+")"},P=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},I=function(t,e,n){if(null==e&&z(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,e=t.g,t=t.r),null==e&&z(t,string)){var r=i.getRGB(t);t=r.r,e=r.g,n=r.b}return(t>1||e>1||n>1)&&(t/=255,e/=255,n/=255),[t,e,n]},N=function(t,e,n,r){var o={r:t=u.round(255*t),g:e=u.round(255*e),b:n=u.round(255*n),opacity:z(r,"finite")?r:1,hex:i.rgb(t,e,n),toString:P};return z(r,"finite")&&(o.opacity=r),o};i.color=function(t){var e;return z(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=i.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):z(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=i.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):(z(t,"string")&&(t=i.getRGB(t)),z(t,"object")&&"r"in t&&"g"in t&&"b"in t&&!("error"in t)?(e=i.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=i.rgb2hsb(t),t.v=e.b):((t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1,t.error=1)),t.toString=P,t},i.hsb2rgb=function(t,e,i,n){var r,o,a,s,l;return z(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(i=t.b,e=t.s,n=t.o,t=t.h),s=(l=i*e)*(1-f((t=(t*=360)%360/60)%2-1)),r=o=a=i-l,N(r+=[l,s,0,0,s,l][t=~~t],o+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],n)},i.hsl2rgb=function(t,e,i,n){var r,o,a,s,l;return z(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(i=t.l,e=t.s,t=t.h),(t>1||e>1||i>1)&&(t/=360,e/=100,i/=100),s=(l=2*e*(i<.5?i:1-i))*(1-f((t=(t*=360)%360/60)%2-1)),r=o=a=i-l/2,N(r+=[l,s,0,0,s,l][t=~~t],o+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],n)},i.rgb2hsb=function(t,e,i){var n,r;return t=(i=I(t,e,i))[0],e=i[1],i=i[2],{h:((0==(r=(n=d(t,e,i))-h(t,e,i))?null:n==t?(e-i)/r:n==e?(i-t)/r+2:(t-e)/r+4)+360)%6*60/360,s:0==r?0:r/n,b:n,toString:B}},i.rgb2hsl=function(t,e,i){var n,r,o,a;return t=(i=I(t,e,i))[0],e=i[1],i=i[2],n=((r=d(t,e,i))+(o=h(t,e,i)))/2,{h:((0==(a=r-o)?null:r==t?(e-i)/a:r==e?(i-t)/a+2:(t-e)/a+4)+360)%6*60/360,s:0==a?0:n<.5?a/(2*n):a/(2-2*n),l:n,toString:O}},i.parsePathString=function(t){if(!t)return null;var e=i.path(t);if(e.arr)return i.path.clone(e.arr);var n={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},r=[];return z(t,"array")&&z(t[0],"array")&&(r=i.path.clone(t)),r.length||s(t).replace(b,function(t,e,i){var o=[],a=e.toLowerCase();if(i.replace(C,function(t,e){e&&o.push(+e)}),"m"==a&&o.length>2&&(r.push([e].concat(o.splice(0,2))),a="l",e="m"==e?"l":"L"),"o"==a&&1==o.length&&r.push([e,o[0]]),"r"==a)r.push([e].concat(o));else for(;o.length>=n[a]&&(r.push([e].concat(o.splice(0,n[a]))),n[a]););}),r.toString=i.path.toString,e.arr=i.path.clone(r),r};var R=i.parseTransformString=function(t){if(!t)return null;var e=[];return z(t,"array")&&z(t[0],"array")&&(e=i.path.clone(t)),e.length||s(t).replace(T,function(t,i,n){var r=[];i.toLowerCase();n.replace(C,function(t,e){e&&r.push(+e)}),e.push([i].concat(r))}),e.toString=i.path.toString,e};i._.svgTransform2string=function(t){var e=[];return t=t.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(t,i,n){return n=n.split(/\s*,\s*|\s+/),"rotate"==i&&1==n.length&&n.push(0,0),"scale"==i&&(n.length>2?n=n.slice(0,2):2==n.length&&n.push(0,0),1==n.length&&n.push(n[0],0,0)),"skewX"==i?e.push(["m",1,0,u.tan(D(n[0])),1,0,0]):"skewY"==i?e.push(["m",1,u.tan(D(n[0])),0,1,0,0]):e.push([i.charAt(0)].concat(n)),t}),e},i._.rgTransform=/^[a-z][\s]*-?\.?\d/i,i._.transform2matrix=function(t,e){var n=R(t),r=new i.Matrix;if(n)for(var o=0,a=n.length;o1))return e("snap.util.getattr."+t,n).firstDefined();var u={};u[t]=i,t=u}for(var d in t)t[a](d)&&e("snap.util.attr."+d,n,t[d]);return n},i.parse=function(t){var e=n.doc.createDocumentFragment(),i=!0,r=n.doc.createElement("div");if((t=s(t)).match(/^\s*<\s*svg(?:\s|>)/)||(t="",i=!1),r.innerHTML=t,t=r.getElementsByTagName("svg")[0])if(i)e=t;else for(;t.firstChild;)e.appendChild(t.firstChild);return new W(e)},i.fragment=function(){for(var t=Array.prototype.slice.call(arguments,0),e=n.doc.createDocumentFragment(),r=0,o=t.length;r"),r=0,o=n.length;r")}else t&&(e+="/>");return e}}s.data=function(t,n){var r=y[this.id]=y[this.id]||{};if(0==arguments.length)return e("snap.data.get."+this.id,this,r,null),r;if(1==arguments.length){if(i.is(t,"object")){for(var o in t)t[p](o)&&this.data(o,t[o]);return this}return e("snap.data.get."+this.id,this,r[t],t),r[t]}return r[t]=n,e("snap.data.set."+this.id,this,n,t),this},s.removeData=function(t){return null==t?y[this.id]={}:y[this.id]&&delete y[this.id][t],this},s.outerSVG=s.toString=w(1),s.innerSVG=w(),s.toDataURL=function(){if(t&&t.btoa){var e=this.getBBox(),n=i.format('',{x:+e.x.toFixed(3),y:+e.y.toFixed(3),width:+e.width.toFixed(3),height:+e.height.toFixed(3),contents:this.outerSVG()});return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))}},a.prototype.select=s.select,a.prototype.selectAll=s.selectAll}),n.plugin(function(t,n,r,o,a){var s=n.prototype,l=t.is,c=String,u="hasOwnProperty";function d(t,e,i){return function(n){var r=n.slice(t,e);return 1==r.length&&(r=r[0]),i?i(r):r}}var h=function(t,e,n,r){"function"!=typeof n||n.length||(r=n,n=i.linear),this.attr=t,this.dur=e,n&&(this.easing=n),r&&(this.callback=r)};t._.Animation=h,t.animation=function(t,e,i,n){return new h(t,e,i,n)},s.inAnim=function(){var t=[];for(var e in this.anims)this.anims[u](e)&&function(e){t.push({anim:new h(e._attrs,e.dur,e.easing,e._callback),mina:e,curStatus:e.status(),status:function(t){return e.status(t)},stop:function(){e.stop()}})}(this.anims[e]);return t},t.animate=function(t,n,r,o,a,s){"function"!=typeof a||a.length||(s=a,a=i.linear);var l=i.time(),c=i(t,n,l,l+o,i.time,r,a);return s&&e.once("mina.finish."+c.id,s),c},s.stop=function(){for(var t=this.inAnim(),e=0,i=t.length;e1&&(t=Array.prototype.slice.call(arguments,0));var e={};return l(t,"object")&&!l(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polyline",e)},s.polygon=function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments,0));var e={};return l(t,"object")&&!l(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polygon",e)},function(){var n=i._.$;function r(){return this.selectAll("stop")}function o(t,e){var r=n("stop"),o={offset:+e+"%"};t=i.color(t),o["stop-color"]=t.hex,t.opacity<1&&(o["stop-opacity"]=t.opacity),n(r,o);for(var a,s=this.stops(),l=0;le){this.node.insertBefore(r,s[l].node),a=!0;break}}return a||this.node.appendChild(r),this}function a(){if("linearGradient"==this.type){var t=n(this.node,"x1")||0,e=n(this.node,"x2")||1,r=n(this.node,"y1")||0,o=n(this.node,"y2")||0;return i._.box(t,r,math.abs(e-t),math.abs(o-r))}var a=this.node.cx||.5,s=this.node.cy||.5,l=this.node.r||0;return i._.box(a-l,s-l,2*l,2*l)}function l(t){var n=t,r=this.stops();if("string"==typeof t&&(n=e("snap.util.grad.parse",null,"l(0,0,0,1)"+t).firstDefined().stops),i.is(n,"array")){for(var o=0;o.01;)c=M(t,e,i,n,r,o,a,s,d+=(co){if(n&&!f.start){if(h+=["C"+r((d=x(s,l,c[1],c[2],c[3],c[4],c[5],c[6],o-p)).start.x),r(d.start.y),r(d.m.x),r(d.m.y),r(d.x),r(d.y)],a)return h;f.start=h,h=["M"+r(d.x),r(d.y)+"C"+r(d.n.x),r(d.n.y),r(d.end.x),r(d.end.y),r(c[5]),r(c[6])].join(),p+=u,s=+c[5],l=+c[6];continue}if(!i&&!n)return d=x(s,l,c[1],c[2],c[3],c[4],c[5],c[6],o-p)}p+=u,s=+c[5],l=+c[6]}h+=c.shift()+c}return f.end=h,d=i?p:n?f:_(s,l,c[0],c[1],c[2],c[3],c[4],c[5],1)},null,t._.clone)}var T=b(1),C=b(),S=b(0,1);function _(t,e,i,n,r,o,a,s,l){var c=1-l,h=p(c,3),f=p(c,2),m=l*l,g=m*l,v=t+2*l*(i-t)+m*(r-2*i+t),y=e+2*l*(n-e)+m*(o-2*n+e),w=i+2*l*(r-i)+m*(a-2*r+i),x=n+2*l*(o-n)+m*(s-2*o+n);return{x:h*t+3*f*l*i+3*c*l*l*r+g*a,y:h*e+3*f*l*n+3*c*l*l*o+g*s,m:{x:v,y:y},n:{x:w,y:x},start:{x:c*t+l*i,y:c*e+l*n},end:{x:c*r+l*a,y:c*o+l*s},alpha:90-180*u.atan2(v-w,y-x)/d}}function k(e,i,n,r,o,a,s,l){t.is(e,"array")||(e=[e,i,n,r,o,a,s,l]);var c=X.apply(null,e);return v(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)}function E(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height}function F(t,e){return t=v(t),E(e=v(e),t.x,t.y)||E(e,t.x2,t.y)||E(e,t.x,t.y2)||E(e,t.x2,t.y2)||E(t,e.x,e.y)||E(t,e.x2,e.y)||E(t,e.x,e.y2)||E(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}function A(t,e,i,n,r){return t*(t*(-3*e+9*i-9*n+3*r)+6*e-12*i+6*n)-3*e+3*i}function M(t,e,i,n,r,o,a,s,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var m=c*d[p]+c,g=A(m,t,i,r,a),v=A(m,e,n,o,s),y=g*g+v*v;f+=h[p]*u.sqrt(y)}return c*f}function z(t,e,i,n,r,o,a,s){if(!(f(t,i)f(r,a)||f(e,n)f(o,s))){var l=(t-i)*(o-s)-(e-n)*(r-a);if(l){var c=((t*n-e*i)*(r-a)-(t-i)*(r*s-o*a))/l,u=((t*n-e*i)*(o-s)-(e-n)*(r*s-o*a))/l,d=+c.toFixed(2),p=+u.toFixed(2);if(!(d<+h(t,i).toFixed(2)||d>+f(t,i).toFixed(2)||d<+h(r,a).toFixed(2)||d>+f(r,a).toFixed(2)||p<+h(e,n).toFixed(2)||p>+f(e,n).toFixed(2)||p<+h(o,s).toFixed(2)||p>+f(o,s).toFixed(2)))return{x:c,y:u}}}}function j(t,e,i){if(!F(k(t),k(e)))return i?0:[];for(var n=~~(M.apply(0,t)/8),r=~~(M.apply(0,e)/8),o=[],a=[],s={},l=i?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(i?l++:l.push({x:w.x,y:w.y,t1:x,t2:b}))}}return l}function D(t,e,i){t=H(t),e=H(e);for(var n,r,o,a,s,l,c,u,d,h,f=i?0:[],p=0,m=t.length;p180),0,s,e+i*Math.sin(-r*o)]];else l=[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]];return l.toString=y,l}var P=t._unit2px,I={path:function(t){return t.attr("path")},circle:function(t){var e=P(t);return O(e.cx,e.cy,e.r)},ellipse:function(t){var e=P(t);return O(e.cx||0,e.cy||0,e.rx,e.ry)},rect:function(t){var e=P(t);return B(e.x||0,e.y||0,e.width,e.height,e.rx,e.ry)},image:function(t){var e=P(t);return B(e.x||0,e.y||0,e.width,e.height)},line:function(t){return"M"+[t.attr("x1")||0,t.attr("y1")||0,t.attr("x2"),t.attr("y2")]},polyline:function(t){return"M"+t.attr("points")},polygon:function(t){return"M"+t.attr("points")+"z"},deflt:function(t){var e=t.node.getBBox();return B(e.x,e.y,e.width,e.height)}};function N(e){var i=g(e);if(i.abs)return w(i.abs);if(o(e,"array")&&o(e&&e[0],"array")||(e=t.parsePathString(e)),!e||!e.length)return[["M",0,0]];var n,r=[],a=0,s=0,l=0,c=0,u=0;"M"==e[0][0]&&(l=a=+e[0][1],c=s=+e[0][2],u++,r[0]=["M",a,s]);for(var d,h,f=3==e.length&&"M"==e[0][0]&&"R"==e[1][0].toUpperCase()&&"Z"==e[2][0].toUpperCase(),p=u,m=e.length;p1&&(r*=T=u.sqrt(T),o*=T);var C=r*r,S=o*o,_=(s==l?-1:1)*u.sqrt(m((C*S-C*b*b-S*x*x)/(C*b*b+S*x*x))),k=_*r*b/o+(i+c)/2,E=_*-o*x/r+(n+h)/2,F=u.asin(((n-E)/o).toFixed(9)),A=u.asin(((h-E)/o).toFixed(9));(F=iA&&(F-=2*d),!l&&A>F&&(A-=2*d)}var M=A-F;if(m(M)>g){var z=A,j=c,D=h;A=F+g*(l&&A>F?1:-1),y=e(c=k+r*u.cos(A),h=E+o*u.sin(A),r,o,a,0,l,j,D,[A,z,k,E])}M=A-F;var L=u.cos(F),B=u.sin(F),O=u.cos(A),P=u.sin(A),I=u.tan(M/4),N=4/3*r*I,R=4/3*o*I,q=[i,n],X=[i+N*B,n-R*L],H=[c+N*P,h-R*O],W=[c,h];if(X[0]=2*q[0]-X[0],X[1]=2*q[1]-X[1],f)return[X,H,W].concat(y);for(var Y=[],$=0,V=(y=[X,H,W].concat(y).join().split(",")).length;$7){t[e].shift();for(var i=t[e];i.length;)v[e]="A",o&&(y[e]="A"),t.splice(e++,0,["C"].concat(i.splice(0,6)));t.splice(e,1),C=f(r.length,o&&o.length||0)}},p=function(t,e,i,n,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",n.x,n.y]),i.bx=0,i.by=0,i.x=t[a][1],i.y=t[a][2],C=f(r.length,o&&o.length||0))},v=[],y=[],x="",b="",T=0,C=f(r.length,o&&o.length||0);Tn;n+=2){var o=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?o[3]={x:+t[0],y:+t[1]}:r-2==n&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?o[3]=o[2]:n||(o[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i}t.path=g,t.path.getTotalLength=T,t.path.getPointAtLength=C,t.path.getSubpath=function(t,e,i){if(this.getTotalLength(t)-i<1e-6)return S(t,e).end;var n=S(t,i,1);return e?S(n,e).end:n},r.getTotalLength=function(){if(this.node.getTotalLength)return this.node.getTotalLength()},r.getPointAtLength=function(t){return C(this.attr("d"),t)},r.getSubpath=function(e,i){return t.path.getSubpath(this.attr("d"),e,i)},t._.box=v,t.path.findDotsAtSegment=_,t.path.bezierBBox=k,t.path.isPointInsideBBox=E,t.closest=function(e,i,n,r){for(var o=100,a=v(e-o/2,i-o/2,o,o),s=[],l=n[0].hasOwnProperty("x")?function(t){return{x:n[t].x,y:n[t].y}}:function(t){return{x:n[t],y:r[t]}},c=0;o<=1e6&&!c;){for(var u=0,d=n.length;um&&(p=m,s[u].len=m,f=s[u])}return f}},t.path.isBBoxIntersect=F,t.path.intersection=function(t,e){return D(t,e)},t.path.intersectionNumber=function(t,e){return D(t,e,1)},t.path.isPointInside=function(t,e,i){var n=L(t);return E(n,e,i)&&D(t,[["M",e,i],["H",n.x2+10]],1)%2==1},t.path.getBBox=L,t.path.get=I,t.path.toRelative=function(e){var i=g(e),n=String.prototype.toLowerCase;if(i.rel)return w(i.rel);t.is(e,"array")&&t.is(e&&e[0],"array")||(e=t.parsePathString(e));var r=[],o=0,a=0,s=0,l=0,c=0;"M"==e[0][0]&&(s=o=e[0][1],l=a=e[0][2],c++,r.push(["M",o,a]));for(var u=c,d=e.length;u',{def:n})},t.filter.blur.toString=function(){return this()},t.filter.shadow=function(e,i,n,r,o){return null==o&&(null==r?(o=n,n=4,r="#000"):(o=r,r=n,n=4)),null==n&&(n=4),null==o&&(o=1),null==e&&(e=0,i=2),null==i&&(i=e),r=t.color(r),t.format('',{color:r,dx:e,dy:i,blur:n,opacity:o})},t.filter.shadow.toString=function(){return this()},t.filter.grayscale=function(e){return null==e&&(e=1),t.format('',{a:.2126+.7874*(1-e),b:.7152-.7152*(1-e),c:.0722-.0722*(1-e),d:.2126-.2126*(1-e),e:.7152+.2848*(1-e),f:.0722-.0722*(1-e),g:.2126-.2126*(1-e),h:.0722+.9278*(1-e)})},t.filter.grayscale.toString=function(){return this()},t.filter.sepia=function(e){return null==e&&(e=1),t.format('',{a:.393+.607*(1-e),b:.769-.769*(1-e),c:.189-.189*(1-e),d:.349-.349*(1-e),e:.686+.314*(1-e),f:.168-.168*(1-e),g:.272-.272*(1-e),h:.534-.534*(1-e),i:.131+.869*(1-e)})},t.filter.sepia.toString=function(){return this()},t.filter.saturate=function(e){return null==e&&(e=1),t.format('',{amount:1-e})},t.filter.saturate.toString=function(){return this()},t.filter.hueRotate=function(e){return e=e||0,t.format('',{angle:e})},t.filter.hueRotate.toString=function(){return this()},t.filter.invert=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:1-e})},t.filter.invert.toString=function(){return this()},t.filter.brightness=function(e){return null==e&&(e=1),t.format('',{amount:e})},t.filter.brightness.toString=function(){return this()},t.filter.contrast=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:.5-e/2})},t.filter.contrast.toString=function(){return this()}}),n.plugin(function(t,e,i,n,r){var o=t._.box,a=t.is,s=/^[^a-z]*([tbmlrc])/i,l=function(){return"T"+this.dx+","+this.dy};e.prototype.getAlign=function(t,e){null==e&&a(t,"string")&&(e=t,t=null);var i=(t=t||this.paper).getBBox?t.getBBox():o(t),n=this.getBBox(),r={};switch(e=(e=e&&e.match(s))?e[1].toLowerCase():"c"){case"t":r.dx=0,r.dy=i.y-n.y;break;case"b":r.dx=0,r.dy=i.y2-n.y2;break;case"m":r.dx=0,r.dy=i.cy-n.cy;break;case"l":r.dx=i.x-n.x,r.dy=0;break;case"r":r.dx=i.x2-n.x2,r.dy=0;break;default:r.dx=i.cx-n.cx,r.dy=0}return r.toString=l,r},e.prototype.align=function(t,e){return this.transform("..."+this.getAlign(t,e))}}),n.plugin(function(e,i,n,r){function o(t){t=t.split(/(?=#)/);var e=new String(t[5]);return e[50]=t[0],e[100]=t[1],e[200]=t[2],e[300]=t[3],e[400]=t[4],e[500]=t[5],e[600]=t[6],e[700]=t[7],e[800]=t[8],e[900]=t[9],t[10]&&(e.A100=t[10],e.A200=t[11],e.A400=t[12],e.A700=t[13]),e}e.mui={},e.flat={},e.mui.red=o("#ffebee#ffcdd2#ef9a9a#e57373#ef5350#f44336#e53935#d32f2f#c62828#b71c1c#ff8a80#ff5252#ff1744#d50000"),e.mui.pink=o("#FCE4EC#F8BBD0#F48FB1#F06292#EC407A#E91E63#D81B60#C2185B#AD1457#880E4F#FF80AB#FF4081#F50057#C51162"),e.mui.purple=o("#F3E5F5#E1BEE7#CE93D8#BA68C8#AB47BC#9C27B0#8E24AA#7B1FA2#6A1B9A#4A148C#EA80FC#E040FB#D500F9#AA00FF"),e.mui.deeppurple=o("#EDE7F6#D1C4E9#B39DDB#9575CD#7E57C2#673AB7#5E35B1#512DA8#4527A0#311B92#B388FF#7C4DFF#651FFF#6200EA"),e.mui.indigo=o("#E8EAF6#C5CAE9#9FA8DA#7986CB#5C6BC0#3F51B5#3949AB#303F9F#283593#1A237E#8C9EFF#536DFE#3D5AFE#304FFE"),e.mui.blue=o("#E3F2FD#BBDEFB#90CAF9#64B5F6#64B5F6#2196F3#1E88E5#1976D2#1565C0#0D47A1#82B1FF#448AFF#2979FF#2962FF"),e.mui.lightblue=o("#E1F5FE#B3E5FC#81D4FA#4FC3F7#29B6F6#03A9F4#039BE5#0288D1#0277BD#01579B#80D8FF#40C4FF#00B0FF#0091EA"),e.mui.cyan=o("#E0F7FA#B2EBF2#80DEEA#4DD0E1#26C6DA#00BCD4#00ACC1#0097A7#00838F#006064#84FFFF#18FFFF#00E5FF#00B8D4"),e.mui.teal=o("#E0F2F1#B2DFDB#80CBC4#4DB6AC#26A69A#009688#00897B#00796B#00695C#004D40#A7FFEB#64FFDA#1DE9B6#00BFA5"),e.mui.green=o("#E8F5E9#C8E6C9#A5D6A7#81C784#66BB6A#4CAF50#43A047#388E3C#2E7D32#1B5E20#B9F6CA#69F0AE#00E676#00C853"),e.mui.lightgreen=o("#F1F8E9#DCEDC8#C5E1A5#AED581#9CCC65#8BC34A#7CB342#689F38#558B2F#33691E#CCFF90#B2FF59#76FF03#64DD17"),e.mui.lime=o("#F9FBE7#F0F4C3#E6EE9C#DCE775#D4E157#CDDC39#C0CA33#AFB42B#9E9D24#827717#F4FF81#EEFF41#C6FF00#AEEA00"),e.mui.yellow=o("#FFFDE7#FFF9C4#FFF59D#FFF176#FFEE58#FFEB3B#FDD835#FBC02D#F9A825#F57F17#FFFF8D#FFFF00#FFEA00#FFD600"),e.mui.amber=o("#FFF8E1#FFECB3#FFE082#FFD54F#FFCA28#FFC107#FFB300#FFA000#FF8F00#FF6F00#FFE57F#FFD740#FFC400#FFAB00"),e.mui.orange=o("#FFF3E0#FFE0B2#FFCC80#FFB74D#FFA726#FF9800#FB8C00#F57C00#EF6C00#E65100#FFD180#FFAB40#FF9100#FF6D00"),e.mui.deeporange=o("#FBE9E7#FFCCBC#FFAB91#FF8A65#FF7043#FF5722#F4511E#E64A19#D84315#BF360C#FF9E80#FF6E40#FF3D00#DD2C00"),e.mui.brown=o("#EFEBE9#D7CCC8#BCAAA4#A1887F#8D6E63#795548#6D4C41#5D4037#4E342E#3E2723"),e.mui.grey=o("#FAFAFA#F5F5F5#EEEEEE#E0E0E0#BDBDBD#9E9E9E#757575#616161#424242#212121"),e.mui.bluegrey=o("#ECEFF1#CFD8DC#B0BEC5#90A4AE#78909C#607D8B#546E7A#455A64#37474F#263238"),e.flat.turquoise="#1abc9c",e.flat.greensea="#16a085",e.flat.sunflower="#f1c40f",e.flat.orange="#f39c12",e.flat.emerland="#2ecc71",e.flat.nephritis="#27ae60",e.flat.carrot="#e67e22",e.flat.pumpkin="#d35400",e.flat.peterriver="#3498db",e.flat.belizehole="#2980b9",e.flat.alizarin="#e74c3c",e.flat.pomegranate="#c0392b",e.flat.amethyst="#9b59b6",e.flat.wisteria="#8e44ad",e.flat.clouds="#ecf0f1",e.flat.silver="#bdc3c7",e.flat.wetasphalt="#34495e",e.flat.midnightblue="#2c3e50",e.flat.concrete="#95a5a6",e.flat.asbestos="#7f8c8d",e.importMUIColors=function(){for(var i in e.mui)e.mui.hasOwnProperty(i)&&(t[i]=e.mui[i])}}),n});var filmWidth,contentWidth,sidebarWidth,ua=navigator.userAgent.toLowerCase(),platform=navigator.platform.toLowerCase(),$window=jQuery(window),$document=jQuery(document),$html=jQuery("html"),$body=jQuery("body"),android_ancient=-1!==ua.indexOf("mozilla/5.0")&&-1!==ua.indexOf("android")&&-1!==ua.indexOf("applewebKit")&&-1===ua.indexOf("chrome"),apple=ua.match(/(iPad|iPhone|iPod|Macintosh)/i),webkit=-1!=ua.indexOf("webkit"),isiPhone=!1,isiPod=!1,isAndroidPhone=!1,android=!1,iOS=!1,isIE=!1,ieMobile=!1,isSafari=!1,isMac=!1,isWindows=!1,isiele10=!1,isiPad=!1,firefox=-1!=ua.indexOf("gecko"),safari=-1!=ua.indexOf("safari")&&-1==ua.indexOf("chrome"),is_small=jQuery(".js-nav-trigger").is(":visible"),windowHeight=$window.height(),windowWidth=$window.width(),documentHeight=$document.height(),myOrientation=windowWidth>windowHeight?"portrait":"landscape",latestKnownScrollY=window.scrollY,latestKnownScrollX=window.scrollX,latestKnownMouseX=0,latestKnownMouseY=0,latestDeviceAlpha=0,latestDeviceBeta=0,latestDeviceGamma=0,ticking=!1,horToVertScroll=!1,globalDebug=!1;!function(t,e){"use strict";var i,n=function(){var e,i,n,r;function o(){var o=e.find(".filmstrip__item").length;globalDebug&&console.log("Loading All Posts - AJAX Offset = "+o),n=!0;var a={action:"timber_load_next_posts",nonce:timber_ajax.nonce,offset:o,post_type:"post",posts_number:"all"};E(e.data("post_type"))||(a.post_type=e.data("post_type")),E(e.data("taxonomy"))?E(e.data("search"))||(a.search=e.data("search")):(a.taxonomy=e.data("taxonomy"),a.term_id=e.data("term_id")),t.post(timber_ajax.ajax_url,a,function(o){if(o.success){globalDebug&&console.log("Loaded all posts");var a=t(o.data.posts).filter(".filmstrip__item");globalDebug&&console.log("Adding new "+a.length+" items to the DOM"),t(".navigation").hide().remove(),a.imagesLoaded(function(){globalDebug&&console.log("MixItUp Filtering - Images Loaded"),e.mixItUp("append",a,{filter:r}),i=!1,n=!1,globalDebug&&console.log("MixItUp Filtering - Filter by "+r)})}else globalDebug&&console.log("MixItUp Filtering - There were no more posts to load - so filter please"),i=!1,n=!1,e.mixItUp("filter",r)})}function a(){var i=e.find(".filmstrip__item").length;globalDebug&&console.log("Loading More Posts - AJAX Offset = "+i),n=!0,t(".preloader").css("opacity",1);var r={action:"timber_load_next_posts",nonce:timber_ajax.nonce,post_type:"post",offset:i,posts_number:timber_ajax.posts_number};E(e.data("post_type"))||(r.post_type=e.data("post_type")),E(e.data("taxonomy"))?E(e.data("search"))||(r.search=e.data("search")):(r.taxonomy=e.data("taxonomy"),r.term_id=e.data("term_id")),t.post(timber_ajax.ajax_url,r,function(i){if(i.success){globalDebug&&console.log("Loaded next posts");var r=t(i.data.posts).filter(".filmstrip__item");globalDebug&&console.log("Adding new "+r.length+" items to the DOM"),r.imagesLoaded(function(){globalDebug&&console.log("MixItUp Filtering - Images Loaded"),e.mixItUp("append",r),isiele10&&s(),n=!1})}else globalDebug&&console.log("It seems that there are no more posts to load"),t(".navigation").fadeOut();t(".preloader").css("opacity",0)})}function s(){e.width((t(".filmstrip__item ").first().width()+50)*t(".filmstrip__item").length+100)}return{init:function(){if(e=t(".filmstrip"),windowWidth,windowHeight,i=!0,n=!1,r="",e.length&&e.children(".filmstrip__item").length){t(".navigation").hide(),isiele10&&s();var l="flex";isSafari&&(l="-webkit-flex"),t("html").hasClass("is--ie-le10")&&(l="block"),e.mixItUp({animation:{enable:!1},selectors:{filter:".no-real-selector-for-filtering",target:".filmstrip__item"},layout:{display:l},callbacks:{onMixEnd:function(t){isiele10&&s()}}}),t(".filter").on("click",".filter__item",function(){return r=t(this).data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==i?o():e.mixItUp("filter",r),!1}),t(".js-filter-mobile-journal").change(function(){return r=t(this).children(":selected").data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==i?o():e.mixItUp("filter",r),!1});var c=e.children(".filmstrip__item").last();windowWidth-(c.offset().left+c.width())>0&&a()}},loadAllPosts:o,loadNextPosts:a,maybeLoadNextPosts:function(){e.length&&!n&&e.children(".filmstrip__item").last().is(":appeared")&&a()},calcIeFilmstrip:s}}(),r=function(){var e,i,n,r,o,a,s,l,c,u,d,h,f;function p(t){var e=t.attr("width"),i=t.attr("height"),n=o/e,r=a/i,s=Math.max(n,r);t.width(s*e),t.height(s*i)}function m(e){switch(e.which){case 37:if(t(".slider--show_next").length>0||u.prev("div").length<=0)return;b(),k(),C(),e.preventDefault();break;case 39:if(u.next("div").length<=0)return;x(),S(),T(),e.preventDefault();break;default:return}}function g(){r.off("click",S),n.off("click",k),Modernizr.touchevents&&(e.add(".vertical-title").hammer().unbind("swipeleft"),e.add(".vertical-title").hammer().unbind("swiperight")),t(document).off("keydown",m)}function v(){f>70&&!t("html").is(".is--ie9, .is--ie-le10")&&(r.off("mouseenter").on("mouseenter",x),r.off("mouseleave").on("mouseleave",T)),r.on("click",S),f>70&&!t("html").is(".is--ie9, .is--ie-le10")&&(n.off("mouseenter").on("mouseenter",b),n.off("mouseleave").on("mouseleave",C)),n.on("click",k),Modernizr.touchevents&&(e.add(".vertical-title").hammer().bind("swipeleft",y),e.add(".vertical-title").hammer().bind("swiperight",w)),t(document).on("keydown",m)}function y(){S(),T()}function w(){k(),C()}function x(){TweenMax.to(h.find(".project-slide__image"),.4,{opacity:1,ease:Quint.easeOut}),TweenMax.to(h.add(".project-slide__content"),.4,{x:-60,ease:Back.easeOut},"-=.4"),TweenMax.to(h,.4,{width:160,ease:Back.easeOut},"-=.4"),TweenMax.to(r,.4,{x:-30,ease:Back.easeOut},"-=.4")}function b(){TweenMax.to(d.find(".project-slide__image"),.4,{opacity:1,ease:Quint.easeOut}),TweenMax.to(t(".project-slide__content"),.4,{x:60,ease:Back.easeOut}),TweenMax.to(d,.4,{width:160,ease:Back.easeOut}),TweenMax.to(n,.4,{x:30,ease:Back.easeOut})}function T(){TweenMax.to(h.find(".project-slide__image"),.4,{opacity:.6,ease:Quint.easeOut}),TweenMax.to(h.add(".project-slide__content"),.4,{x:0,ease:Quint.easeOut}),TweenMax.to(h,.4,{width:f,ease:Quint.easeOut}),TweenMax.to(t(".vertical-title.next"),.4,{x:0,ease:Quint.easeOut})}function C(){TweenMax.to(d.find(".project-slide__image"),.4,{opacity:.6,ease:Quint.easeOut}),TweenMax.to(d.add(t(".project-slide__content")),.4,{x:0,ease:Quint.easeOut}),TweenMax.to(d,.4,{width:f,ease:Quint.easeOut}),TweenMax.to(t(".vertical-title.prev"),.4,{x:0,ease:Quint.easeOut})}function S(){var i=function(){var i=new TimelineMax({paused:!0,onComplete:_});i.to(h.next().find(".project-slide__image"),0,{opacity:1,ease:Power1.easeOut}),i.to(e,.7,{x:"-="+f,ease:Quint.easeOut}),i.to(u,.7,{width:f,ease:Quint.easeOut},"-=.7"),i.to(h,.7,{width:o,left:"-="+(o-f),x:0,ease:Quint.easeOut},"-=.7"),f>70&&!t("html").is(".is--ie9, .is--ie-le10")?i.to(h.next(),.4,{width:160,x:-60,ease:Quint.easeOut},"-=.7"):(i.to(h.find(".project-slide__image"),.4,{opacity:1,ease:Power1.easeOut},"-=.4"),i.to(h.next().find(".project-slide__image"),.4,{opacity:.6,ease:Power1.easeOut},"-=.4"));return i.to(u.find(".project-slide__image"),.4,{opacity:.6,ease:Power1.easeOut},"-=.4"),i}();d=u,u=h,h=h.next(),g(),M(u),i.play(),F(1)}function _(){l.first().appendTo(e).css("left","+="+s),l=e.children(),z(),v()}function k(){var i=function(){var i=new TimelineMax({paused:!0,onComplete:E});i.to(d.prev().find(".project-slide__image"),0,{opacity:1,ease:Quint.easeOut}),i.to(e,.7,{x:"+="+f,ease:Quint.easeOut}),i.to(u,.7,{width:f,left:"+="+(o-f),ease:Quint.easeOut},"-=.7"),i.to(d,.7,{width:o,x:0,ease:Quint.easeOut},"-=.7"),t("html").is(".is--ie9, .is--ie-le10")||i.to(d.prev(),.4,{width:160,ease:Quint.easeOut},"-=.7");return i.to(u.find(".project-slide__image"),.4,{opacity:.6,ease:Quint.easeOut},"-=.4"),i}();h=u,u=d,d=d.prev(),g(),M(u),i.play(),F(-1)}function E(){l.last().prependTo(e).css("left","-="+s),l=e.children(),z(),v()}function F(e){var i=t(".rsNavSelected"),n=i.index();i.removeClass("rsNavSelected"),n+e==c?t(".rsBullet").eq(0).addClass("rsNavSelected"):n+e==-1?t(".rsBullet").eq(c-1).addClass("rsNavSelected"):t(".rsBullet").eq(n+e).addClass("rsNavSelected")}function A(){i.find(".portfolio_types").html(u.data("types")),i.find("a").attr("href",u.data("link")).attr("title",u.data("link-title")),u.find(".project-slide__image").css("opacity",1),TweenMax.fromTo(i.find(".project-slide__title h1"),.7,{y:"-100%"},{y:"0%",delay:.5,ease:Expo.easeInOut}),TweenMax.fromTo(i.find(".js-title-mask"),.7,{y:"100%"},{y:"0%",delay:.5,ease:Expo.easeInOut}),TweenMax.fromTo(i.find(".portfolio_types"),.3,{opacity:0},{opacity:1,delay:.9,ease:Quint.easeIn}),TweenMax.fromTo(i.find(".project-slide__text"),.4,{x:-10,opacity:0},{x:0,opacity:1,delay:1,ease:Quint.easeOut})}function M(e){var n=i.find(".project-slide__title h1"),r=i.clone(),o=r.find(".project-slide__title h1"),a=r.find(".portfolio_types"),s=e.data("title"),l=e.data("types"),c=e.data("link"),u=e.data("link-title"),d=t(".vertical-title.next span"),h=d.clone(),f=e.next().data("title"),p=t(".vertical-title.prev span"),m=p.clone(),g=e.prev().data("title"),v=new TimelineMax({paused:!0,onComplete:function(){p.remove(),d.remove(),i.remove(),i=r}});m.text(g),h.text(f),o.text(s),a.html(l),r.find("a").attr({href:c,title:u});var y=i.find(".portfolio_types").add(d).add(p),w=a.add(h).add(m);v.fromTo(y,.3,{opacity:1},{opacity:0,ease:Quint.easeIn}),v.fromTo(w,.3,{opacity:0},{opacity:1,ease:Quint.easeIn},"-=0.2"),v.fromTo(n,.3,{opacity:1},{opacity:0,ease:Quint.easeOut},"-=0.3"),v.fromTo(o,.5,{y:"-100%"},{y:"0%",ease:Expo.easeOut},"-=0.2"),v.fromTo(r.find(".js-title-mask"),.5,{y:"100%"},{y:"0%",ease:Expo.easeOut},"-=0.5"),i.find(".project-slide__text").css("opacity",0),h.insertAfter(d),m.insertAfter(p),r.insertAfter(i),v.play()}function z(){u.css("z-index",""),d.css("z-index",10).prev().css("z-index",20),h.css("z-index",10).next().css("z-index",20)}return{init:function(){if(void 0===(e=t(".projects-slider")).data("loaded")||!0!==e.data("loaded")){var m;if(i=t(".project-slide__content"),n=t(".vertical-title.prev"),r=t(".vertical-title.next"),r.add(n),o=e.width(),a=e.height(),s=0,l=e.children(),c=l.length,u=l.eq(0),f=r.width()-100,c<2)return e.css({opacity:1,margin:0}),void A();c<3&&(e.css({marginLeft:0}),o=e.width(),n.hide()),c<5&&(l.clone().appendTo(e),l=e.children()),l.not(u).width(f),e.imagesLoaded(function(){l.each(function(e,i){var n=t(i);0!=e?(s+=f,n.css("left",o+(e-1)*f)):s+=o,p(n.find("img"))}),TweenMax.to(e,.3,{opacity:1}),m=parseInt((l.length-1)/2,10),l.slice(-m).prependTo(e).each(function(e,i){t(i).css("left","-="+s)}),l=e.children(),d=u.prev(),h=u.next(),function(){for(var e=t(".projects-slider__bullets"),i=0;i');e.children().first().addClass("rsNavSelected")}(),z(),g(),v(),A()}),e.data("loaded",!0)}},onResize:function(){var i=e.width(),n=u.nextAll(),r=i-o;a=e.height(),s+=r,o=i,u.width(o),n.each(function(e,i){t(i).css("left","+="+r)}),l.each(function(e,i){p(t(i).find("img"))})}}}();i=function(t,e){var i;t.fn.hammer=function(i){return this.each(function(){!function(i,n){var r=t(i);r.data("hammer")||r.data("hammer",new e(r[0],n))}(this,i)})},e.Manager.prototype.emit=(i=e.Manager.prototype.emit,function(e,n){i.call(this,e,n),t(this.element).trigger({type:e,gesture:n})})},"function"==typeof define&&define.amd?define(["jquery","hammerjs"],i):"object"==typeof exports?i(require("jquery"),require("hammerjs")):i(jQuery,Hammer);var o=function(){var e,i=t(".mobile-header");function n(t){t.preventDefault(),e?a():o()}function r(){t(".js-nav-toggle").css({marginTop:i.outerHeight()/2})}function o(){$body.addClass("navigation--is-visible"),e=!0}function a(){$body.removeClass("navigation--is-visible"),e=!1}return{init:function(){e=!1,r(),t(".js-nav-toggle").off("click",n).on("click",n)},onResize:r,open:o,close:a}}(),a=function(){var e;function i(){e.each(function(e,i){var n=t(i),r=n.data("image"),o=n.data("src");void 0===o&&(o=n.data("srcsmall")),n.data("loaded")||function(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);var e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return e.top<=1.5*i&&e.left<=1.5*n&&e.bottom>=-.5*i&&e.right>=-.5*n}(n)&&(n.data("loaded",!0),r.attr("src",o),r.prependTo(n),r.imagesLoaded(function(){TweenMax.to(r,.3,{opacity:1}),n.addClass("js-loaded")}))})}return{update:function(n,r){n=n||t("body"),(e=n.find(".js-placeholder")).each(function(e,i){t(i)}),e.each(function(e,i){var n=t(i).data("loaded",!1),r=n.data("width"),o=n.data("height"),a=n.height(),s=Math.round(a*r/o),l=t(document.createElement("img")).css("opacity",0);n.data("newHeight",a),n.data("newWidth",s),n.data("image",l)}),e.each(function(e,i){var n=t(i);n.width(n.data("newWidth"))}),t(window).on("DOMContentLoaded load resize scroll",i),t(".portfolio--grid, .site-content").on("scroll",i),i()},resize:function(){e.each(function(e,i){var n=t(i),r=n.data("width"),o=n.data("height"),a=n.height(),s=Math.round(a*r/o);n.data("newWidth",s)}),e.each(function(e,i){var n=t(i);n.width(n.data("newWidth"))})}}}();function s(){var e=navigator.userAgent.toLowerCase(),i=navigator.platform.toLowerCase();isiPhone=i.indexOf("iphone"),isiPod=i.indexOf("ipod"),isAndroidPhone=i.indexOf("android"),isSafari=-1!=e.indexOf("safari")&&-1==e.indexOf("chrome"),isIE="undefined"!=typeof is_ie||!window.ActiveXObject&&"ActiveXObject"in window,isiele10=ua.match(/msie (9|([1-9][0-9]))/i),ieMobile=!!ua.match(/Windows Phone/i),iOS=function(t){return t=t||navigator.userAgent,parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(t)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||!1}(),android=function(t){var e;return!!(e=(t=t||navigator.userAgent).match(/[A|a]ndroid\s([0-9\.]*)/))&&e[1]}(),isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,isWindows=-1!==navigator.platform.toUpperCase().indexOf("WIN"),isiPad=null!=navigator.userAgent.match(/iPad/i),iOS&&iOS<8&&$html.addClass("no-scroll-fx"),function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}()&&$html.addClass("is--ie"),isiele10&&$html.addClass("is--ie-le10"),ieMobile&&$html.addClass("is--ie-mobile"),isiPad&&$html.addClass("is--ipad");var n=function(){return-1!=navigator.appVersion.indexOf("MSIE")},r=(navigator.appVersion,function(){var t=999;return-1!=navigator.appVersion.indexOf("MSIE")&&(t=parseFloat(navigator.appVersion.split("MSIE")[1])),t});n()&&9==r()&&t("html").addClass("is--ie9")}var l,c,u,d,h,f,p,m=(d=!1,h=function(){t(".site-content.portfolio-archive").on("scroll",function(){requestTick()}),t(".js-projects-filter").on("click",".filter__item",function(){return c=t(this).data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==u?f():l.mixItUp("filter",c),!1}),t(".js-filter-mobile-portfolio").change(function(){return c=t(this).children(":selected").data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==u?f():l.mixItUp("filter",c),!1})},{init:function(){if(l=t(".portfolio-wrapper"),c="*",u=!0,d=!1,l.length){t(".navigation").hide();var e="flex";isSafari&&(e="-webkit-flex"),t("html").hasClass("is--ie")&&(e="block"),l.mixItUp({animation:{effects:"fade"},selectors:{filter:".no-real-selector-for-filtering",target:".portfolio--project"},layout:{display:e},callbacks:{onMixEnd:function(t){isiele10&&calcIEFilmstrip()}}}),h(),l.children("article").last().offset().top").addClass("fullview__image"),m=t(document.createElement("img"));return s=r*f,l=o*f,F(e),p.css({width:s,height:l,top:(l-c)/-2,left:(s-a)/-2}),n.append(p),i?e.find("iframe").clone().prependTo(p):m.attr("src",e.data("srcfull")).prependTo(p),p}function C(e){if(void 0===e||!t(e.target).is(".js-thumbs, .js-plus, .js-minus")){var i=t(this),r=T(i);t(".button-full").css("opacity",0),i.addClass("hide-meta"),latestDeviceAlpha,c=latestDeviceBeta,u=latestDeviceGamma,k(i,r),"fit"===d?n.css("backgroundColor","#222222"):Modernizr.touchevents?(t(window).on("deviceorientation",S),$document.on("mousemove",S)):setTimeout(function(){TweenMax.to(t(".fullview__image img"),.5,{x:(windowWidth/2-latestKnownMouseX)*(s-windowWidth)/windowWidth,y:(windowHeight/2-latestKnownMouseY)*(l-windowHeight)/windowHeight,ease:Back.easeOut,onComplete:function(){$document.on("mousemove",S),t(window).on("deviceorientation",S),F(i)}})},500),n.addClass("fullview--visible")}}function S(){t(".fullview__image img").each(function(e,i){var n=t(i),r=n.width(),o=n.height();if(Modernizr.touchevents){var a,s,l=c-latestDeviceBeta,d=u-latestDeviceGamma;a=d=d<-30?-30:d>30?30:d,s=l=l<-30?-30:l>30?30:l,windowWidth>windowHeight&&(a=-l,s=-d),r>windowWidth&&TweenMax.to(n,0,{x:a/60*(r-windowWidth)}),o>windowHeight&&TweenMax.to(n,0,{y:s/60*(o-windowHeight)})}else r>windowWidth&&TweenMax.to(n,0,{x:(windowWidth/2-latestKnownMouseX)*(r-windowWidth)/windowWidth}),o>windowHeight&&TweenMax.to(n,0,{y:(windowHeight/2-latestKnownMouseY)*(o-windowHeight)/windowHeight})})}function _(e){var i=t(".fullview__image"),r=t(".portfolio__item--active").addClass("hide-meta"),o=r.is(".portfolio__item--video");function a(){k(i,r,{},function(){t(".site-content").removeClass("site-content--fullview"),t(".button-full").css("opacity",1),r.removeClass("hide-meta")}),setTimeout(function(){n.removeClass("fullview--visible"),i.remove()},10)}void 0!==e&&(e.stopPropagation(),e.preventDefault()),r.children().not(".jetpack-video-wrapper").add(r).addClass("no-transition").css("opacity",0),setTimeout(function(){r.children().add(r).removeClass("no-transition")},10),"fit"==d&&n.css("backgroundColor","transparent"),$document.off("mousemove",S),t(window).off("deviceorientation",S),F(r),b(r),t(".site-content").addClass("site-content--fullview"),o?a():"fill"===d?TweenMax.to(t(".fullview__image img"),.2,{x:0,y:0,onComplete:a}):(n.css("backgroundColor","transparent"),setTimeout(function(){a()},200))}function k(e,i,n,r,o){var a=e.offset(),s=e.width(),l=e.height(),c=i.offset(),u=i.width(),d=i.height(),h=e.clone().addClass("portfolio__item--clone");o=void 0===o||o,h.css({position:"absolute",top:a.top-c.top,left:a.left-c.left,width:s,height:l,background:"none"}),i.css({position:"relative",transition:"none","z-index":"10000",opacity:1,background:"none"}),h.css("opacity",1),h.find("img").css("opacity",1),i.find("img").css("opacity",0);var f={x:c.left-a.left+(u-s)/2,y:c.top-a.top+(d-l)/2,scale:u/s,force3D:!0,ease:Expo.easeInOut,onComplete:function(){i.find("img").css("opacity",1),i.css({background:"",position:"","z-index":"",transition:"",opacity:""}),E(i.data("caption"))||i.children(".photometa").css("opacity",1),e.css("opacity",""),o&&h.remove(),void 0!==r&&r()}},p=t.extend(f,n);requestAnimationFrame(function(){TweenMax.to(i.children(".photometa"),0,{opacity:0}),h.prependTo(i),TweenMax.to(h.children(".photometa"),.3,{opacity:0}),TweenMax.to(h,.5,p)})}function F(i){e.find(".js-portfolio-item").removeClass("portfolio__item--active"),i.addClass("portfolio__item--active"),t(".portfolio__position").text(i.data("count")+1+" "+objectl10n.tCounter+" "+e.find(".js-portfolio-item").not(".portfolio__item--clone").length)}return s=windowWidth,l=windowHeight,{init:function(){t(".single-jetpack-portfolio").length&&(a||((t(".image-scaling--fit").length||Modernizr.touchevents&&void 0!==window.disable_mobile_panning&&1==window.disable_mobile_panning)&&(d="fit"),t(".project_layout-filmstrip").length&&(e=t(".js-portfolio"),i=e.clone(!0,!0).addClass("portfolio--grid").insertBefore(e),e.addClass("portfolio--filmstrip").addClass("portfolio--visible"),i.find(".js-portfolio-item").each(function(e,i){var n=t(i);n.data("src",n.data("srcsmall"))}),e.find(".js-portfolio-item").each(function(e,i){var n=t(i);n.data("src",n.data("srcfull"))}),n=t(".fullview"),(t(".single-proof_gallery").length?e.add(i):e).find(".js-portfolio-item").each(function(e,i){var n=t(i),r=n.data("caption"),o=t('').html(r),a=n.data("description"),s=t('').html(""+a+"
"),l=t(''),c=t(''),u=n.data("exif"),d=t('');E(r)&&(c.css("opacity",0),c.addClass("no-caption"),E(a)&&E(u)&&c.hide()),E(u)||t.each(u,function(e,i){t(''+i+"").appendTo(l)}),d.prependTo(n),o.appendTo(c),l.appendTo(c),s.appendTo(c),c.appendTo(n)}),t(window).on("project:resize",h),t(".portfolio--grid").on("click",".js-portfolio-item",x),t(".portfolio--filmstrip").on("click",".js-portfolio-item",C),t(".fullview__close").on("click",_),t(".fullview .rsArrowRight").on("click",m),t(".fullview .rsArrowLeft").on("click",p),t(".fullview").on("click",_),t(".js-details").on("click",f),t(".js-thumbs").on("click",function(t){t.preventDefault(),w()}),t(document).keydown(function(i){if(t(".portfolio--filmstrip.portfolio--visible").length){var n,r,o,a=e.find(".js-portfolio-item");if(a.each(function(e,i){t(i).hasClass("portfolio__item--active")&&(n=e)}),void 0!==n){switch(i.which){case 27:if(t(".fullview--visible").length)return _(),void i.preventDefault();if(t(".portfolio--filmstrip.portfolio--visible").length)return w(),void i.preventDefault();case 13:if(t(".portfolio--filmstrip.portfolio--visible").length&&!t(".fullview--visible").length)return C.call(t(".portfolio__item--active")),void i.preventDefault()}if(t(".fullview--visible").length>0)switch(i.which){case 37:p(),i.preventDefault();break;case 39:m(),i.preventDefault()}else{switch(i.which){case 37:if(0===n)return;r=n-1,i.preventDefault();break;case 39:if(n===a.length-1)return;r=n+1,i.preventDefault();break;default:return}o=a.eq(r);var s=parseInt(t(".bar--fixed").css("left"),10),l=o.data("middle")-t(".site-content").width()/2+s;TweenLite.to(window,.6,{scrollTo:{x:l},ease:Power1.easeInOut})}}}}),a=!0)))},prepare:function(){!t(".project_layout-filmstrip").length&&!t(".project_layout-thumbnails").length||t(".password-required").length||(filmWidth=e.width(),contentWidth=t(".site-content").width(),sidebarWidth=t(".site-sidebar").width(),y(),v(),i.show(),F(e.find(".js-portfolio-item").first().addClass("portfolio__item--active")),t(".project_layout-filmstrip").length||w(0,!0))},onResize:h,getCurrent:function(){if(void 0!==e&&t(".single-jetpack-portfolio").length&&!t(".fullview--visible").length&&a){var i,n=t(".portfolio__item--active").data("middle"),s=latestKnownScrollX+r+(o-r)*latestKnownScrollX/(filmWidth-contentWidth),l=Math.abs(s-n);t(".js-reference").css("left",s).text(parseInt(s,10)),e.find(".js-portfolio-item").each(function(e,n){var r=t(n).data("middle");Math.abs(r-s)1){var k=t(".js-gallery-slides-total"),E=(t(".js-decimal"),t(".js-unit"));k.html(_),S.ev.on("rsBeforeAnimStart",function(t){var e=S.currSlideId+1;E.html(e)})}1==_&&e.addClass("single-slide");if(e.addClass("slider--loaded"),e.hasClass("pixslider")){var F=e.find(".rsArrow");F.appendTo(e);var A=new TimelineLite({delay:.5,paused:!0});A.to(e,0,{overflow:"visible"}).fromTo(F,.3,{opacity:0},{opacity:1}),A.play()}}(t(this));var e=t(this).data("royalSlider");if(e.slides.length){var i=e.slides[0],n=t(i.content);(void 0!==(n.hasClass("video")?n:n.find(".video")).data("video_autoplay")||ieMobile||iOS||android)&&i.holder.on("rsAfterContentSet",function(){e.playVideo()}),e.ev.on("rsBeforeAnimStart",function(t){e.stopVideo()}),e.ev.on("rsAfterSlideChange",function(i){var n=t(e.currSlide.content);(void 0!==(n.hasClass("video")?n:n.find(".video")).data("video_autoplay")||ieMobile||iOS||android)&&(e.stopVideo(),e.playVideo())}),e.ev.on("rsOnDestroyVideoElement",function(e,i){var n=t(this.currSlide.content);(n.hasClass("video")?n:n.find(".video")).removeClass("video_autoplay")})}})}function y(){var e,i,o;isWindows&&($html.niceScroll({zindex:5e3,smoothscroll:!1}),$html.addClass("has--nicescroll"),$html.addClass("is--windows"),t(document).on("jp_carousel.afterClose",function(){$html.getNiceScroll().resize()})),F(),t("html, body, *").unbind("mousewheel",z),horToVertScroll=!1,windowWidth>900&&Modernizr.touchevents&&j.handle(),t(".single-jetpack-portfolio").length?(g.init(),a.update(),g.prepare()):a.update(),m.init(),n.init(),r.init(),v(),videos.init(),e=t(".js-projects-filter"),i=t(".js-projects-filter-content"),o=t(".js-projects-filter-list"),t(".js-projects-filter-trigger").on("mouseenter",function(){e.addClass("is-open"),TweenMax.to(i,.2,{opacity:1,onStart:function(){o.css("display","block")}})}),e.on("mouseleave",function(){e.removeClass("is-open"),TweenMax.to(i,.2,{opacity:0,onComplete:function(){o.css("display","none")}})}),t(".site-header, #page, .site-footer").css("opacity",1),t(".pixcode--tabs").organicTabs(),Modernizr.touchevents||horToVertScroll||M()}function w(){k(),F(),Modernizr.touchevents&&(windowWidth>=900?j.handle():windowWidth<900&&j.unHandle()),g.onResize(),o.onResize(),r.onResize(),videos.resize(),isiele10&&n.calcIeFilmstrip(),a.resize()}function x(){t(".page-has-featured-image").length&&latestKnownScrollY>windowHeight-62?t("body").addClass("header--not-light"):t("body").removeClass("header--not-light")}window.videos=function(){function e(){globalDebug&&console.group("videos::resize"),t(".portfolio__item--video iframe, iframe[data-aspectRatio]").each(function(){var e,i,n=t(this),r=n.attr("data-aspectRatio");if(n.closest(".portfolio__item--video").length)globalDebug&&console.log(e,i,r),e=(i=n.closest(".portfolio__item--video").height())*r,n.width(e),n.height(i);else{i=(e=n.css("width","100%").width())/r;var o=n.parent().width();e>o?n.width(e).height(o*r):n.width(e).height(i)}}),globalDebug&&console.groupEnd()}return{init:function(){globalDebug&&console.group("videos::init"),t(".portfolio__item--video iframe, iframe[width][height]").each(function(){var e=t(this).attr("width")?t(this).attr("width"):t(this).width(),i=t(this).attr("height")?t(this).attr("height"):t(this).height();t(this).attr("data-aspectRatio",e/i).removeAttr("height").removeAttr("width").width(e).height(i)}),t("iframe").each(function(){var i,n,r,o,a,s=t(this).attr("src");E(s)||t(this).attr("src",(i=s,n="wmode",r="transparent",o=new RegExp("([?|&])"+n+"=.*?(&|$)","i"),a="",a=-1!==i.indexOf("?")?"&":"?",i.match(o)?i.replace(o,"$1"+n+"="+r+"$2"):i+a+n+"="+r)),t(this).on("load",function(){e(),t(window).trigger("project:resize")})}),globalDebug&&console.groupEnd()},resize:e}}(),t(function(){t.support.touch=Modernizr.touchevents,t.support.svg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),t.support.transform=function(){for(var t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i740&&M()}(),_()});var b,T=!1;function C(e){t(".filmstrip").length||t(".portfolio--filmstrip.portfolio--visible").length?latestKnownScrollX=t(this).scrollLeft():latestKnownScrollY=t(this).scrollTop(),T||(T=!0,$body.addClass("is-scrolling")),clearTimeout(b),b=setTimeout(S,1e3)}function S(){$body.removeClass("is-scrolling"),T=!1}function _(){g.getCurrent(),m.maybeloadNextProjects(),n.maybeLoadNextPosts(),x(),requestAnimationFrame(_)}function k(){windowHeight=$window.height(),windowWidth=$window.width(),documentHeight=$document.height(),myOrientation=windowWidth>windowHeight?"portrait":"landscape"}function E(t){if("number"==typeof t||"boolean"==typeof t)return!1;if(null==t)return!0;if(void 0!==t.length)return 0===t.length;var e=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e++;return 0===e}function F(){t(".portfolio__item--text").each(function(e,i){var n,r,o,a,s,l=t(i).css("width",""),c=l.offset().left;n=t(i).children(),o=l.outerHeight(),n.length?(r=n.filter(":visible").last()).length&&(s=r.offset().top-l.offset().top+r.outerHeight(),r.offset().left-l.offset().left+r.outerWidth(),a=s>o?l.outerWidth()*(parseInt(s/o)+1):r.offset().left-c+r.outerWidth(),l.width(a)):l.remove()})}function A(){return $body.hasClass("blog")||$body.hasClass("project_layout-filmstrip")||$body.hasClass("project_layout-thumbnails")}function M(){A()&&!$html.hasClass("is--ie-le10")&&(t("html, body, .filmstrip, .portfolio--filmstrip").bind("mousewheel",z),horToVertScroll=!0)}function z(e,i){(t(".filmstrip").length||t(".portfolio--filmstrip.portfolio--visible").length)&&(this.scrollLeft-=i*e.deltaFactor)}!function(){function t(t){"touch"===t.pointerType&&(Modernizr.touchevents=!0)}window.disable_mobile_panning=!0,window.addEventListener("touchstart",function t(){Modernizr.touchevents=!0,window.removeEventListener("touchstart",t,!1)},!1),window.addEventListener("MSPointerDown",t),window.addEventListener("pointerdown",t),window.addEventListener("devicemotion",function(t){t.rotationRate&&(t.rotationRate.alpha||t.rotationRate.beta||t.rotationRate.gamma)&&(window.disable_mobile_panning=!1)})}();var j={handle:function(){t(".menu-item-has-children").removeClass("hover"),t(".menu-item-has-children > a").each(function(){t(this).addClass("prevent-one"),t(this).attr("href-original",t(this).attr("href")),t(this).attr("href",t(this).attr("href")+"#")}),t("a.prevent-one").on("click",function(e){e.preventDefault(),e.stopPropagation(),t(this).parent().siblings().removeClass("hover"),t(this).attr("href",t(this).attr("href-original")),t(this).parent().addClass("hover")})},unHandle:function(){t("a.prevent-one").each(function(){t(this).unbind(),t(this).attr("href",t(this).attr("href-original")),t(this).removeClass("prevent-one")})},bindOuterNavClick:function(){t("body").on("touchstart",function(e){var i=t(".nav--main");i.is(e.target)||0!==i.has(e.target).length||(t(".menu-item-has-children").removeClass("hover"),t("a.prevent-one").each(function(){t(this).attr("href",t(this).attr("href-original")+"#")}))})}}}(jQuery);
\ No newline at end of file
+!function(t){var e,i,n=t.event;e=n.special.debouncedresize={setup:function(){t(this).on("resize",e.handler)},teardown:function(){t(this).off("resize",e.handler)},handler:function(t,r){var o=this,a=arguments,s=function(){t.type="debouncedresize",n.dispatch.apply(o,a)};i&&clearTimeout(i),r?s():i=setTimeout(s,e.threshold)},threshold:150}}(jQuery),function(t){t.fn.extend({getColumnsWidth:function(){$this=t(this).append("");var e,i=$this.find("span:last-of-type").position().left;return jQuery.browser.webkit?e="-webkit-":jQuery.browser.opera?e="-o-":jQuery.browser.mozilla?e="-moz-":jQuery.browser.msie&&(e="-ms-"),i+=parseInt($this.css(e+"column-width"),10),i-=parseInt($this.css(e+"column-gap"),10),t(this).find("span:last-of-type").remove(),i}})}(jQuery),function(t,e,i,n){"use strict";var r=["","webkit","moz","MS","ms","o"],o=e.createElement("div"),a="function",s=Math.round,l=Math.abs,c=Date.now;function u(t,e,i){return setTimeout(g(t,i),e)}function d(t,e,i){return!!Array.isArray(t)&&(h(t,i[e],i),!0)}function h(t,e,i){var r;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(r=0;r-1}function C(t){return t.trim().split(/\s+/g)}function S(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function E(t,e){for(var i,o,a=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=Q(e):1===o&&(i.firstMultiple=!1);var a=i.firstInput,s=i.firstMultiple,u=s?s.center:a.center,d=e.center=K(r);e.timeStamp=c(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=tt(u,d),e.distance=J(u,d),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==L&&o.eventType!==O||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y});e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=Z(e.deltaX,e.deltaY),e.scale=s?(h=s.pointers,f=r,J(f[0],f[1],V)/J(h[0],h[1],V)):1,e.rotation=s?function(t,e){return tt(e[1],e[0],V)-tt(t[1],t[0],V)}(s.pointers,r):0,function(t,e){var i,r,o,a,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(e.eventType!=P&&(c>D||s.velocity===n)){var u=s.deltaX-e.deltaX,d=s.deltaY-e.deltaY,h=function(t,e,i){return{x:e/t||0,y:i/t||0}}(c,u,d);r=h.x,o=h.y,i=l(h.x)>l(h.y)?h.x:h.y,a=Z(u,d),t.lastInterval=e}else i=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;e.velocity=i,e.velocityX=r,e.velocityY=o,e.direction=a}(i,e);var h,f;var p=t.element;b(e.srcEvent.target,p)&&(p=e.srcEvent.target);e.target=p}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Q(t){for(var e=[],i=0;i=l(e)?t>0?N:R:e>0?q:X}function J(t,e,i){i||(i=$);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function tt(t,e,i){i||(i=$);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}U.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(A(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(A(this.element),this.evWin,this.domHandler)}};var et={mousedown:L,mousemove:B,mouseup:O},it="mousedown",nt="mousemove mouseup";function rt(){this.evEl=it,this.evWin=nt,this.allow=!0,this.pressed=!1,U.apply(this,arguments)}m(rt,U,{handler:function(t){var e=et[t.type];e&L&&0===t.button&&(this.pressed=!0),e&B&&1!==t.which&&(e=O),this.pressed&&this.allow&&(e&O&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var ot={pointerdown:L,pointermove:B,pointerup:O,pointercancel:P,pointerout:P},at={2:"touch",3:"pen",4:"mouse",5:"kinect"},st="pointerdown",lt="pointermove pointerup pointercancel";function ct(){this.evEl=st,this.evWin=lt,U.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&(st="MSPointerDown",lt="MSPointerMove MSPointerUp MSPointerCancel"),m(ct,U,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),r=ot[n],o=at[t.pointerType]||t.pointerType,a="touch"==o,s=S(e,t.pointerId,"pointerId");r&L&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):r&(O|P)&&(i=!0),s<0||(e[s]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),i&&e.splice(s,1))}});var ut={touchstart:L,touchmove:B,touchend:O,touchcancel:P},dt="touchstart",ht="touchstart touchmove touchend touchcancel";function ft(){this.evTarget=dt,this.evWin=ht,this.started=!1,U.apply(this,arguments)}m(ft,U,{handler:function(t){var e=ut[t.type];if(e===L&&(this.started=!0),this.started){var i=function(t,e){var i=_(t.touches),n=_(t.changedTouches);e&(O|P)&&(i=k(i.concat(n),"identifier",!0));return[i,n]}.call(this,t,e);e&(O|P)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}}});var pt={touchstart:L,touchmove:B,touchend:O,touchcancel:P},mt="touchstart touchmove touchend touchcancel";function gt(){this.evTarget=mt,this.targetIds={},U.apply(this,arguments)}function vt(){U.apply(this,arguments);var t=g(this.handler,this);this.touch=new gt(this.manager,t),this.mouse=new rt(this.manager,t)}m(gt,U,{handler:function(t){var e=pt[t.type],i=function(t,e){var i=_(t.touches),n=this.targetIds;if(e&(L|B)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,o,a=_(t.changedTouches),s=[],l=this.target;if(o=i.filter(function(t){return b(t.target,l)}),e===L)for(r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(n){e.manager.emit(e.options.event+(n?function(t){if(t&zt)return"cancel";if(t&At)return"end";if(t&Ft)return"move";if(t&Et)return"start";return""}(i):""),t)}i=At&&n(!0)},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return Bt.prototype.attrTest.call(this,t)&&(this.state&Et||!(this.state&Et)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Dt(t.direction);e&&this.manager.emit(this.options.event+e,t),this._super.emit.call(this,t)}}),m(Pt,Bt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Tt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Et)},emit:function(t){if(this._super.emit.call(this,t),1!==t.scale){var e=t.scale<1?"in":"out";this.manager.emit(this.options.event+e,t)}}}),m(It,jt,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[xt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(O|P)&&!r)this.reset();else if(t.eventType&L)this.reset(),this._timer=u(function(){this.state=Mt,this.tryEmit()},e.time,this);else if(t.eventType&O)return Mt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Mt&&(t&&t.eventType&O?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}}),m(Nt,Bt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Tt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Et)}}),m(Rt,Bt,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:H|W,pointers:1},getTouchAction:function(){return Ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(H|W)?e=t.velocity:i&H?e=t.velocityX:i&W&&(e=t.velocityY),this._super.attrTest.call(this,t)&&i&t.direction&&t.distance>this.options.threshold&&l(e)>this.options.velocity&&t.eventType&O},emit:function(t){var e=Dt(t.direction);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),m(qt,jt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[bt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=r&&l-(i.data("appear-top-offset")||0)<=r+o.height()&&s+i.width()>=n&&s-(i.data("appear-left-offset")||0)<=n+o.width()},t.fn.extend({appear:function(o){var l=t.extend({},r,o||{}),c=this.selector||this;if(!i){var u=function(){n||(n=!0,setTimeout(s,l.interval))};t(window).scroll(u).resize(u),i=!0}return l.force_process&&setTimeout(s,l.interval),function(t){e.push(t),a.push()}(c),t(c)}}),t.extend({force_appear:function(){return!!i&&(s(),!0)}})}("undefined"!=typeof module?require("jquery"):jQuery),function(t,e){"use strict";t.support.cors=!0,t.fn.djax=function(e,i,n){if(!history.pushState)return t(this);var r=this,o=e,a=i&&i.length?i:[],s=n||t.fn.replaceWith;window.history.replaceState({url:window.location.href,title:t("title").text()},t("title").text(),window.location.href),r.clearDjaxing=function(){r.djaxing=!1},r.attachClick=function(e,i){var n=t(e),o=!1;return t.each(a,function(t,e){-1!==n.attr("href").indexOf(e)&&(o=!0),-1!==window.location.href.indexOf(e)&&(o=!0)}),t(e).is("[target^=_blank], [rel^=external]")&&(o=!0),o?t(e):(i.preventDefault(),r.djaxing?(setTimeout(r.clearDjaxing,1e3),t(e)):(t(window).trigger("djaxClick",[e]),r.reqUrl=n.attr("href"),r.triggered=!1,void r.navigate(n.attr("href"),!0)))},r.navigate=function(e,i){var n=t(o);r.djaxing=!0,t(window).trigger("djaxLoading",[{url:e}]);var a=function(a){if(e!==r.reqUrl)return r.navigate(r.reqUrl,!1),!0;var l=t(a),c=t(l).find(o);!0===i&&window.history.pushState({url:e,title:t(l).filter("title").text()},t(l).filter("title").text(),e),document.title=t(l).filter("title").text(),n.each(function(){var e="#"+t(this).attr("id"),i=c.filter(e),n=t(this);t("a",i).filter(function(){return this.hostname===location.hostname}).addClass("dJAX_internal").on("click",function(t){return r.attachClick(this,t)}),i.length?n.html()!==i.html()&&s.call(n,i):n.remove()}),t.each(c,function(){var e,i=t(this),n="#"+t(this).attr("id");t(n).length||((e=t(l).find(n).prev()).length?i.insertAfter("#"+e.attr("id")):i.prependTo("#"+i.parent().attr("id")),t("a",i).filter(function(){return this.hostname===location.hostname}).addClass("dJAX_internal").on("click",function(t){return r.attachClick(this,t)}))}),r.triggered||(t(window).trigger("djaxLoad",[{url:e,title:t(l).filter("title").text(),response:a}]),r.triggered=!0,r.djaxing=!1),t(window).trigger("djaxLoaded",[{url:e,title:t(l).filter("title").text(),response:a}])};t.ajax({url:e,success:function(t){a(t)},error:function(t,e,i){console.log("error",t,e,i),a(t.responseText)}})},t(this).find("a").filter(function(){return this.hostname===location.hostname}).addClass("dJAX_internal"),t(this).on("click",".dJAX_internal",function(t){if(this.hostname===location.hostname)return r.attachClick(this,t)}),t(window).bind("popstate",function(t){r.triggered=!1,t.originalEvent.state&&(r.reqUrl=t.originalEvent.state.url,r.navigate(t.originalEvent.state.url,!1))})}}(jQuery,window),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){"use strict";var e=!1,i=!1,n=0,r=2e3,o=0,a=t,s=document,l=window,c=a(l),u=[];var d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||!1,h=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||!1;if(d)l.cancelAnimationFrame||(h=function(t){});else{var f=0;d=function(t,e){var i=(new Date).getTime(),n=Math.max(0,16-(i-f)),r=l.setTimeout(function(){t(i+n)},n);return f=i+n,r},h=function(t){l.clearTimeout(t)}}var p,m,g,v=l.MutationObserver||l.WebKitMutationObserver||!1,y=Date.now||function(){return(new Date).getTime()},w={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:(m=s.currentScript||!!(p=s.getElementsByTagName("script")).length&&p[p.length-1],g=m?m.src.split("?")[0]:"",g.split("/").length>0?g.split("/").slice(0,-1).join("/")+"/":""),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},x=!1,b=function(t,f){var p=this;this.version="3.7.6",this.name="nicescroll",this.me=f;var m=a("body"),g=this.opt={doc:m,win:!1};if(a.extend(g,w),g.snapbackspeed=80,t)for(var b in g)void 0!==t[b]&&(g[b]=t[b]);if(g.disablemutationobserver&&(v=!1),this.doc=g.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(g.win?g.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==g.win,this.win=g.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=m,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=g.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==g.rtlmode){var C=this.win[0]==l?this.body:this.win,S=C.css("writing-mode")||C.css("-webkit-writing-mode")||C.css("-ms-writing-mode")||C.css("-moz-writing-mode");"horizontal-tb"==S||"lr-tb"==S||""===S?(this.isrtlmode="rtl"==C.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==S||"tb"==S||"tb-rl"==S||"rl-tb"==S,this.isvertical="vertical-rl"==S||"tb"==S||"tb-rl"==S)}else this.isrtlmode=!0===g.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==g.scrollbarid)this.id=g.scrollbarid;else do{this.id="ascrail"+r++}while(s.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=g.overflowx,this.overflowy=g.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=function(){if(x)return x;var t=s.createElement("DIV"),e=t.style,i=navigator.userAgent,n=navigator.platform,r={};return r.haspointerlock="pointerLockElement"in s||"webkitPointerLockElement"in s||"mozPointerLockElement"in s,r.isopera="opera"in l,r.isopera12=r.isopera&&"getUserMedia"in navigator,r.isoperamini="[object OperaMini]"===Object.prototype.toString.call(l.operamini),r.isie="all"in s&&"attachEvent"in t&&!r.isopera,r.isieold=r.isie&&!("msInterpolationMode"in e),r.isie7=r.isie&&!r.isieold&&(!("documentMode"in s)||7===s.documentMode),r.isie8=r.isie&&"documentMode"in s&&8===s.documentMode,r.isie9=r.isie&&"performance"in l&&9===s.documentMode,r.isie10=r.isie&&"performance"in l&&10===s.documentMode,r.isie11="msRequestFullscreen"in t&&s.documentMode>=11,r.ismsedge="msCredentials"in l,r.ismozilla="MozAppearance"in e,r.iswebkit=!r.ismsedge&&"WebkitAppearance"in e,r.ischrome=r.iswebkit&&"chrome"in l,r.ischrome38=r.ischrome&&"touchAction"in e,r.ischrome22=!r.ischrome38&&r.ischrome&&r.haspointerlock,r.ischrome26=!r.ischrome38&&r.ischrome&&"transition"in e,r.cantouch="ontouchstart"in s.documentElement||"ontouchstart"in l,r.hasw3ctouch=!!l.PointerEvent&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),r.hasmstouch=!r.hasw3ctouch&&(l.MSPointerEvent||!1),r.ismac=/^mac$/i.test(n),r.isios=r.cantouch&&/iphone|ipad|ipod/i.test(n),r.isios4=r.isios&&!("seal"in Object),r.isios7=r.isios&&"webkitHidden"in s,r.isios8=r.isios&&"hidden"in s,r.isios10=r.isios&&l.Proxy,r.isandroid=/android/i.test(i),r.haseventlistener="addEventListener"in t,r.trstyle=!1,r.hastransform=!1,r.hastranslate3d=!1,r.transitionstyle=!1,r.hastransition=!1,r.transitionend=!1,r.trstyle="transform",r.hastransform="transform"in e||function(){for(var t=["msTransform","webkitTransform","MozTransform","OTransform"],i=0,n=t.length;i=1?this.ed:this.st+this.df*e|0},update:function(t,e){return this.st=this.getNow(),this.ed=t,this.spd=e,this.ts=y(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},_.hastranslate3d&&_.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(t){if(!t){var e=E();if(e)return 16==e.length?-e[13]:-e[5];if(p.timerscroll&&p.timerscroll.bz)return p.timerscroll.bz.getNow()}return p.doc.translate.y},this.getScrollLeft=function(t){if(!t){var e=E();if(e)return 16==e.length?-e[12]:-e[4];if(p.timerscroll&&p.timerscroll.bh)return p.timerscroll.bh.getNow()}return p.doc.translate.x},this.notifyScrollEvent=function(t){var e=s.createEvent("UIEvents");e.initUIEvent("scroll",!1,!1,l,1),e.niceevent=!0,t.dispatchEvent(e)};var F=this.isrtlmode?1:-1;_.hastranslate3d&&g.enabletranslate3d?(this.setScrollTop=function(t,e){p.doc.translate.y=t,p.doc.translate.ty=-1*t+"px",p.doc.css(_.trstyle,"translate3d("+p.doc.translate.tx+","+p.doc.translate.ty+",0)"),e||p.notifyScrollEvent(p.win[0])},this.setScrollLeft=function(t,e){p.doc.translate.x=t,p.doc.translate.tx=t*F+"px",p.doc.css(_.trstyle,"translate3d("+p.doc.translate.tx+","+p.doc.translate.ty+",0)"),e||p.notifyScrollEvent(p.win[0])}):(this.setScrollTop=function(t,e){p.doc.translate.y=t,p.doc.translate.ty=-1*t+"px",p.doc.css(_.trstyle,"translate("+p.doc.translate.tx+","+p.doc.translate.ty+")"),e||p.notifyScrollEvent(p.win[0])},this.setScrollLeft=function(t,e){p.doc.translate.x=t,p.doc.translate.tx=t*F+"px",p.doc.css(_.trstyle,"translate("+p.doc.translate.tx+","+p.doc.translate.ty+")"),e||p.notifyScrollEvent(p.win[0])})}else this.getScrollTop=function(){return p.docscroll.scrollTop()},this.setScrollTop=function(t){p.docscroll.scrollTop(t)},this.getScrollLeft=function(){return p.hasreversehr?p.detected.ismozilla?p.page.maxw-Math.abs(p.docscroll.scrollLeft()):p.page.maxw-p.docscroll.scrollLeft():p.docscroll.scrollLeft()},this.setScrollLeft=function(t){return setTimeout(function(){if(p)return p.hasreversehr&&(t=p.detected.ismozilla?-(p.page.maxw-t):p.page.maxw-t),p.docscroll.scrollLeft(t)},1)};this.getTarget=function(t){return!!t&&(t.target?t.target:!!t.srcElement&&t.srcElement)},this.hasParent=function(t,e){if(!t)return!1;for(var i=t.target||t.srcElement||t||!1;i&&i.id!=e;)i=i.parentNode||!1;return!1!==i};var A={thin:1,medium:3,thick:5};function M(t,e,i){var n=t.css(e),r=parseFloat(n);if(isNaN(r)){var o=3==(r=A[n]||0)?i?p.win.outerHeight()-p.win.innerHeight():p.win.outerWidth()-p.win.innerWidth():1;return p.isie8&&r&&(r+=1),o?r:0}return r}this.getDocumentScrollOffset=function(){return{top:l.pageYOffset||s.documentElement.scrollTop,left:l.pageXOffset||s.documentElement.scrollLeft}},this.getOffset=function(){if(p.isfixed){var t=p.win.offset(),e=p.getDocumentScrollOffset();return t.top-=e.top,t.left-=e.left,t}var i=p.win.offset();if(!p.viewport)return i;var n=p.viewport.offset();return{top:i.top-n.top,left:i.left-n.left}},this.updateScrollBar=function(t){var e,i;if(p.ishwscroll)p.rail.css({height:p.win.innerHeight()-(g.railpadding.top+g.railpadding.bottom)}),p.railh&&p.railh.css({width:p.win.innerWidth()-(g.railpadding.left+g.railpadding.right)});else{var n=p.getOffset();if((e={top:n.top,left:n.left-(g.railpadding.left+g.railpadding.right)}).top+=M(p.win,"border-top-width",!0),e.left+=p.rail.align?p.win.outerWidth()-M(p.win,"border-right-width")-p.rail.width:M(p.win,"border-left-width"),(i=g.railoffset)&&(i.top&&(e.top+=i.top),i.left&&(e.left+=i.left)),p.railslocked||p.rail.css({top:e.top,left:e.left,height:(t?t.h:p.win.innerHeight())-(g.railpadding.top+g.railpadding.bottom)}),p.zoom&&p.zoom.css({top:e.top+1,left:1==p.rail.align?e.left-20:e.left+p.rail.width+4}),p.railh&&!p.railslocked){e={top:n.top,left:n.left},(i=g.railhoffset)&&(i.top&&(e.top+=i.top),i.left&&(e.left+=i.left));var r=p.railh.align?e.top+M(p.win,"border-top-width",!0)+p.win.innerHeight()-p.railh.height:e.top+M(p.win,"border-top-width",!0),o=e.left+M(p.win,"border-left-width");p.railh.css({top:r-(g.railpadding.top+g.railpadding.bottom),left:o,width:p.railh.width})}}},this.doRailClick=function(t,e,i){var n,r,o,a;p.railslocked||(p.cancelEvent(t),"pageY"in t||(t.pageX=t.clientX+s.documentElement.scrollLeft,t.pageY=t.clientY+s.documentElement.scrollTop),e?(n=i?p.doScrollLeft:p.doScrollTop,o=i?(t.pageX-p.railh.offset().left-p.cursorwidth/2)*p.scrollratio.x:(t.pageY-p.rail.offset().top-p.cursorheight/2)*p.scrollratio.y,p.unsynched("relativexy"),n(0|o)):(n=i?p.doScrollLeftBy:p.doScrollBy,o=i?p.scroll.x:p.scroll.y,a=i?t.pageX-p.railh.offset().left:t.pageY-p.rail.offset().top,r=i?p.view.w:p.view.h,n(o>=a?r:-r)))},p.newscrolly=p.newscrollx=0,p.hasanimationframe="requestAnimationFrame"in l,p.hascancelanimationframe="cancelAnimationFrame"in l,p.hasborderbox=!1,this.init=function(){if(p.saved.css=[],_.isoperamini)return!0;if(_.isandroid&&!("hidden"in s))return!0;g.emulatetouch=g.emulatetouch||g.touchbehavior,p.hasborderbox=l.getComputedStyle&&"border-box"===l.getComputedStyle(s.body)["box-sizing"];var t={"overflow-y":"hidden"};if((_.isie11||_.isie10)&&(t["-ms-overflow-style"]="none"),p.ishwscroll&&(this.doc.css(_.transitionstyle,_.prefixstyle+"transform 0ms ease-out"),_.transitionend&&p.bind(p.doc,_.transitionend,p.onScrollTransitionEnd,!1)),p.zindex="auto",p.ispage||"auto"!=g.zindex?p.zindex=g.zindex:p.zindex=function(){var t=p.win;if("zIndex"in t)return t.zIndex();for(;t.length>0;){if(9==t[0].nodeType)return!1;var e=t.css("zIndex");if(!isNaN(e)&&0!==e)return parseInt(e);t=t.parent()}return!1}()||"auto",!p.ispage&&"auto"!=p.zindex&&p.zindex>o&&(o=p.zindex),p.isie&&0===p.zindex&&"auto"==g.zindex&&(p.zindex="auto"),!p.ispage||!_.isieold){var r=p.docscroll;p.ispage&&(r=p.haswrapper?p.win:p.doc),p.css(r,t),p.ispage&&(_.isie11||_.isie)&&p.css(a("html"),t),!_.isios||p.ispage||p.haswrapper||p.css(m,{"-webkit-overflow-scrolling":"touch"});var u=a(s.createElement("div"));u.css({position:"relative",top:0,float:"right",width:g.cursorwidth,height:0,"background-color":g.cursorcolor,border:g.cursorborder,"background-clip":"padding-box","-webkit-border-radius":g.cursorborderradius,"-moz-border-radius":g.cursorborderradius,"border-radius":g.cursorborderradius}),u.addClass("nicescroll-cursors"),p.cursor=u;var d=a(s.createElement("div"));d.attr("id",p.id),d.addClass("nicescroll-rails nicescroll-rails-vr");var h,f,y=["left","right","top","bottom"];for(var w in y)f=y[w],(h=g.railpadding[f]||0)&&d.css("padding-"+f,h+"px");d.append(u),d.width=Math.max(parseFloat(g.cursorwidth),u.outerWidth()),d.css({width:d.width+"px",zIndex:p.zindex,background:g.background,cursor:"default"}),d.visibility=!0,d.scrollable=!0,d.align="left"==g.railalign?0:1,p.rail=d,p.rail.drag=!1;var x,b=!1;if(!g.boxzoom||p.ispage||_.isieold||(b=s.createElement("div"),p.bind(b,"click",p.doZoom),p.bind(b,"mouseenter",function(){p.zoom.css("opacity",g.cursoropacitymax)}),p.bind(b,"mouseleave",function(){p.zoom.css("opacity",g.cursoropacitymin)}),p.zoom=a(b),p.zoom.css({cursor:"pointer",zIndex:p.zindex,backgroundImage:"url("+g.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),g.dblclickzoom&&p.bind(p.win,"dblclick",p.doZoom),_.cantouch&&g.gesturezoom&&(p.ongesturezoom=function(t){return t.scale>1.5&&p.doZoomIn(t),t.scale<.8&&p.doZoomOut(t),p.cancelEvent(t)},p.bind(p.win,"gestureend",p.ongesturezoom))),p.railh=!1,g.horizrailenabled&&(p.css(r,{overflowX:"hidden"}),(u=a(s.createElement("div"))).css({position:"absolute",top:0,height:g.cursorwidth,width:0,backgroundColor:g.cursorcolor,border:g.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":g.cursorborderradius,"-moz-border-radius":g.cursorborderradius,"border-radius":g.cursorborderradius}),_.isieold&&u.css("overflow","hidden"),u.addClass("nicescroll-cursors"),p.cursorh=u,(x=a(s.createElement("div"))).attr("id",p.id+"-hr"),x.addClass("nicescroll-rails nicescroll-rails-hr"),x.height=Math.max(parseFloat(g.cursorwidth),u.outerHeight()),x.css({height:x.height+"px",zIndex:p.zindex,background:g.background}),x.append(u),x.visibility=!0,x.scrollable=!0,x.align="top"==g.railvalign?0:1,p.railh=x,p.railh.drag=!1),p.ispage)d.css({position:"fixed",top:0,height:"100%"}),d.css(d.align?{right:0}:{left:0}),p.body.append(d),p.railh&&(x.css({position:"fixed",left:0,width:"100%"}),x.css(x.align?{bottom:0}:{top:0}),p.body.append(x));else{if(p.ishwscroll){"static"==p.win.css("position")&&p.css(p.win,{position:"relative"});var C="HTML"==p.win[0].nodeName?p.body:p.win;a(C).scrollTop(0).scrollLeft(0),p.zoom&&(p.zoom.css({position:"absolute",top:1,right:0,"margin-right":d.width+4}),C.append(p.zoom)),d.css({position:"absolute",top:0}),d.css(d.align?{right:0}:{left:0}),C.append(d),x&&(x.css({position:"absolute",left:0,bottom:0}),x.css(x.align?{bottom:0}:{top:0}),C.append(x))}else{p.isfixed="fixed"==p.win.css("position");var S=p.isfixed?"fixed":"absolute";p.isfixed||(p.viewport=p.getViewport(p.win[0])),p.viewport&&(p.body=p.viewport,/fixed|absolute/.test(p.viewport.css("position"))||p.css(p.viewport,{position:"relative"})),d.css({position:S}),p.zoom&&p.zoom.css({position:S}),p.updateScrollBar(),p.body.append(d),p.zoom&&p.body.append(p.zoom),p.railh&&(x.css({position:S}),p.body.append(x))}_.isios&&p.css(p.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),g.disableoutline&&(_.isie&&p.win.attr("hideFocus","true"),_.iswebkit&&p.win.css("outline","none"))}if(!1===g.autohidemode?(p.autohidedom=!1,p.rail.css({opacity:g.cursoropacitymax}),p.railh&&p.railh.css({opacity:g.cursoropacitymax})):!0===g.autohidemode||"leave"===g.autohidemode?(p.autohidedom=a().add(p.rail),_.isie8&&(p.autohidedom=p.autohidedom.add(p.cursor)),p.railh&&(p.autohidedom=p.autohidedom.add(p.railh)),p.railh&&_.isie8&&(p.autohidedom=p.autohidedom.add(p.cursorh))):"scroll"==g.autohidemode?(p.autohidedom=a().add(p.rail),p.railh&&(p.autohidedom=p.autohidedom.add(p.railh))):"cursor"==g.autohidemode?(p.autohidedom=a().add(p.cursor),p.railh&&(p.autohidedom=p.autohidedom.add(p.cursorh))):"hidden"==g.autohidemode&&(p.autohidedom=!1,p.hide(),p.railslocked=!1),_.cantouch||p.istouchcapable||g.emulatetouch||_.hasmstouch){p.scrollmom=new T(p);p.ontouchstart=function(t){if(p.locked)return!1;if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!1;if(p.hasmoving=!1,p.scrollmom.timer&&(p.triggerScrollEnd(),p.scrollmom.stop()),!p.railslocked){var e=p.getTarget(t);if(e)if(/INPUT/i.test(e.nodeName)&&/range/i.test(e.type))return p.stopPropagation(t);var i="mousedown"===t.type;if(!("clientX"in t)&&"changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),p.forcescreen){var n=t;(t={original:t.original?t.original:t}).clientX=n.screenX,t.clientY=n.screenY}if(p.rail.drag={x:t.clientX,y:t.clientY,sx:p.scroll.x,sy:p.scroll.y,st:p.getScrollTop(),sl:p.getScrollLeft(),pt:2,dl:!1,tg:e},p.ispage||!g.directionlockdeadzone)p.rail.drag.dl="f";else{var r={w:c.width(),h:c.height()},o=p.getContentSize(),s=o.h-r.h,l=o.w-r.w;p.rail.scrollable&&!p.railh.scrollable?p.rail.drag.ck=s>0&&"v":!p.rail.scrollable&&p.railh.scrollable?p.rail.drag.ck=l>0&&"h":p.rail.drag.ck=!1}if(g.emulatetouch&&p.isiframe&&_.isie){var u=p.win.position();p.rail.drag.x+=u.left,p.rail.drag.y+=u.top}if(p.hasmoving=!1,p.lastmouseup=!1,p.scrollmom.reset(t.clientX,t.clientY),e&&i){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(e.nodeName))return _.hasmousecapture&&e.setCapture(),g.emulatetouch?(e.onclick&&!e._onclick&&(e._onclick=e.onclick,e.onclick=function(t){if(p.hasmoving)return!1;e._onclick.call(this,t)}),p.cancelEvent(t)):p.stopPropagation(t);/SUBMIT|CANCEL|BUTTON/i.test(a(e).attr("type"))&&(p.preventclick={tg:e,click:!1})}}},p.ontouchend=function(t){if(!p.rail.drag)return!0;if(2==p.rail.drag.pt){if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!1;p.rail.drag=!1;var e="mouseup"===t.type;if(p.hasmoving&&(p.scrollmom.doMomentum(),p.lastmouseup=!0,p.hideCursor(),_.hasmousecapture&&s.releaseCapture(),e))return p.cancelEvent(t)}else if(1==p.rail.drag.pt)return p.onmouseup(t)};var k=g.emulatetouch&&p.isiframe&&!_.hasmousecapture,E=.3*g.directionlockdeadzone|0;p.ontouchmove=function(t,e){if(!p.rail.drag)return!0;if(t.targetTouches&&g.preventmultitouchscrolling&&t.targetTouches.length>1)return!0;if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!0;if(2==p.rail.drag.pt){var i,n;if("changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),n=i=0,k&&!e){var r=p.win.position();n=-r.left,i=-r.top}var o=t.clientY+i,a=o-p.rail.drag.y,l=t.clientX+n,c=l-p.rail.drag.x,u=p.rail.drag.st-a;if(p.ishwscroll&&g.bouncescroll)u<0?u=Math.round(u/2):u>p.page.maxh&&(u=p.page.maxh+Math.round((u-p.page.maxh)/2));else if(u<0?(u=0,o=0):u>p.page.maxh&&(u=p.page.maxh,o=0),0===o&&!p.hasmoving)return p.ispage||(p.rail.drag=!1),!0;var d=p.getScrollLeft();if(p.railh&&p.railh.scrollable&&(d=p.isrtlmode?c-p.rail.drag.sl:p.rail.drag.sl-c,p.ishwscroll&&g.bouncescroll?d<0?d=Math.round(d/2):d>p.page.maxw&&(d=p.page.maxw+Math.round((d-p.page.maxw)/2)):(d<0&&(d=0,l=0),d>p.page.maxw&&(d=p.page.maxw,l=0))),!p.hasmoving){if(p.rail.drag.y===t.clientY&&p.rail.drag.x===t.clientX)return p.cancelEvent(t);var h=Math.abs(a),f=Math.abs(c),m=g.directionlockdeadzone;if(p.rail.drag.ck?"v"==p.rail.drag.ck?f>m&&h<=E?p.rail.drag=!1:h>m&&(p.rail.drag.dl="v"):"h"==p.rail.drag.ck&&(h>m&&f<=E?p.rail.drag=!1:f>m&&(p.rail.drag.dl="h")):h>m&&f>m?p.rail.drag.dl="f":h>m?p.rail.drag.dl=f>E?"f":"v":f>m&&(p.rail.drag.dl=h>E?"f":"h"),!p.rail.drag.dl)return p.cancelEvent(t);p.triggerScrollStart(t.clientX,t.clientY,0,0,0),p.hasmoving=!0}return p.preventclick&&!p.preventclick.click&&(p.preventclick.click=p.preventclick.tg.onclick||!1,p.preventclick.tg.onclick=p.onpreventclick),p.rail.drag.dl&&("v"==p.rail.drag.dl?d=p.rail.drag.sl:"h"==p.rail.drag.dl&&(u=p.rail.drag.st)),p.synched("touchmove",function(){p.rail.drag&&2==p.rail.drag.pt&&(p.prepareTransition&&p.resetTransition(),p.rail.scrollable&&p.setScrollTop(u),p.scrollmom.update(l,o),p.railh&&p.railh.scrollable?(p.setScrollLeft(d),p.showCursor(u,d)):p.showCursor(u),_.isie10&&s.selection.clear())}),p.cancelEvent(t)}return 1==p.rail.drag.pt?p.onmousemove(t):void 0},p.ontouchstartCursor=function(t,e){if(!p.rail.drag||3==p.rail.drag.pt){if(p.locked)return p.cancelEvent(t);p.cancelScroll(),p.rail.drag={x:t.touches[0].clientX,y:t.touches[0].clientY,sx:p.scroll.x,sy:p.scroll.y,pt:3,hr:!!e};var i=p.getTarget(t);return!p.ispage&&_.hasmousecapture&&i.setCapture(),p.isiframe&&!_.hasmousecapture&&(p.saved.csspointerevents=p.doc.css("pointer-events"),p.css(p.doc,{"pointer-events":"none"})),p.cancelEvent(t)}},p.ontouchendCursor=function(t){if(p.rail.drag){if(_.hasmousecapture&&s.releaseCapture(),p.isiframe&&!_.hasmousecapture&&p.doc.css("pointer-events",p.saved.csspointerevents),3!=p.rail.drag.pt)return;return p.rail.drag=!1,p.cancelEvent(t)}},p.ontouchmoveCursor=function(t){if(p.rail.drag){if(3!=p.rail.drag.pt)return;if(p.cursorfreezed=!0,p.rail.drag.hr){p.scroll.x=p.rail.drag.sx+(t.touches[0].clientX-p.rail.drag.x),p.scroll.x<0&&(p.scroll.x=0);var e=p.scrollvaluemaxw;p.scroll.x>e&&(p.scroll.x=e)}else{p.scroll.y=p.rail.drag.sy+(t.touches[0].clientY-p.rail.drag.y),p.scroll.y<0&&(p.scroll.y=0);var i=p.scrollvaluemax;p.scroll.y>i&&(p.scroll.y=i)}return p.synched("touchmove",function(){p.rail.drag&&3==p.rail.drag.pt&&(p.showCursor(),p.rail.drag.hr?p.doScrollLeft(Math.round(p.scroll.x*p.scrollratio.x),g.cursordragspeed):p.doScrollTop(Math.round(p.scroll.y*p.scrollratio.y),g.cursordragspeed))}),p.cancelEvent(t)}}}if(p.onmousedown=function(t,e){if(!p.rail.drag||1==p.rail.drag.pt){if(p.railslocked)return p.cancelEvent(t);p.cancelScroll(),p.rail.drag={x:t.clientX,y:t.clientY,sx:p.scroll.x,sy:p.scroll.y,pt:1,hr:e||!1};var i=p.getTarget(t);return _.hasmousecapture&&i.setCapture(),p.isiframe&&!_.hasmousecapture&&(p.saved.csspointerevents=p.doc.css("pointer-events"),p.css(p.doc,{"pointer-events":"none"})),p.hasmoving=!1,p.cancelEvent(t)}},p.onmouseup=function(t){if(p.rail.drag)return 1!=p.rail.drag.pt||(_.hasmousecapture&&s.releaseCapture(),p.isiframe&&!_.hasmousecapture&&p.doc.css("pointer-events",p.saved.csspointerevents),p.rail.drag=!1,p.cursorfreezed=!1,p.hasmoving&&p.triggerScrollEnd(),p.cancelEvent(t))},p.onmousemove=function(t){if(p.rail.drag){if(1!==p.rail.drag.pt)return;if(_.ischrome&&0===t.which)return p.onmouseup(t);if(p.cursorfreezed=!0,p.hasmoving||p.triggerScrollStart(t.clientX,t.clientY,0,0,0),p.hasmoving=!0,p.rail.drag.hr){p.scroll.x=p.rail.drag.sx+(t.clientX-p.rail.drag.x),p.scroll.x<0&&(p.scroll.x=0);var e=p.scrollvaluemaxw;p.scroll.x>e&&(p.scroll.x=e)}else{p.scroll.y=p.rail.drag.sy+(t.clientY-p.rail.drag.y),p.scroll.y<0&&(p.scroll.y=0);var i=p.scrollvaluemax;p.scroll.y>i&&(p.scroll.y=i)}return p.synched("mousemove",function(){p.cursorfreezed&&(p.showCursor(),p.rail.drag.hr?p.scrollLeft(Math.round(p.scroll.x*p.scrollratio.x)):p.scrollTop(Math.round(p.scroll.y*p.scrollratio.y)))}),p.cancelEvent(t)}p.checkarea=0},_.cantouch||g.emulatetouch)p.onpreventclick=function(t){if(p.preventclick)return p.preventclick.tg.onclick=p.preventclick.click,p.preventclick=!1,p.cancelEvent(t)},p.onclick=!_.isios&&function(t){return!p.lastmouseup||(p.lastmouseup=!1,p.cancelEvent(t))},g.grabcursorenabled&&_.cursorgrabvalue&&(p.css(p.ispage?p.doc:p.win,{cursor:_.cursorgrabvalue}),p.css(p.rail,{cursor:_.cursorgrabvalue}));else{var F=function(t){if(p.selectiondrag){if(t){var e=p.win.outerHeight(),i=t.pageY-p.selectiondrag.top;i>0&&i=e&&(i-=e),p.selectiondrag.df=i}if(0!==p.selectiondrag.df){var n=-2*p.selectiondrag.df/6|0;p.doScrollBy(n),p.debounced("doselectionscroll",function(){F()},50)}}};p.hasTextSelected="getSelection"in s?function(){return s.getSelection().rangeCount>0}:"selection"in s?function(){return"None"!=s.selection.type}:function(){return!1},p.onselectionstart=function(t){p.ispage||(p.selectiondrag=p.win.offset())},p.onselectionend=function(t){p.selectiondrag=!1},p.onselectiondrag=function(t){p.selectiondrag&&p.hasTextSelected()&&p.debounced("selectionscroll",function(){F(t)},250)}}if(_.hasw3ctouch?(p.css(p.ispage?a("html"):p.win,{"touch-action":"none"}),p.css(p.rail,{"touch-action":"none"}),p.css(p.cursor,{"touch-action":"none"}),p.bind(p.win,"pointerdown",p.ontouchstart),p.bind(s,"pointerup",p.ontouchend),p.delegate(s,"pointermove",p.ontouchmove)):_.hasmstouch?(p.css(p.ispage?a("html"):p.win,{"-ms-touch-action":"none"}),p.css(p.rail,{"-ms-touch-action":"none"}),p.css(p.cursor,{"-ms-touch-action":"none"}),p.bind(p.win,"MSPointerDown",p.ontouchstart),p.bind(s,"MSPointerUp",p.ontouchend),p.delegate(s,"MSPointerMove",p.ontouchmove),p.bind(p.cursor,"MSGestureHold",function(t){t.preventDefault()}),p.bind(p.cursor,"contextmenu",function(t){t.preventDefault()})):_.cantouch&&(p.bind(p.win,"touchstart",p.ontouchstart,!1,!0),p.bind(s,"touchend",p.ontouchend,!1,!0),p.bind(s,"touchcancel",p.ontouchend,!1,!0),p.delegate(s,"touchmove",p.ontouchmove,!1,!0)),g.emulatetouch&&(p.bind(p.win,"mousedown",p.ontouchstart,!1,!0),p.bind(s,"mouseup",p.ontouchend,!1,!0),p.bind(s,"mousemove",p.ontouchmove,!1,!0)),(g.cursordragontouch||!_.cantouch&&!g.emulatetouch)&&(p.rail.css({cursor:"default"}),p.railh&&p.railh.css({cursor:"default"}),p.jqbind(p.rail,"mouseenter",function(){if(!p.ispage&&!p.win.is(":visible"))return!1;p.canshowonmouseevent&&p.showCursor(),p.rail.active=!0}),p.jqbind(p.rail,"mouseleave",function(){p.rail.active=!1,p.rail.drag||p.hideCursor()}),g.sensitiverail&&(p.bind(p.rail,"click",function(t){p.doRailClick(t,!1,!1)}),p.bind(p.rail,"dblclick",function(t){p.doRailClick(t,!0,!1)}),p.bind(p.cursor,"click",function(t){p.cancelEvent(t)}),p.bind(p.cursor,"dblclick",function(t){p.cancelEvent(t)})),p.railh&&(p.jqbind(p.railh,"mouseenter",function(){if(!p.ispage&&!p.win.is(":visible"))return!1;p.canshowonmouseevent&&p.showCursor(),p.rail.active=!0}),p.jqbind(p.railh,"mouseleave",function(){p.rail.active=!1,p.rail.drag||p.hideCursor()}),g.sensitiverail&&(p.bind(p.railh,"click",function(t){p.doRailClick(t,!1,!0)}),p.bind(p.railh,"dblclick",function(t){p.doRailClick(t,!0,!0)}),p.bind(p.cursorh,"click",function(t){p.cancelEvent(t)}),p.bind(p.cursorh,"dblclick",function(t){p.cancelEvent(t)})))),g.cursordragontouch&&(this.istouchcapable||_.cantouch)&&(p.bind(p.cursor,"touchstart",p.ontouchstartCursor),p.bind(p.cursor,"touchmove",p.ontouchmoveCursor),p.bind(p.cursor,"touchend",p.ontouchendCursor),p.cursorh&&p.bind(p.cursorh,"touchstart",function(t){p.ontouchstartCursor(t,!0)}),p.cursorh&&p.bind(p.cursorh,"touchmove",p.ontouchmoveCursor),p.cursorh&&p.bind(p.cursorh,"touchend",p.ontouchendCursor)),g.emulatetouch||_.isandroid||_.isios?(p.bind(_.hasmousecapture?p.win:s,"mouseup",p.ontouchend),p.onclick&&p.bind(s,"click",p.onclick),g.cursordragontouch?(p.bind(p.cursor,"mousedown",p.onmousedown),p.bind(p.cursor,"mouseup",p.onmouseup),p.cursorh&&p.bind(p.cursorh,"mousedown",function(t){p.onmousedown(t,!0)}),p.cursorh&&p.bind(p.cursorh,"mouseup",p.onmouseup)):(p.bind(p.rail,"mousedown",function(t){t.preventDefault()}),p.railh&&p.bind(p.railh,"mousedown",function(t){t.preventDefault()}))):(p.bind(_.hasmousecapture?p.win:s,"mouseup",p.onmouseup),p.bind(s,"mousemove",p.onmousemove),p.onclick&&p.bind(s,"click",p.onclick),p.bind(p.cursor,"mousedown",p.onmousedown),p.bind(p.cursor,"mouseup",p.onmouseup),p.railh&&(p.bind(p.cursorh,"mousedown",function(t){p.onmousedown(t,!0)}),p.bind(p.cursorh,"mouseup",p.onmouseup)),!p.ispage&&g.enablescrollonselection&&(p.bind(p.win[0],"mousedown",p.onselectionstart),p.bind(s,"mouseup",p.onselectionend),p.bind(p.cursor,"mouseup",p.onselectionend),p.cursorh&&p.bind(p.cursorh,"mouseup",p.onselectionend),p.bind(s,"mousemove",p.onselectiondrag)),p.zoom&&(p.jqbind(p.zoom,"mouseenter",function(){p.canshowonmouseevent&&p.showCursor(),p.rail.active=!0}),p.jqbind(p.zoom,"mouseleave",function(){p.rail.active=!1,p.rail.drag||p.hideCursor()}))),g.enablemousewheel&&(p.isiframe||p.mousewheel(_.isie&&p.ispage?s:p.win,p.onmousewheel),p.mousewheel(p.rail,p.onmousewheel),p.railh&&p.mousewheel(p.railh,p.onmousewheelhr)),p.ispage||_.cantouch||/HTML|^BODY/.test(p.win[0].nodeName)||(p.win.attr("tabindex")||p.win.attr({tabindex:++n}),p.bind(p.win,"focus",function(t){e=p.getTarget(t).id||p.getTarget(t)||!1,p.hasfocus=!0,p.canshowonmouseevent&&p.noticeCursor()}),p.bind(p.win,"blur",function(t){e=!1,p.hasfocus=!1}),p.bind(p.win,"mouseenter",function(t){i=p.getTarget(t).id||p.getTarget(t)||!1,p.hasmousefocus=!0,p.canshowonmouseevent&&p.noticeCursor()}),p.bind(p.win,"mouseleave",function(t){i=!1,p.hasmousefocus=!1,p.rail.drag||p.hideCursor()})),p.onkeypress=function(t){if(p.railslocked&&0===p.page.maxh)return!0;t=t||l.event;var n=p.getTarget(t);if(n&&/INPUT|TEXTAREA|SELECT|OPTION/.test(n.nodeName)&&(!(n.getAttribute("type")||n.type||!1)||!/submit|button|cancel/i.tp))return!0;if(a(n).attr("contenteditable"))return!0;if(p.hasfocus||p.hasmousefocus&&!e||p.ispage&&!e&&!i){var r=t.keyCode;if(p.railslocked&&27!=r)return p.cancelEvent(t);var o=t.ctrlKey||!1,s=t.shiftKey||!1,c=!1;switch(r){case 38:case 63233:p.doScrollBy(72),c=!0;break;case 40:case 63235:p.doScrollBy(-72),c=!0;break;case 37:case 63232:p.railh&&(o?p.doScrollLeft(0):p.doScrollLeftBy(72),c=!0);break;case 39:case 63234:p.railh&&(o?p.doScrollLeft(p.page.maxw):p.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:p.doScrollBy(p.view.h),c=!0;break;case 34:case 63277:p.doScrollBy(-p.view.h),c=!0;break;case 36:case 63273:p.railh&&o?p.doScrollPos(0,0):p.doScrollTo(0),c=!0;break;case 35:case 63275:p.railh&&o?p.doScrollPos(p.page.maxw,p.page.maxh):p.doScrollTo(p.page.maxh),c=!0;break;case 32:g.spacebarenabled&&(s?p.doScrollBy(p.view.h):p.doScrollBy(-p.view.h),c=!0);break;case 27:p.zoomactive&&(p.doZoom(),c=!0)}if(c)return p.cancelEvent(t)}},g.enablekeyboard&&p.bind(s,_.isopera&&!_.isopera12?"keypress":"keydown",p.onkeypress),p.bind(s,"keydown",function(t){(t.ctrlKey||!1)&&(p.wheelprevented=!0)}),p.bind(s,"keyup",function(t){t.ctrlKey||!1||(p.wheelprevented=!1)}),p.bind(l,"blur",function(t){p.wheelprevented=!1}),p.bind(l,"resize",p.onscreenresize),p.bind(l,"orientationchange",p.onscreenresize),p.bind(l,"load",p.lazyResize),_.ischrome&&!p.ispage&&!p.haswrapper){var A=p.win.attr("style"),M=parseFloat(p.win.css("width"))+1;p.win.css("width",M),p.synched("chromefix",function(){p.win.attr("style",A)})}if(p.onAttributeChange=function(t){p.lazyResize(p.isieold?250:30)},g.enableobserver&&(p.isie11||!1===v||(p.observerbody=new v(function(t){if(t.forEach(function(t){if("attributes"==t.type)return m.hasClass("modal-open")&&m.hasClass("modal-dialog")&&!a.contains(a(".modal-dialog")[0],p.doc[0])?p.hide():p.show()}),p.me.clientWidth!=p.page.width||p.me.clientHeight!=p.page.height)return p.lazyResize(30)}),p.observerbody.observe(s.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!p.ispage&&!p.haswrapper)){var z=p.win[0];!1!==v?(p.observer=new v(function(t){t.forEach(p.onAttributeChange)}),p.observer.observe(z,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),p.observerremover=new v(function(t){t.forEach(function(t){if(t.removedNodes.length>0)for(var e in t.removedNodes)if(p&&t.removedNodes[e]===z)return p.remove()})}),p.observerremover.observe(z.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(p.bind(z,_.isie&&!_.isie9?"propertychange":"DOMAttrModified",p.onAttributeChange),_.isie9&&z.attachEvent("onpropertychange",p.onAttributeChange),p.bind(z,"DOMNodeRemoved",function(t){t.target===z&&p.remove()}))}!p.ispage&&g.boxzoom&&p.bind(l,"resize",p.resizeZoom),p.istextarea&&(p.bind(p.win,"keydown",p.lazyResize),p.bind(p.win,"mouseup",p.lazyResize)),p.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var j=function(){var e;p.iframexd=!1;try{(e="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(t){p.iframexd=!0,e=!1}if(p.iframexd)return"console"in l&&console.log("NiceScroll error: policy restriced iframe"),!0;if(p.forcescreen=!0,p.isiframe&&(p.iframe={doc:a(e),html:p.doc.contents().find("html")[0],body:p.doc.contents().find("body")[0]},p.getContentSize=function(){return{w:Math.max(p.iframe.html.scrollWidth,p.iframe.body.scrollWidth),h:Math.max(p.iframe.html.scrollHeight,p.iframe.body.scrollHeight)}},p.docscroll=a(p.iframe.body)),!_.isios&&g.iframeautoresize&&!p.isiframe){p.win.scrollTop(0),p.doc.height("");var i=Math.max(e.getElementsByTagName("html")[0].scrollHeight,e.body.scrollHeight);p.doc.height(i)}p.lazyResize(30),p.css(a(p.iframe.body),t),_.isios&&p.haswrapper&&p.css(a(e.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?p.bind(this.contentWindow,"scroll",p.onscroll):p.bind(e,"scroll",p.onscroll),g.enablemousewheel&&p.mousewheel(e,p.onmousewheel),g.enablekeyboard&&p.bind(e,_.isopera?"keypress":"keydown",p.onkeypress),_.cantouch?(p.bind(e,"touchstart",p.ontouchstart),p.bind(e,"touchmove",p.ontouchmove)):g.emulatetouch&&(p.bind(e,"mousedown",p.ontouchstart),p.bind(e,"mousemove",function(t){return p.ontouchmove(t,!0)}),g.grabcursorenabled&&_.cursorgrabvalue&&p.css(a(e.body),{cursor:_.cursorgrabvalue})),p.bind(e,"mouseup",p.ontouchend),p.zoom&&(g.dblclickzoom&&p.bind(e,"dblclick",p.doZoom),p.ongesturezoom&&p.bind(e,"gestureend",p.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){j.call(p.doc[0],!1)},500),p.bind(this.doc,"load",j)}},this.showCursor=function(t,e){if(p.cursortimeout&&(clearTimeout(p.cursortimeout),p.cursortimeout=0),p.rail){if(p.autohidedom&&(p.autohidedom.stop().css({opacity:g.cursoropacitymax}),p.cursoractive=!0),p.rail.drag&&1==p.rail.drag.pt||(void 0!==t&&!1!==t&&(p.scroll.y=t/p.scrollratio.y|0),void 0!==e&&(p.scroll.x=e/p.scrollratio.x|0)),p.cursor.css({height:p.cursorheight,top:p.scroll.y}),p.cursorh){var i=p.hasreversehr?p.scrollvaluemaxw-p.scroll.x:p.scroll.x;p.cursorh.css({width:p.cursorwidth,left:!p.rail.align&&p.rail.visibility?i+p.rail.width:i}),p.cursoractive=!0}p.zoom&&p.zoom.stop().css({opacity:g.cursoropacitymax})}},this.hideCursor=function(t){p.cursortimeout||p.rail&&p.autohidedom&&(p.hasmousefocus&&"leave"===g.autohidemode||(p.cursortimeout=setTimeout(function(){p.rail.active&&p.showonmouseevent||(p.autohidedom.stop().animate({opacity:g.cursoropacitymin}),p.zoom&&p.zoom.stop().animate({opacity:g.cursoropacitymin}),p.cursoractive=!1),p.cursortimeout=0},t||g.hidecursordelay)))},this.noticeCursor=function(t,e,i){p.showCursor(e,i),p.rail.active||p.hideCursor(t)},this.getContentSize=p.ispage?function(){return{w:Math.max(s.body.scrollWidth,s.documentElement.scrollWidth),h:Math.max(s.body.scrollHeight,s.documentElement.scrollHeight)}}:p.haswrapper?function(){return{w:p.doc[0].offsetWidth,h:p.doc[0].offsetHeight}}:function(){return{w:p.docscroll[0].scrollWidth,h:p.docscroll[0].scrollHeight}},this.onResize=function(t,e){if(!p||!p.win)return!1;var i=p.page.maxh,n=p.page.maxw,r=p.view.h,o=p.view.w;if(p.view={w:p.ispage?p.win.width():p.win[0].clientWidth,h:p.ispage?p.win.height():p.win[0].clientHeight},p.page=e||p.getContentSize(),p.page.maxh=Math.max(0,p.page.h-p.view.h),p.page.maxw=Math.max(0,p.page.w-p.view.w),p.page.maxh==i&&p.page.maxw==n&&p.view.w==o&&p.view.h==r){if(p.ispage)return p;var a=p.win.offset();if(p.lastposition){var s=p.lastposition;if(s.top==a.top&&s.left==a.left)return p}p.lastposition=a}return 0===p.page.maxh?(p.hideRail(),p.scrollvaluemax=0,p.scroll.y=0,p.scrollratio.y=0,p.cursorheight=0,p.setScrollTop(0),p.rail&&(p.rail.scrollable=!1)):(p.page.maxh-=g.railpadding.top+g.railpadding.bottom,p.rail.scrollable=!0),0===p.page.maxw?(p.hideRailHr(),p.scrollvaluemaxw=0,p.scroll.x=0,p.scrollratio.x=0,p.cursorwidth=0,p.setScrollLeft(0),p.railh&&(p.railh.scrollable=!1)):(p.page.maxw-=g.railpadding.left+g.railpadding.right,p.railh&&(p.railh.scrollable=g.horizrailenabled)),p.railslocked=p.locked||0===p.page.maxh&&0===p.page.maxw,p.railslocked?(p.ispage||p.updateScrollBar(p.view),!1):(p.hidden||(p.rail.visibility||p.showRail(),p.railh&&!p.railh.visibility&&p.showRailHr()),p.istextarea&&p.win.css("resize")&&"none"!=p.win.css("resize")&&(p.view.h-=20),p.cursorheight=Math.min(p.view.h,Math.round(p.view.h*(p.view.h/p.page.h))),p.cursorheight=g.cursorfixedheight?g.cursorfixedheight:Math.max(g.cursorminheight,p.cursorheight),p.cursorwidth=Math.min(p.view.w,Math.round(p.view.w*(p.view.w/p.page.w))),p.cursorwidth=g.cursorfixedheight?g.cursorfixedheight:Math.max(g.cursorminheight,p.cursorwidth),p.scrollvaluemax=p.view.h-p.cursorheight-(g.railpadding.top+g.railpadding.bottom),p.hasborderbox||(p.scrollvaluemax-=p.cursor[0].offsetHeight-p.cursor[0].clientHeight),p.railh&&(p.railh.width=p.page.maxh>0?p.view.w-p.rail.width:p.view.w,p.scrollvaluemaxw=p.railh.width-p.cursorwidth-(g.railpadding.left+g.railpadding.right)),p.ispage||p.updateScrollBar(p.view),p.scrollratio={x:p.page.maxw/p.scrollvaluemaxw,y:p.page.maxh/p.scrollvaluemax},p.getScrollTop()>p.page.maxh?p.doScrollTop(p.page.maxh):(p.scroll.y=p.getScrollTop()/p.scrollratio.y|0,p.scroll.x=p.getScrollLeft()/p.scrollratio.x|0,p.cursoractive&&p.noticeCursor()),p.scroll.y&&0===p.getScrollTop()&&p.doScrollTo(p.scroll.y*p.scrollratio.y|0),p)},this.resize=p.onResize;var z=0;function j(t,e,i,n){p._bind(t,e,function(n){var r={original:n=n||l.event,target:n.target||n.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==n.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return n.preventDefault?n.preventDefault():n.returnValue=!1,!1},stopImmediatePropagation:function(){n.stopImmediatePropagation?n.stopImmediatePropagation():n.cancelBubble=!0}};return"mousewheel"==e?(n.wheelDeltaX&&(r.deltaX=-.025*n.wheelDeltaX),n.wheelDeltaY&&(r.deltaY=-.025*n.wheelDeltaY),!r.deltaY&&!r.deltaX&&(r.deltaY=-.025*n.wheelDelta)):r.deltaY=n.detail,i.call(t,r)},n)}this.onscreenresize=function(t){clearTimeout(z);var e=!p.ispage&&!p.haswrapper;e&&p.hideRails(),z=setTimeout(function(){p&&(e&&p.showRails(),p.resize()),z=0},120)},this.lazyResize=function(t){return clearTimeout(z),t=isNaN(t)?240:t,z=setTimeout(function(){p&&p.resize(),z=0},t),p},this.jqbind=function(t,e,i){p.events.push({e:t,n:e,f:i,q:!0}),a(t).on(e,i)},this.mousewheel=function(t,e,i){var n="jquery"in t?t[0]:t;if("onwheel"in s.createElement("div"))p._bind(n,"wheel",e,i||!1);else{var r=void 0!==s.onmousewheel?"mousewheel":"DOMMouseScroll";j(n,r,e,i||!1),"DOMMouseScroll"==r&&j(n,"MozMousePixelScroll",e,i||!1)}};var D=!1;if(_.haseventlistener){try{var L=Object.defineProperty({},"passive",{get:function(){D=!0}});l.addEventListener("test",null,L)}catch(t){}this.stopPropagation=function(t){return!!t&&((t=t.original?t.original:t).stopPropagation(),!1)},this.cancelEvent=function(t){return t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),t.preventManipulation&&t.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},l.constructor.prototype.addEventListener=s.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(t,e,i){this.attachEvent("on"+t,e)},l.constructor.prototype.removeEventListener=s.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(t,e,i){this.detachEvent("on"+t,e)},this.cancelEvent=function(t){return(t=t||l.event)&&(t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1),!1},this.stopPropagation=function(t){return(t=t||l.event)&&(t.cancelBubble=!0),!1};this.delegate=function(t,e,i,n,r){var o=u[e]||!1;o||(o={a:[],l:[],f:function(t){for(var e=o.l,i=!1,n=e.length-1;n>=0;n--)if(!1===(i=e[n].call(t.target,t)))return!1;return i}},p.bind(t,e,o.f,n,r),u[e]=o),p.ispage?(o.a=[p.id].concat(o.a),o.l=[i].concat(o.l)):(o.a.push(p.id),o.l.push(i))},this.undelegate=function(t,e,i,n,r){var o=u[e]||!1;if(o&&o.l)for(var a=0,s=o.l.length;a0)return i;e=!!e.parentNode&&e.parentNode}return!1},this.triggerScrollStart=function(t,e,i,n,r){if(p.onscrollstart){var o={type:"scrollstart",current:{x:t,y:e},request:{x:i,y:n},end:{x:p.newscrollx,y:p.newscrolly},speed:r};p.onscrollstart.call(p,o)}},this.triggerScrollEnd=function(){if(p.onscrollend){var t=p.getScrollLeft(),e=p.getScrollTop(),i={type:"scrollend",current:{x:t,y:e},end:{x:t,y:e}};p.onscrollend.call(p,i)}};var B=0,O=0,P=0,I=1;function N(t,e,i,n){p.scrollrunning||(p.newscrolly=p.getScrollTop(),p.newscrollx=p.getScrollLeft(),P=y());var r=y()-P;if(P=y(),r>350?I=1:I+=(2-I)/10,e=e*I|0,t=t*I|0){if(n)if(t<0){if(p.getScrollLeft()>=p.page.maxw)return!0}else if(p.getScrollLeft()<=0)return!0;var o=t>0?1:-1;O!==o&&(p.scrollmom&&p.scrollmom.stop(),p.newscrollx=p.getScrollLeft(),O=o),p.lastdeltax-=t}if(e){if(function(){var t=p.getScrollTop();if(e<0){if(t>=p.page.maxh)return!0}else if(t<=0)return!0}()){if(g.nativeparentscrolling&&i&&!p.ispage&&!p.zoomactive)return!0;var a=p.view.h>>1;p.newscrolly<-a?(p.newscrolly=-a,e=-1):p.newscrolly>p.page.maxh+a?(p.newscrolly=p.page.maxh+a,e=1):e=0}var s=e>0?1:-1;B!==s&&(p.scrollmom&&p.scrollmom.stop(),p.newscrolly=p.getScrollTop(),B=s),p.lastdeltay-=e}(e||t)&&p.synched("relativexy",function(){var t=p.lastdeltay+p.newscrolly;p.lastdeltay=0;var e=p.lastdeltax+p.newscrollx;p.lastdeltax=0,p.rail.drag||p.doScrollPos(e,t)})}var R=!1;function q(t,e,i){var n,r;if(!i&&R)return!0;(0===t.deltaMode?(n=-t.deltaX*(g.mousescrollstep/54)|0,r=-t.deltaY*(g.mousescrollstep/54)|0):1===t.deltaMode&&(n=-t.deltaX*g.mousescrollstep*50/80|0,r=-t.deltaY*g.mousescrollstep*50/80|0),e&&g.oneaxismousemode&&0===n&&r)&&(n=r,r=0,i&&(n<0?p.getScrollLeft()>=p.page.maxw:p.getScrollLeft()<=0)&&(r=n,n=0));if(p.isrtlmode&&(n=-n),!N(n,r,i,!0))return R=!1,t.stopImmediatePropagation(),t.preventDefault();i&&(R=!0)}if(this.onmousewheel=function(t){if(p.wheelprevented||p.locked)return!1;if(p.railslocked)return p.debounced("checkunlock",p.resize,250),!1;if(p.rail.drag)return p.cancelEvent(t);if("auto"===g.oneaxismousemode&&0!==t.deltaX&&(g.oneaxismousemode=!1),g.oneaxismousemode&&0===t.deltaX&&!p.rail.scrollable)return!p.railh||!p.railh.scrollable||p.onmousewheelhr(t);var e=y(),i=!1;if(g.preservenativescrolling&&p.checkarea+600p.page.maxh&&(e=p.page.maxh+(e-p.page.maxh)/2|0),t<0?t=t/2|0:t>p.page.maxw&&(t=p.page.maxw+(t-p.page.maxw)/2|0)):(e<0?e=0:e>p.page.maxh&&(e=p.page.maxh),t<0?t=0:t>p.page.maxw&&(t=p.page.maxw)),p.scrollrunning&&t==p.newscrollx&&e==p.newscrolly)return!1;p.newscrolly=e,p.newscrollx=t;var o=p.getScrollTop(),a=p.getScrollLeft(),s={};s.x=t-a,s.y=e-o;var l=0|Math.sqrt(s.x*s.x+s.y*s.y),c=p.prepareTransition(l);p.scrollrunning||(p.scrollrunning=!0,p.triggerScrollStart(a,o,t,e,c),p.cursorupdate.start()),p.scrollendtrapped=!0,_.transitionend||(p.scrollendtrapped&&clearTimeout(p.scrollendtrapped),p.scrollendtrapped=setTimeout(p.onScrollTransitionEnd,c)),p.setScrollTop(p.newscrolly),p.setScrollLeft(p.newscrollx)},this.cancelScroll=function(){if(!p.scrollendtrapped)return!0;var t=p.getScrollTop(),e=p.getScrollLeft();return p.scrollrunning=!1,_.transitionend||clearTimeout(_.transitionend),p.scrollendtrapped=!1,p.resetTransition(),p.setScrollTop(t),p.railh&&p.setScrollLeft(e),p.timerscroll&&p.timerscroll.tm&&clearInterval(p.timerscroll.tm),p.timerscroll=!1,p.cursorfreezed=!1,p.cursorupdate.stop(),p.showCursor(t,e),p},this.onScrollTransitionEnd=function(){if(p.scrollendtrapped){var t=p.getScrollTop(),e=p.getScrollLeft();if(t<0?t=0:t>p.page.maxh&&(t=p.page.maxh),e<0?e=0:e>p.page.maxw&&(e=p.page.maxw),t!=p.newscrolly||e!=p.newscrollx)return p.doScrollPos(e,t,g.snapbackspeed);p.scrollrunning&&p.triggerScrollEnd(),p.scrollrunning=!1,p.scrollendtrapped=!1,p.resetTransition(),p.timerscroll=!1,p.setScrollTop(t),p.railh&&p.setScrollLeft(e),p.cursorupdate.stop(),p.noticeCursor(!1,t,e),p.cursorfreezed=!1}}}else this.doScrollLeft=function(t,e){var i=p.scrollrunning?p.newscrolly:p.getScrollTop();p.doScrollPos(t,i,e)},this.doScrollTop=function(t,e){var i=p.scrollrunning?p.newscrollx:p.getScrollLeft();p.doScrollPos(i,t,e)},this.doScrollPos=function(t,e,i){var n=p.getScrollTop(),r=p.getScrollLeft();((p.newscrolly-n)*(e-n)<0||(p.newscrollx-r)*(t-r)<0)&&p.cancelScroll();var o=!1;if(p.bouncescroll&&p.rail.visibility||(e<0?(e=0,o=!0):e>p.page.maxh&&(e=p.page.maxh,o=!0)),p.bouncescroll&&p.railh.visibility||(t<0?(t=0,o=!0):t>p.page.maxw&&(t=p.page.maxw,o=!0)),p.scrollrunning&&p.newscrolly===e&&p.newscrollx===t)return!0;p.newscrolly=e,p.newscrollx=t,p.dst={},p.dst.x=t-r,p.dst.y=e-n,p.dst.px=r,p.dst.py=n;var a=0|Math.sqrt(p.dst.x*p.dst.x+p.dst.y*p.dst.y),s=p.getTransitionSpeed(a);p.bzscroll={};var l=o?1:.58;p.bzscroll.x=new k(r,p.newscrollx,s,0,0,l,1),p.bzscroll.y=new k(n,p.newscrolly,s,0,0,l,1);y();var c=function(){if(p.scrollrunning){var t=p.bzscroll.y.getPos();p.setScrollLeft(p.bzscroll.x.getNow()),p.setScrollTop(p.bzscroll.y.getNow()),t<=1?p.timer=d(c):(p.scrollrunning=!1,p.timer=0,p.triggerScrollEnd())}};p.scrollrunning||(p.triggerScrollStart(r,n,t,e,s),p.scrollrunning=!0,p.timer=d(c))},this.cancelScroll=function(){return p.timer&&h(p.timer),p.timer=0,p.bzscroll=!1,p.scrollrunning=!1,p};else this.doScrollLeft=function(t,e){var i=p.getScrollTop();p.doScrollPos(t,i,e)},this.doScrollTop=function(t,e){var i=p.getScrollLeft();p.doScrollPos(i,t,e)},this.doScrollPos=function(t,e,i){var n=t>p.page.maxw?p.page.maxw:t;n<0&&(n=0);var r=e>p.page.maxh?p.page.maxh:e;r<0&&(r=0),p.synched("scroll",function(){p.setScrollTop(r),p.setScrollLeft(n)})},this.cancelScroll=function(){};this.doScrollBy=function(t,e){N(0,t)},this.doScrollLeftBy=function(t,e){N(t,0)},this.doScrollTo=function(t,e){var i=e?Math.round(t*p.scrollratio.y):t;i<0?i=0:i>p.page.maxh&&(i=p.page.maxh),p.cursorfreezed=!1,p.doScrollTop(t)},this.checkContentSize=function(){var t=p.getContentSize();t.h==p.page.h&&t.w==p.page.w||p.resize(!1,t)},p.onscroll=function(t){p.rail.drag||p.cursorfreezed||p.synched("scroll",function(){p.scroll.y=Math.round(p.getScrollTop()/p.scrollratio.y),p.railh&&(p.scroll.x=Math.round(p.getScrollLeft()/p.scrollratio.x)),p.noticeCursor()})},p.bind(p.docscroll,"scroll",p.onscroll),this.doZoomIn=function(t){if(!p.zoomactive){p.zoomactive=!0,p.zoomrestore={style:{}};var e=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],i=p.win[0].style;for(var n in e){var r=e[n];p.zoomrestore.style[r]=void 0!==i[r]?i[r]:""}p.zoomrestore.style.width=p.win.css("width"),p.zoomrestore.style.height=p.win.css("height"),p.zoomrestore.padding={w:p.win.outerWidth()-p.win.width(),h:p.win.outerHeight()-p.win.height()},_.isios4&&(p.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),p.win.css({position:_.isios4?"absolute":"fixed",top:0,left:0,zIndex:o+100,margin:0});var a=p.win.css("backgroundColor");return(""===a||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(a))&&p.win.css("backgroundColor","#fff"),p.rail.css({zIndex:o+101}),p.zoom.css({zIndex:o+102}),p.zoom.css("backgroundPosition","0 -18px"),p.resizeZoom(),p.onzoomin&&p.onzoomin.call(p),p.cancelEvent(t)}},this.doZoomOut=function(t){if(p.zoomactive)return p.zoomactive=!1,p.win.css("margin",""),p.win.css(p.zoomrestore.style),_.isios4&&c.scrollTop(p.zoomrestore.scrollTop),p.rail.css({"z-index":p.zindex}),p.zoom.css({"z-index":p.zindex}),p.zoomrestore=!1,p.zoom.css("backgroundPosition","0 0"),p.onResize(),p.onzoomout&&p.onzoomout.call(p),p.cancelEvent(t)},this.doZoom=function(t){return p.zoomactive?p.doZoomOut(t):p.doZoomIn(t)},this.resizeZoom=function(){if(p.zoomactive){var t=p.getScrollTop();p.win.css({width:c.width()-p.zoomrestore.padding.w+"px",height:c.height()-p.zoomrestore.padding.h+"px"}),p.onResize(),p.setScrollTop(Math.min(p.page.maxh,t))}},this.init(),a.nicescroll.push(this)},T=function(t){var e=this;this.nc=t,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(t,i){e.stop(),e.steptime=0,e.lasttime=y(),e.speedx=0,e.speedy=0,e.lastx=t,e.lasty=i,e.lastscrollx=-1,e.lastscrolly=-1},this.update=function(t,i){var n=y();e.steptime=n-e.lasttime,e.lasttime=n;var r=i-e.lasty,o=t-e.lastx,a=e.nc.getScrollTop()+r,s=e.nc.getScrollLeft()+o;e.snapx=s<0||s>e.nc.page.maxw,e.snapy=a<0||a>e.nc.page.maxh,e.speedx=o,e.speedy=r,e.lastx=t,e.lasty=i},this.stop=function(){e.nc.unsynched("domomentum2d"),e.timer&&clearTimeout(e.timer),e.timer=0,e.lastscrollx=-1,e.lastscrolly=-1},this.doSnapy=function(t,i){var n=!1;i<0?(i=0,n=!0):i>e.nc.page.maxh&&(i=e.nc.page.maxh,n=!0),t<0?(t=0,n=!0):t>e.nc.page.maxw&&(t=e.nc.page.maxw,n=!0),n?e.nc.doScrollPos(t,i,e.nc.opt.snapbackspeed):e.nc.triggerScrollEnd()},this.doMomentum=function(t){var i=y(),n=t?i+t:e.lasttime,r=e.nc.getScrollLeft(),o=e.nc.getScrollTop(),a=e.nc.page.maxh,s=e.nc.page.maxw;e.speedx=s>0?Math.min(60,e.speedx):0,e.speedy=a>0?Math.min(60,e.speedy):0;var l=n&&i-n<=60;(o<0||o>a||r<0||r>s)&&(l=!1);var c=!(!e.speedy||!l)&&e.speedy,u=!(!e.speedx||!l)&&e.speedx;if(c||u){var d=Math.max(16,e.steptime);if(d>50){var h=d/50;e.speedx*=h,e.speedy*=h,d=50}e.demulxy=0,e.lastscrollx=e.nc.getScrollLeft(),e.chkx=e.lastscrollx,e.lastscrolly=e.nc.getScrollTop(),e.chky=e.lastscrolly;var f=e.lastscrollx,p=e.lastscrolly,m=function(){var t=y()-i>600?.04:.02;e.speedx&&(f=Math.floor(e.lastscrollx-e.speedx*(1-e.demulxy)),e.lastscrollx=f,(f<0||f>s)&&(t=.1)),e.speedy&&(p=Math.floor(e.lastscrolly-e.speedy*(1-e.demulxy)),e.lastscrolly=p,(p<0||p>a)&&(t=.1)),e.demulxy=Math.min(1,e.demulxy+t),e.nc.synched("domomentum2d",function(){if(e.speedx){e.nc.getScrollLeft();e.chkx=f,e.nc.setScrollLeft(f)}if(e.speedy){e.nc.getScrollTop();e.chky=p,e.nc.setScrollTop(p)}e.timer||(e.nc.hideCursor(),e.doSnapy(f,p))}),e.demulxy<1?e.timer=setTimeout(m,d):(e.stop(),e.nc.hideCursor(),e.doSnapy(f,p))};m()}else e.doSnapy(e.nc.getScrollLeft(),e.nc.getScrollTop())}},C=t.fn.scrollTop;t.cssHooks.pageYOffset={get:function(t,e,i){var n=a.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.getScrollTop():C.call(t)},set:function(t,e){var i=a.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollTop(parseInt(e)):C.call(t,e),this}},t.fn.scrollTop=function(t){if(void 0===t){var e=this[0]&&a.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollTop():C.call(this)}return this.each(function(){var e=a.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(t)):C.call(a(this),t)})};var S=t.fn.scrollLeft;a.cssHooks.pageXOffset={get:function(t,e,i){var n=a.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.getScrollLeft():S.call(t)},set:function(t,e){var i=a.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollLeft(parseInt(e)):S.call(t,e),this}},t.fn.scrollLeft=function(t){if(void 0===t){var e=this[0]&&a.data(this[0],"__nicescroll")||!1;return e&&e.ishwscroll?e.getScrollLeft():S.call(this)}return this.each(function(){var e=a.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(t)):S.call(a(this),t)})};var _=function(t){var e=this;if(this.length=0,this.name="nicescrollarray",this.each=function(t){return a.each(e,t),e},this.push=function(t){e[e.length]=t,e.length++},this.eq=function(t){return e[t]},t)for(var i=0;i1?a(t,n):o,r.win=n}!("doc"in r)||"win"in r||(r.win=n);var s=n.data("__nicescroll")||!1;s||(r.doc=r.doc||n,s=new b(r,n),n.data("__nicescroll",s)),i.push(s)}),1===i.length?i[0]:i},l.NiceScroll={getjQuery:function(){return t}},a.nicescroll||(a.nicescroll=new _,a.nicescroll.options=w)}),function(t){"use strict";t.organicTabs=function(e,i){var n=this;n.$el=t(e),n.$nav=n.$el.find(".tabs__nav"),n.init=function(){n.options=t.extend({},t.organicTabs.defaultOptions,i);var e=n.$el.find(".tabs__content"),r=n.$el.find("a.current").attr("href").substring(1);e.height(n.$el.find("#"+r).height()),n.$nav.find("li > a").click(function(i){var r=n.$el.find("a.current").attr("href").substring(1),o=t(this),a=o.attr("href").substring(1);if(a!=r&&0==n.$el.find(":animated").length){n.$el.find("#"+r).css({opacity:0,"z-index":10,"pointer-events":"none"});var s=n.$el.find("#"+a).height();e.css({height:s}),setTimeout(function(){n.$el.find("#"+r),n.$el.find("#"+a).css({opacity:1,"z-index":100,"pointer-events":"auto"}),n.$el.find(".tabs__nav li a").removeClass("current"),o.addClass("current")},250)}i.preventDefault()})},n.init()},t.organicTabs.defaultOptions={speed:300},t.fn.organicTabs=function(e){return this.each(function(){new t.organicTabs(this,e)})}}(jQuery),Date.now||(Date.now=function(){return(new Date).getTime()}),function(){"use strict";for(var t=["webkit","moz"],e=0;e1)for(var a=0,l=i.length;a=1&&(delete n[a],s.s=1,o--,function(t){setTimeout(function(){e("mina.finish."+t.id,t)})}(s)),s.update()}i=!!o&&r(g)}else i||(i=r(g))},v=function(t,e,i,r,o,l,y){var w={id:s+(a++).toString(36),start:t,end:e,b:i,s:0,dur:r-i,spd:1,get:o,set:l,easing:y||v.linear,status:c,speed:u,duration:d,stop:h,pause:f,resume:p,update:m};n[w.id]=w;var x,b=0;for(x in n)if(n.hasOwnProperty(x)&&2==++b)break;return 1==b&&g(),w};return v.time=l,v.getById=function(t){return n[t]||null},v.linear=function(t){return t},v.easeout=function(t){return Math.pow(t,1.7)},v.easein=function(t){return Math.pow(t,.48)},v.easeinout=function(t){if(1==t)return 1;if(0==t)return 0;var e=.48-t/1.04,i=Math.sqrt(.1734+e*e),n=i-e,r=-i-e,o=Math.pow(Math.abs(n),1/3)*(n<0?-1:1)+Math.pow(Math.abs(r),1/3)*(r<0?-1:1)+.5;return 3*(1-o)*o*o+o*o*o},v.backin=function(t){if(1==t)return 1;var e=1.70158;return t*t*((e+1)*t-e)},v.backout=function(t){if(0==t)return 0;var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},v.elastic=function(t){return t==!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1},v.bounce=function(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},t.mina=v,v}(void 0===e?function(){}:e),n=function(t){function i(t,e){if(t){if(t.nodeType)return V(t);if(z(t,"array")&&i.set)return i.set.apply(i,t);if(t instanceof H)return t;if(null==e)try{return V(t=n.doc.querySelector(String(t)))}catch(t){return null}}return new $(t=null==t?"100%":t,e=null==e?"100%":e)}i.version="0.5.1",i.toString=function(){return"Snap v"+this.version},i._={};var n={win:t.window,doc:t.window.document};i._.glob=n;var r,o,a="hasOwnProperty",s=String,l=parseFloat,c=parseInt,u=Math,d=u.max,h=u.min,f=u.abs,p=(u.pow,u.PI),m=(u.round,""),v=Object.prototype.toString,y=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\))\s*$/i,w=(i._.separator=/[,\s]+/,/[\s]*,[\s]*/),x={hs:1,rg:1},b=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,T=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,C=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\s]*,?[\s]*/gi,S=0,_="S"+(+new Date).toString(36),k=function(t){return(t&&t.type?t.type:m)+_+(S++).toString(36)},E="http://www.w3.org/1999/xlink",F="http://www.w3.org/2000/svg",A={};i.url=function(t){return"url('#"+t+"')"};function M(t,e){if(e){if("#text"==t&&(t=n.doc.createTextNode(e.text||e["#text"]||"")),"#comment"==t&&(t=n.doc.createComment(e.text||e["#text"]||"")),"string"==typeof t&&(t=M(t)),"string"==typeof e)return 1==t.nodeType?"xlink:"==e.substring(0,6)?t.getAttributeNS(E,e.substring(6)):"xml:"==e.substring(0,4)?t.getAttributeNS(F,e.substring(4)):t.getAttribute(e):"text"==e?t.nodeValue:null;if(1==t.nodeType){for(var i in e)if(e[a](i)){var r=s(e[i]);r?"xlink:"==i.substring(0,6)?t.setAttributeNS(E,i.substring(6),r):"xml:"==i.substring(0,4)?t.setAttributeNS(F,i.substring(4),r):t.setAttribute(i,r):t.removeAttribute(i)}}else"text"in e&&(t.nodeValue=e.text)}else t=n.doc.createElementNS(F,t);return t}function z(t,e){return"finite"==(e=s.prototype.toLowerCase.call(e))?isFinite(t):!("array"!=e||!(t instanceof Array||Array.isArray&&Array.isArray(t)))||("null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||v.call(t).slice(8,-1).toLowerCase()==e)}function j(t,e,i){return function n(){var r=Array.prototype.slice.call(arguments,0),o=r.join("␀"),s=n.cache=n.cache||{},l=n.count=n.count||[];return s[a](o)?(function(t,e){for(var i=0,n=t.length;i=1e3&&delete s[l.shift()],l.push(o),s[o]=t.apply(e,r),i?i(s[o]):s[o])}}function D(t){return t%360*p/180}i._.$=M,i._.id=k,i.format=(r=/\{([^\}]+)\}/g,o=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(t,e){return s(t).replace(r,function(t,i){return function(t,e,i){var n=i;return e.replace(o,function(t,e,i,r,o){e=e||r,n&&(e in n&&(n=n[e]),"function"==typeof n&&o&&(n=n()))}),n=(null==n||n==i?t:n)+""}(t,i,e)})}),i._.clone=function t(e){if("function"==typeof e||Object(e)!==e)return e;var i=new e.constructor;for(var n in e)e[a](n)&&(i[n]=t(e[n]));return i},i._.cacher=j,i.rad=D,i.deg=function(t){return 180*t/p%360},i.sin=function(t){return u.sin(i.rad(t))},i.tan=function(t){return u.tan(i.rad(t))},i.cos=function(t){return u.cos(i.rad(t))},i.asin=function(t){return i.deg(u.asin(t))},i.acos=function(t){return i.deg(u.acos(t))},i.atan=function(t){return i.deg(u.atan(t))},i.atan2=function(t){return i.deg(u.atan2(t))},i.angle=function t(e,i,n,r,o,a){if(null==o){var s=e-n,l=i-r;return s||l?(180+180*u.atan2(-l,-s)/p+360)%360:0}return t(e,i,o,a)-t(n,r,o,a)},i.len=function(t,e,n,r){return Math.sqrt(i.len2(t,e,n,r))},i.len2=function(t,e,i,n){return(t-i)*(t-i)+(e-n)*(e-n)},i.closestPoint=function(t,e,i){function n(t){var n=t.x-e,r=t.y-i;return n*n+r*r}for(var r,o,a,s,l=t.node,c=l.getTotalLength(),u=c/l.pathSegList.numberOfItems*.125,d=1/0,h=0;h<=c;h+=u)(s=n(a=l.getPointAtLength(h))).5;){var f,p,m,g,v,y;(m=o-u)>=0&&(v=n(f=l.getPointAtLength(m)))t-i)return e-r+t}return e},i.getRGB=j(function(t){if(!t||(t=s(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:P};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:P};if(!x[a](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=L(t)),!t)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:P};var e,n,r,o,f,p,m=t.match(y);return m?(m[2]&&(r=c(m[2].substring(5),16),n=c(m[2].substring(3,5),16),e=c(m[2].substring(1,3),16)),m[3]&&(r=c((f=m[3].charAt(3))+f,16),n=c((f=m[3].charAt(2))+f,16),e=c((f=m[3].charAt(1))+f,16)),m[4]&&(p=m[4].split(w),e=l(p[0]),"%"==p[0].slice(-1)&&(e*=2.55),n=l(p[1]),"%"==p[1].slice(-1)&&(n*=2.55),r=l(p[2]),"%"==p[2].slice(-1)&&(r*=2.55),"rgba"==m[1].toLowerCase().slice(0,4)&&(o=l(p[3])),p[3]&&"%"==p[3].slice(-1)&&(o/=100)),m[5]?(p=m[5].split(w),e=l(p[0]),"%"==p[0].slice(-1)&&(e/=100),n=l(p[1]),"%"==p[1].slice(-1)&&(n/=100),r=l(p[2]),"%"==p[2].slice(-1)&&(r/=100),("deg"==p[0].slice(-3)||"°"==p[0].slice(-1))&&(e/=360),"hsba"==m[1].toLowerCase().slice(0,4)&&(o=l(p[3])),p[3]&&"%"==p[3].slice(-1)&&(o/=100),i.hsb2rgb(e,n,r,o)):m[6]?(p=m[6].split(w),e=l(p[0]),"%"==p[0].slice(-1)&&(e/=100),n=l(p[1]),"%"==p[1].slice(-1)&&(n/=100),r=l(p[2]),"%"==p[2].slice(-1)&&(r/=100),("deg"==p[0].slice(-3)||"°"==p[0].slice(-1))&&(e/=360),"hsla"==m[1].toLowerCase().slice(0,4)&&(o=l(p[3])),p[3]&&"%"==p[3].slice(-1)&&(o/=100),i.hsl2rgb(e,n,r,o)):(e=h(u.round(e),255),n=h(u.round(n),255),r=h(u.round(r),255),o=h(d(o,0),1),(m={r:e,g:n,b:r,toString:P}).hex="#"+(16777216|r|n<<8|e<<16).toString(16).slice(1),m.opacity=z(o,"finite")?o:1,m)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:P}},i),i.hsb=j(function(t,e,n){return i.hsb2rgb(t,e,n).hex}),i.hsl=j(function(t,e,n){return i.hsl2rgb(t,e,n).hex}),i.rgb=j(function(t,e,i,n){if(z(n,"finite")){var r=u.round;return"rgba("+[r(t),r(e),r(i),+n.toFixed(2)]+")"}return"#"+(16777216|i|e<<8|t<<16).toString(16).slice(1)});var L=function(t){var e=n.doc.getElementsByTagName("head")[0]||n.doc.getElementsByTagName("svg")[0],i="rgb(255, 0, 0)";return(L=j(function(t){if("red"==t.toLowerCase())return i;e.style.color=i,e.style.color=t;var r=n.doc.defaultView.getComputedStyle(e,m).getPropertyValue("color");return r==i?null:r}))(t)},B=function(){return"hsb("+[this.h,this.s,this.b]+")"},O=function(){return"hsl("+[this.h,this.s,this.l]+")"},P=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},I=function(t,e,n){if(null==e&&z(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,e=t.g,t=t.r),null==e&&z(t,string)){var r=i.getRGB(t);t=r.r,e=r.g,n=r.b}return(t>1||e>1||n>1)&&(t/=255,e/=255,n/=255),[t,e,n]},N=function(t,e,n,r){var o={r:t=u.round(255*t),g:e=u.round(255*e),b:n=u.round(255*n),opacity:z(r,"finite")?r:1,hex:i.rgb(t,e,n),toString:P};return z(r,"finite")&&(o.opacity=r),o};i.color=function(t){var e;return z(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=i.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):z(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=i.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):(z(t,"string")&&(t=i.getRGB(t)),z(t,"object")&&"r"in t&&"g"in t&&"b"in t&&!("error"in t)?(e=i.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=i.rgb2hsb(t),t.v=e.b):((t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1,t.error=1)),t.toString=P,t},i.hsb2rgb=function(t,e,i,n){var r,o,a,s,l;return z(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(i=t.b,e=t.s,n=t.o,t=t.h),s=(l=i*e)*(1-f((t=(t*=360)%360/60)%2-1)),r=o=a=i-l,N(r+=[l,s,0,0,s,l][t=~~t],o+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],n)},i.hsl2rgb=function(t,e,i,n){var r,o,a,s,l;return z(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(i=t.l,e=t.s,t=t.h),(t>1||e>1||i>1)&&(t/=360,e/=100,i/=100),s=(l=2*e*(i<.5?i:1-i))*(1-f((t=(t*=360)%360/60)%2-1)),r=o=a=i-l/2,N(r+=[l,s,0,0,s,l][t=~~t],o+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],n)},i.rgb2hsb=function(t,e,i){var n,r;return t=(i=I(t,e,i))[0],e=i[1],i=i[2],{h:((0==(r=(n=d(t,e,i))-h(t,e,i))?null:n==t?(e-i)/r:n==e?(i-t)/r+2:(t-e)/r+4)+360)%6*60/360,s:0==r?0:r/n,b:n,toString:B}},i.rgb2hsl=function(t,e,i){var n,r,o,a;return t=(i=I(t,e,i))[0],e=i[1],i=i[2],n=((r=d(t,e,i))+(o=h(t,e,i)))/2,{h:((0==(a=r-o)?null:r==t?(e-i)/a:r==e?(i-t)/a+2:(t-e)/a+4)+360)%6*60/360,s:0==a?0:n<.5?a/(2*n):a/(2-2*n),l:n,toString:O}},i.parsePathString=function(t){if(!t)return null;var e=i.path(t);if(e.arr)return i.path.clone(e.arr);var n={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},r=[];return z(t,"array")&&z(t[0],"array")&&(r=i.path.clone(t)),r.length||s(t).replace(b,function(t,e,i){var o=[],a=e.toLowerCase();if(i.replace(C,function(t,e){e&&o.push(+e)}),"m"==a&&o.length>2&&(r.push([e].concat(o.splice(0,2))),a="l",e="m"==e?"l":"L"),"o"==a&&1==o.length&&r.push([e,o[0]]),"r"==a)r.push([e].concat(o));else for(;o.length>=n[a]&&(r.push([e].concat(o.splice(0,n[a]))),n[a]););}),r.toString=i.path.toString,e.arr=i.path.clone(r),r};var R=i.parseTransformString=function(t){if(!t)return null;var e=[];return z(t,"array")&&z(t[0],"array")&&(e=i.path.clone(t)),e.length||s(t).replace(T,function(t,i,n){var r=[];i.toLowerCase();n.replace(C,function(t,e){e&&r.push(+e)}),e.push([i].concat(r))}),e.toString=i.path.toString,e};i._.svgTransform2string=function(t){var e=[];return t=t.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(t,i,n){return n=n.split(/\s*,\s*|\s+/),"rotate"==i&&1==n.length&&n.push(0,0),"scale"==i&&(n.length>2?n=n.slice(0,2):2==n.length&&n.push(0,0),1==n.length&&n.push(n[0],0,0)),"skewX"==i?e.push(["m",1,0,u.tan(D(n[0])),1,0,0]):"skewY"==i?e.push(["m",1,u.tan(D(n[0])),0,1,0,0]):e.push([i.charAt(0)].concat(n)),t}),e},i._.rgTransform=/^[a-z][\s]*-?\.?\d/i,i._.transform2matrix=function(t,e){var n=R(t),r=new i.Matrix;if(n)for(var o=0,a=n.length;o1))return e("snap.util.getattr."+t,n).firstDefined();var u={};u[t]=i,t=u}for(var d in t)t[a](d)&&e("snap.util.attr."+d,n,t[d]);return n},i.parse=function(t){var e=n.doc.createDocumentFragment(),i=!0,r=n.doc.createElement("div");if((t=s(t)).match(/^\s*<\s*svg(?:\s|>)/)||(t="",i=!1),r.innerHTML=t,t=r.getElementsByTagName("svg")[0])if(i)e=t;else for(;t.firstChild;)e.appendChild(t.firstChild);return new W(e)},i.fragment=function(){for(var t=Array.prototype.slice.call(arguments,0),e=n.doc.createDocumentFragment(),r=0,o=t.length;r"),r=0,o=n.length;r")}else t&&(e+="/>");return e}}s.data=function(t,n){var r=y[this.id]=y[this.id]||{};if(0==arguments.length)return e("snap.data.get."+this.id,this,r,null),r;if(1==arguments.length){if(i.is(t,"object")){for(var o in t)t[p](o)&&this.data(o,t[o]);return this}return e("snap.data.get."+this.id,this,r[t],t),r[t]}return r[t]=n,e("snap.data.set."+this.id,this,n,t),this},s.removeData=function(t){return null==t?y[this.id]={}:y[this.id]&&delete y[this.id][t],this},s.outerSVG=s.toString=w(1),s.innerSVG=w(),s.toDataURL=function(){if(t&&t.btoa){var e=this.getBBox(),n=i.format('',{x:+e.x.toFixed(3),y:+e.y.toFixed(3),width:+e.width.toFixed(3),height:+e.height.toFixed(3),contents:this.outerSVG()});return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))}},a.prototype.select=s.select,a.prototype.selectAll=s.selectAll}),n.plugin(function(t,n,r,o,a){var s=n.prototype,l=t.is,c=String,u="hasOwnProperty";function d(t,e,i){return function(n){var r=n.slice(t,e);return 1==r.length&&(r=r[0]),i?i(r):r}}var h=function(t,e,n,r){"function"!=typeof n||n.length||(r=n,n=i.linear),this.attr=t,this.dur=e,n&&(this.easing=n),r&&(this.callback=r)};t._.Animation=h,t.animation=function(t,e,i,n){return new h(t,e,i,n)},s.inAnim=function(){var t=[];for(var e in this.anims)this.anims[u](e)&&function(e){t.push({anim:new h(e._attrs,e.dur,e.easing,e._callback),mina:e,curStatus:e.status(),status:function(t){return e.status(t)},stop:function(){e.stop()}})}(this.anims[e]);return t},t.animate=function(t,n,r,o,a,s){"function"!=typeof a||a.length||(s=a,a=i.linear);var l=i.time(),c=i(t,n,l,l+o,i.time,r,a);return s&&e.once("mina.finish."+c.id,s),c},s.stop=function(){for(var t=this.inAnim(),e=0,i=t.length;e1&&(t=Array.prototype.slice.call(arguments,0));var e={};return l(t,"object")&&!l(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polyline",e)},s.polygon=function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments,0));var e={};return l(t,"object")&&!l(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polygon",e)},function(){var n=i._.$;function r(){return this.selectAll("stop")}function o(t,e){var r=n("stop"),o={offset:+e+"%"};t=i.color(t),o["stop-color"]=t.hex,t.opacity<1&&(o["stop-opacity"]=t.opacity),n(r,o);for(var a,s=this.stops(),l=0;le){this.node.insertBefore(r,s[l].node),a=!0;break}}return a||this.node.appendChild(r),this}function a(){if("linearGradient"==this.type){var t=n(this.node,"x1")||0,e=n(this.node,"x2")||1,r=n(this.node,"y1")||0,o=n(this.node,"y2")||0;return i._.box(t,r,math.abs(e-t),math.abs(o-r))}var a=this.node.cx||.5,s=this.node.cy||.5,l=this.node.r||0;return i._.box(a-l,s-l,2*l,2*l)}function l(t){var n=t,r=this.stops();if("string"==typeof t&&(n=e("snap.util.grad.parse",null,"l(0,0,0,1)"+t).firstDefined().stops),i.is(n,"array")){for(var o=0;o.01;)c=M(t,e,i,n,r,o,a,s,d+=(co){if(n&&!f.start){if(h+=["C"+r((d=x(s,l,c[1],c[2],c[3],c[4],c[5],c[6],o-p)).start.x),r(d.start.y),r(d.m.x),r(d.m.y),r(d.x),r(d.y)],a)return h;f.start=h,h=["M"+r(d.x),r(d.y)+"C"+r(d.n.x),r(d.n.y),r(d.end.x),r(d.end.y),r(c[5]),r(c[6])].join(),p+=u,s=+c[5],l=+c[6];continue}if(!i&&!n)return d=x(s,l,c[1],c[2],c[3],c[4],c[5],c[6],o-p)}p+=u,s=+c[5],l=+c[6]}h+=c.shift()+c}return f.end=h,d=i?p:n?f:_(s,l,c[0],c[1],c[2],c[3],c[4],c[5],1)},null,t._.clone)}var T=b(1),C=b(),S=b(0,1);function _(t,e,i,n,r,o,a,s,l){var c=1-l,h=p(c,3),f=p(c,2),m=l*l,g=m*l,v=t+2*l*(i-t)+m*(r-2*i+t),y=e+2*l*(n-e)+m*(o-2*n+e),w=i+2*l*(r-i)+m*(a-2*r+i),x=n+2*l*(o-n)+m*(s-2*o+n);return{x:h*t+3*f*l*i+3*c*l*l*r+g*a,y:h*e+3*f*l*n+3*c*l*l*o+g*s,m:{x:v,y:y},n:{x:w,y:x},start:{x:c*t+l*i,y:c*e+l*n},end:{x:c*r+l*a,y:c*o+l*s},alpha:90-180*u.atan2(v-w,y-x)/d}}function k(e,i,n,r,o,a,s,l){t.is(e,"array")||(e=[e,i,n,r,o,a,s,l]);var c=X.apply(null,e);return v(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)}function E(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height}function F(t,e){return t=v(t),E(e=v(e),t.x,t.y)||E(e,t.x2,t.y)||E(e,t.x,t.y2)||E(e,t.x2,t.y2)||E(t,e.x,e.y)||E(t,e.x2,e.y)||E(t,e.x,e.y2)||E(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}function A(t,e,i,n,r){return t*(t*(-3*e+9*i-9*n+3*r)+6*e-12*i+6*n)-3*e+3*i}function M(t,e,i,n,r,o,a,s,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var m=c*d[p]+c,g=A(m,t,i,r,a),v=A(m,e,n,o,s),y=g*g+v*v;f+=h[p]*u.sqrt(y)}return c*f}function z(t,e,i,n,r,o,a,s){if(!(f(t,i)f(r,a)||f(e,n)f(o,s))){var l=(t-i)*(o-s)-(e-n)*(r-a);if(l){var c=((t*n-e*i)*(r-a)-(t-i)*(r*s-o*a))/l,u=((t*n-e*i)*(o-s)-(e-n)*(r*s-o*a))/l,d=+c.toFixed(2),p=+u.toFixed(2);if(!(d<+h(t,i).toFixed(2)||d>+f(t,i).toFixed(2)||d<+h(r,a).toFixed(2)||d>+f(r,a).toFixed(2)||p<+h(e,n).toFixed(2)||p>+f(e,n).toFixed(2)||p<+h(o,s).toFixed(2)||p>+f(o,s).toFixed(2)))return{x:c,y:u}}}}function j(t,e,i){if(!F(k(t),k(e)))return i?0:[];for(var n=~~(M.apply(0,t)/8),r=~~(M.apply(0,e)/8),o=[],a=[],s={},l=i?0:[],c=0;c=0&&x<=1&&b>=0&&b<=1&&(i?l++:l.push({x:w.x,y:w.y,t1:x,t2:b}))}}return l}function D(t,e,i){t=H(t),e=H(e);for(var n,r,o,a,s,l,c,u,d,h,f=i?0:[],p=0,m=t.length;p180),0,s,e+i*Math.sin(-r*o)]];else l=[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]];return l.toString=y,l}var P=t._unit2px,I={path:function(t){return t.attr("path")},circle:function(t){var e=P(t);return O(e.cx,e.cy,e.r)},ellipse:function(t){var e=P(t);return O(e.cx||0,e.cy||0,e.rx,e.ry)},rect:function(t){var e=P(t);return B(e.x||0,e.y||0,e.width,e.height,e.rx,e.ry)},image:function(t){var e=P(t);return B(e.x||0,e.y||0,e.width,e.height)},line:function(t){return"M"+[t.attr("x1")||0,t.attr("y1")||0,t.attr("x2"),t.attr("y2")]},polyline:function(t){return"M"+t.attr("points")},polygon:function(t){return"M"+t.attr("points")+"z"},deflt:function(t){var e=t.node.getBBox();return B(e.x,e.y,e.width,e.height)}};function N(e){var i=g(e);if(i.abs)return w(i.abs);if(o(e,"array")&&o(e&&e[0],"array")||(e=t.parsePathString(e)),!e||!e.length)return[["M",0,0]];var n,r=[],a=0,s=0,l=0,c=0,u=0;"M"==e[0][0]&&(l=a=+e[0][1],c=s=+e[0][2],u++,r[0]=["M",a,s]);for(var d,h,f=3==e.length&&"M"==e[0][0]&&"R"==e[1][0].toUpperCase()&&"Z"==e[2][0].toUpperCase(),p=u,m=e.length;p1&&(r*=T=u.sqrt(T),o*=T);var C=r*r,S=o*o,_=(s==l?-1:1)*u.sqrt(m((C*S-C*b*b-S*x*x)/(C*b*b+S*x*x))),k=_*r*b/o+(i+c)/2,E=_*-o*x/r+(n+h)/2,F=u.asin(((n-E)/o).toFixed(9)),A=u.asin(((h-E)/o).toFixed(9));(F=iA&&(F-=2*d),!l&&A>F&&(A-=2*d)}var M=A-F;if(m(M)>g){var z=A,j=c,D=h;A=F+g*(l&&A>F?1:-1),y=e(c=k+r*u.cos(A),h=E+o*u.sin(A),r,o,a,0,l,j,D,[A,z,k,E])}M=A-F;var L=u.cos(F),B=u.sin(F),O=u.cos(A),P=u.sin(A),I=u.tan(M/4),N=4/3*r*I,R=4/3*o*I,q=[i,n],X=[i+N*B,n-R*L],H=[c+N*P,h-R*O],W=[c,h];if(X[0]=2*q[0]-X[0],X[1]=2*q[1]-X[1],f)return[X,H,W].concat(y);for(var Y=[],$=0,V=(y=[X,H,W].concat(y).join().split(",")).length;$7){t[e].shift();for(var i=t[e];i.length;)v[e]="A",o&&(y[e]="A"),t.splice(e++,0,["C"].concat(i.splice(0,6)));t.splice(e,1),C=f(r.length,o&&o.length||0)}},p=function(t,e,i,n,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",n.x,n.y]),i.bx=0,i.by=0,i.x=t[a][1],i.y=t[a][2],C=f(r.length,o&&o.length||0))},v=[],y=[],x="",b="",T=0,C=f(r.length,o&&o.length||0);Tn;n+=2){var o=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?o[3]={x:+t[0],y:+t[1]}:r-2==n&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?o[3]=o[2]:n||(o[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i}t.path=g,t.path.getTotalLength=T,t.path.getPointAtLength=C,t.path.getSubpath=function(t,e,i){if(this.getTotalLength(t)-i<1e-6)return S(t,e).end;var n=S(t,i,1);return e?S(n,e).end:n},r.getTotalLength=function(){if(this.node.getTotalLength)return this.node.getTotalLength()},r.getPointAtLength=function(t){return C(this.attr("d"),t)},r.getSubpath=function(e,i){return t.path.getSubpath(this.attr("d"),e,i)},t._.box=v,t.path.findDotsAtSegment=_,t.path.bezierBBox=k,t.path.isPointInsideBBox=E,t.closest=function(e,i,n,r){for(var o=100,a=v(e-o/2,i-o/2,o,o),s=[],l=n[0].hasOwnProperty("x")?function(t){return{x:n[t].x,y:n[t].y}}:function(t){return{x:n[t],y:r[t]}},c=0;o<=1e6&&!c;){for(var u=0,d=n.length;um&&(p=m,s[u].len=m,f=s[u])}return f}},t.path.isBBoxIntersect=F,t.path.intersection=function(t,e){return D(t,e)},t.path.intersectionNumber=function(t,e){return D(t,e,1)},t.path.isPointInside=function(t,e,i){var n=L(t);return E(n,e,i)&&D(t,[["M",e,i],["H",n.x2+10]],1)%2==1},t.path.getBBox=L,t.path.get=I,t.path.toRelative=function(e){var i=g(e),n=String.prototype.toLowerCase;if(i.rel)return w(i.rel);t.is(e,"array")&&t.is(e&&e[0],"array")||(e=t.parsePathString(e));var r=[],o=0,a=0,s=0,l=0,c=0;"M"==e[0][0]&&(s=o=e[0][1],l=a=e[0][2],c++,r.push(["M",o,a]));for(var u=c,d=e.length;u',{def:n})},t.filter.blur.toString=function(){return this()},t.filter.shadow=function(e,i,n,r,o){return null==o&&(null==r?(o=n,n=4,r="#000"):(o=r,r=n,n=4)),null==n&&(n=4),null==o&&(o=1),null==e&&(e=0,i=2),null==i&&(i=e),r=t.color(r),t.format('',{color:r,dx:e,dy:i,blur:n,opacity:o})},t.filter.shadow.toString=function(){return this()},t.filter.grayscale=function(e){return null==e&&(e=1),t.format('',{a:.2126+.7874*(1-e),b:.7152-.7152*(1-e),c:.0722-.0722*(1-e),d:.2126-.2126*(1-e),e:.7152+.2848*(1-e),f:.0722-.0722*(1-e),g:.2126-.2126*(1-e),h:.0722+.9278*(1-e)})},t.filter.grayscale.toString=function(){return this()},t.filter.sepia=function(e){return null==e&&(e=1),t.format('',{a:.393+.607*(1-e),b:.769-.769*(1-e),c:.189-.189*(1-e),d:.349-.349*(1-e),e:.686+.314*(1-e),f:.168-.168*(1-e),g:.272-.272*(1-e),h:.534-.534*(1-e),i:.131+.869*(1-e)})},t.filter.sepia.toString=function(){return this()},t.filter.saturate=function(e){return null==e&&(e=1),t.format('',{amount:1-e})},t.filter.saturate.toString=function(){return this()},t.filter.hueRotate=function(e){return e=e||0,t.format('',{angle:e})},t.filter.hueRotate.toString=function(){return this()},t.filter.invert=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:1-e})},t.filter.invert.toString=function(){return this()},t.filter.brightness=function(e){return null==e&&(e=1),t.format('',{amount:e})},t.filter.brightness.toString=function(){return this()},t.filter.contrast=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:.5-e/2})},t.filter.contrast.toString=function(){return this()}}),n.plugin(function(t,e,i,n,r){var o=t._.box,a=t.is,s=/^[^a-z]*([tbmlrc])/i,l=function(){return"T"+this.dx+","+this.dy};e.prototype.getAlign=function(t,e){null==e&&a(t,"string")&&(e=t,t=null);var i=(t=t||this.paper).getBBox?t.getBBox():o(t),n=this.getBBox(),r={};switch(e=(e=e&&e.match(s))?e[1].toLowerCase():"c"){case"t":r.dx=0,r.dy=i.y-n.y;break;case"b":r.dx=0,r.dy=i.y2-n.y2;break;case"m":r.dx=0,r.dy=i.cy-n.cy;break;case"l":r.dx=i.x-n.x,r.dy=0;break;case"r":r.dx=i.x2-n.x2,r.dy=0;break;default:r.dx=i.cx-n.cx,r.dy=0}return r.toString=l,r},e.prototype.align=function(t,e){return this.transform("..."+this.getAlign(t,e))}}),n.plugin(function(e,i,n,r){function o(t){t=t.split(/(?=#)/);var e=new String(t[5]);return e[50]=t[0],e[100]=t[1],e[200]=t[2],e[300]=t[3],e[400]=t[4],e[500]=t[5],e[600]=t[6],e[700]=t[7],e[800]=t[8],e[900]=t[9],t[10]&&(e.A100=t[10],e.A200=t[11],e.A400=t[12],e.A700=t[13]),e}e.mui={},e.flat={},e.mui.red=o("#ffebee#ffcdd2#ef9a9a#e57373#ef5350#f44336#e53935#d32f2f#c62828#b71c1c#ff8a80#ff5252#ff1744#d50000"),e.mui.pink=o("#FCE4EC#F8BBD0#F48FB1#F06292#EC407A#E91E63#D81B60#C2185B#AD1457#880E4F#FF80AB#FF4081#F50057#C51162"),e.mui.purple=o("#F3E5F5#E1BEE7#CE93D8#BA68C8#AB47BC#9C27B0#8E24AA#7B1FA2#6A1B9A#4A148C#EA80FC#E040FB#D500F9#AA00FF"),e.mui.deeppurple=o("#EDE7F6#D1C4E9#B39DDB#9575CD#7E57C2#673AB7#5E35B1#512DA8#4527A0#311B92#B388FF#7C4DFF#651FFF#6200EA"),e.mui.indigo=o("#E8EAF6#C5CAE9#9FA8DA#7986CB#5C6BC0#3F51B5#3949AB#303F9F#283593#1A237E#8C9EFF#536DFE#3D5AFE#304FFE"),e.mui.blue=o("#E3F2FD#BBDEFB#90CAF9#64B5F6#64B5F6#2196F3#1E88E5#1976D2#1565C0#0D47A1#82B1FF#448AFF#2979FF#2962FF"),e.mui.lightblue=o("#E1F5FE#B3E5FC#81D4FA#4FC3F7#29B6F6#03A9F4#039BE5#0288D1#0277BD#01579B#80D8FF#40C4FF#00B0FF#0091EA"),e.mui.cyan=o("#E0F7FA#B2EBF2#80DEEA#4DD0E1#26C6DA#00BCD4#00ACC1#0097A7#00838F#006064#84FFFF#18FFFF#00E5FF#00B8D4"),e.mui.teal=o("#E0F2F1#B2DFDB#80CBC4#4DB6AC#26A69A#009688#00897B#00796B#00695C#004D40#A7FFEB#64FFDA#1DE9B6#00BFA5"),e.mui.green=o("#E8F5E9#C8E6C9#A5D6A7#81C784#66BB6A#4CAF50#43A047#388E3C#2E7D32#1B5E20#B9F6CA#69F0AE#00E676#00C853"),e.mui.lightgreen=o("#F1F8E9#DCEDC8#C5E1A5#AED581#9CCC65#8BC34A#7CB342#689F38#558B2F#33691E#CCFF90#B2FF59#76FF03#64DD17"),e.mui.lime=o("#F9FBE7#F0F4C3#E6EE9C#DCE775#D4E157#CDDC39#C0CA33#AFB42B#9E9D24#827717#F4FF81#EEFF41#C6FF00#AEEA00"),e.mui.yellow=o("#FFFDE7#FFF9C4#FFF59D#FFF176#FFEE58#FFEB3B#FDD835#FBC02D#F9A825#F57F17#FFFF8D#FFFF00#FFEA00#FFD600"),e.mui.amber=o("#FFF8E1#FFECB3#FFE082#FFD54F#FFCA28#FFC107#FFB300#FFA000#FF8F00#FF6F00#FFE57F#FFD740#FFC400#FFAB00"),e.mui.orange=o("#FFF3E0#FFE0B2#FFCC80#FFB74D#FFA726#FF9800#FB8C00#F57C00#EF6C00#E65100#FFD180#FFAB40#FF9100#FF6D00"),e.mui.deeporange=o("#FBE9E7#FFCCBC#FFAB91#FF8A65#FF7043#FF5722#F4511E#E64A19#D84315#BF360C#FF9E80#FF6E40#FF3D00#DD2C00"),e.mui.brown=o("#EFEBE9#D7CCC8#BCAAA4#A1887F#8D6E63#795548#6D4C41#5D4037#4E342E#3E2723"),e.mui.grey=o("#FAFAFA#F5F5F5#EEEEEE#E0E0E0#BDBDBD#9E9E9E#757575#616161#424242#212121"),e.mui.bluegrey=o("#ECEFF1#CFD8DC#B0BEC5#90A4AE#78909C#607D8B#546E7A#455A64#37474F#263238"),e.flat.turquoise="#1abc9c",e.flat.greensea="#16a085",e.flat.sunflower="#f1c40f",e.flat.orange="#f39c12",e.flat.emerland="#2ecc71",e.flat.nephritis="#27ae60",e.flat.carrot="#e67e22",e.flat.pumpkin="#d35400",e.flat.peterriver="#3498db",e.flat.belizehole="#2980b9",e.flat.alizarin="#e74c3c",e.flat.pomegranate="#c0392b",e.flat.amethyst="#9b59b6",e.flat.wisteria="#8e44ad",e.flat.clouds="#ecf0f1",e.flat.silver="#bdc3c7",e.flat.wetasphalt="#34495e",e.flat.midnightblue="#2c3e50",e.flat.concrete="#95a5a6",e.flat.asbestos="#7f8c8d",e.importMUIColors=function(){for(var i in e.mui)e.mui.hasOwnProperty(i)&&(t[i]=e.mui[i])}}),n});var filmWidth,contentWidth,sidebarWidth,ua=navigator.userAgent.toLowerCase(),platform=navigator.platform.toLowerCase(),$window=jQuery(window),$document=jQuery(document),$html=jQuery("html"),$body=jQuery("body"),android_ancient=-1!==ua.indexOf("mozilla/5.0")&&-1!==ua.indexOf("android")&&-1!==ua.indexOf("applewebKit")&&-1===ua.indexOf("chrome"),apple=ua.match(/(iPad|iPhone|iPod|Macintosh)/i),webkit=-1!=ua.indexOf("webkit"),isiPhone=!1,isiPod=!1,isAndroidPhone=!1,android=!1,iOS=!1,isIE=!1,ieMobile=!1,isSafari=!1,isMac=!1,isWindows=!1,isiele10=!1,isiPad=!1,firefox=-1!=ua.indexOf("gecko"),safari=-1!=ua.indexOf("safari")&&-1==ua.indexOf("chrome"),is_small=jQuery(".js-nav-trigger").is(":visible"),windowHeight=$window.height(),windowWidth=$window.width(),documentHeight=$document.height(),myOrientation=windowWidth>windowHeight?"portrait":"landscape",latestKnownScrollY=window.scrollY,latestKnownScrollX=window.scrollX,latestKnownMouseX=0,latestKnownMouseY=0,latestDeviceAlpha=0,latestDeviceBeta=0,latestDeviceGamma=0,ticking=!1,horToVertScroll=!1,globalDebug=!1;!function(t,e){"use strict";var i,n=function(){var e,i,n,r;function o(){var o=e.find(".filmstrip__item").length;globalDebug&&console.log("Loading All Posts - AJAX Offset = "+o),n=!0;var a={action:"timber_load_next_posts",nonce:timber_ajax.nonce,offset:o,post_type:"post",posts_number:"all"};E(e.data("post_type"))||(a.post_type=e.data("post_type")),E(e.data("taxonomy"))?E(e.data("search"))||(a.search=e.data("search")):(a.taxonomy=e.data("taxonomy"),a.term_id=e.data("term_id")),t.post(timber_ajax.ajax_url,a,function(o){if(o.success){globalDebug&&console.log("Loaded all posts");var a=t(o.data.posts).filter(".filmstrip__item");globalDebug&&console.log("Adding new "+a.length+" items to the DOM"),t(".navigation").hide().remove(),a.imagesLoaded(function(){globalDebug&&console.log("MixItUp Filtering - Images Loaded"),e.mixItUp("append",a,{filter:r}),i=!1,n=!1,globalDebug&&console.log("MixItUp Filtering - Filter by "+r)})}else globalDebug&&console.log("MixItUp Filtering - There were no more posts to load - so filter please"),i=!1,n=!1,e.mixItUp("filter",r)})}function a(){var i=e.find(".filmstrip__item").length;globalDebug&&console.log("Loading More Posts - AJAX Offset = "+i),n=!0,t(".preloader").css("opacity",1);var r={action:"timber_load_next_posts",nonce:timber_ajax.nonce,post_type:"post",offset:i,posts_number:timber_ajax.posts_number};E(e.data("post_type"))||(r.post_type=e.data("post_type")),E(e.data("taxonomy"))?E(e.data("search"))||(r.search=e.data("search")):(r.taxonomy=e.data("taxonomy"),r.term_id=e.data("term_id")),t.post(timber_ajax.ajax_url,r,function(i){if(i.success){globalDebug&&console.log("Loaded next posts");var r=t(i.data.posts).filter(".filmstrip__item");globalDebug&&console.log("Adding new "+r.length+" items to the DOM"),r.imagesLoaded(function(){globalDebug&&console.log("MixItUp Filtering - Images Loaded"),e.mixItUp("append",r),isiele10&&s(),n=!1})}else globalDebug&&console.log("It seems that there are no more posts to load"),t(".navigation").fadeOut();t(".preloader").css("opacity",0)})}function s(){e.width((t(".filmstrip__item ").first().width()+50)*t(".filmstrip__item").length+100)}return{init:function(){if(e=t(".filmstrip"),windowWidth,windowHeight,i=!0,n=!1,r="",e.length&&e.children(".filmstrip__item").length){t(".navigation").hide(),isiele10&&s();var l="flex";isSafari&&(l="-webkit-flex"),t("html").hasClass("is--ie-le10")&&(l="block"),e.mixItUp({animation:{enable:!1},selectors:{filter:".no-real-selector-for-filtering",target:".filmstrip__item"},layout:{display:l},callbacks:{onMixEnd:function(t){isiele10&&s()}}}),t(".filter").on("click",".filter__item",function(){return r=t(this).data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==i?o():e.mixItUp("filter",r),!1}),t(".js-filter-mobile-journal").change(function(){return r=t(this).children(":selected").data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==i?o():e.mixItUp("filter",r),!1});var c=e.children(".filmstrip__item").last();windowWidth-(c.offset().left+c.width())>0&&a()}},loadAllPosts:o,loadNextPosts:a,maybeLoadNextPosts:function(){e.length&&!n&&e.children(".filmstrip__item").last().is(":appeared")&&a()},calcIeFilmstrip:s}}(),r=function(){var e,i,n,r,o,a,s,l,c,u,d,h,f;function p(t){var e=t.attr("width"),i=t.attr("height"),n=o/e,r=a/i,s=Math.max(n,r);t.width(s*e),t.height(s*i)}function m(e){switch(e.which){case 37:if(t(".slider--show_next").length>0||u.prev("div").length<=0)return;b(),k(),C(),e.preventDefault();break;case 39:if(u.next("div").length<=0)return;x(),S(),T(),e.preventDefault();break;default:return}}function g(){r.off("click",S),n.off("click",k),Modernizr.touchevents&&(e.add(".vertical-title").hammer().unbind("swipeleft"),e.add(".vertical-title").hammer().unbind("swiperight")),t(document).off("keydown",m)}function v(){f>70&&!t("html").is(".is--ie9, .is--ie-le10")&&(r.off("mouseenter").on("mouseenter",x),r.off("mouseleave").on("mouseleave",T)),r.on("click",S),f>70&&!t("html").is(".is--ie9, .is--ie-le10")&&(n.off("mouseenter").on("mouseenter",b),n.off("mouseleave").on("mouseleave",C)),n.on("click",k),Modernizr.touchevents&&(e.add(".vertical-title").hammer().bind("swipeleft",y),e.add(".vertical-title").hammer().bind("swiperight",w)),t(document).on("keydown",m)}function y(){S(),T()}function w(){k(),C()}function x(){TweenMax.to(h.find(".project-slide__image"),.4,{opacity:1,ease:Quint.easeOut}),TweenMax.to(h.add(".project-slide__content"),.4,{x:-60,ease:Back.easeOut},"-=.4"),TweenMax.to(h,.4,{width:160,ease:Back.easeOut},"-=.4"),TweenMax.to(r,.4,{x:-30,ease:Back.easeOut},"-=.4")}function b(){TweenMax.to(d.find(".project-slide__image"),.4,{opacity:1,ease:Quint.easeOut}),TweenMax.to(t(".project-slide__content"),.4,{x:60,ease:Back.easeOut}),TweenMax.to(d,.4,{width:160,ease:Back.easeOut}),TweenMax.to(n,.4,{x:30,ease:Back.easeOut})}function T(){TweenMax.to(h.find(".project-slide__image"),.4,{opacity:.6,ease:Quint.easeOut}),TweenMax.to(h.add(".project-slide__content"),.4,{x:0,ease:Quint.easeOut}),TweenMax.to(h,.4,{width:f,ease:Quint.easeOut}),TweenMax.to(t(".vertical-title.next"),.4,{x:0,ease:Quint.easeOut})}function C(){TweenMax.to(d.find(".project-slide__image"),.4,{opacity:.6,ease:Quint.easeOut}),TweenMax.to(d.add(t(".project-slide__content")),.4,{x:0,ease:Quint.easeOut}),TweenMax.to(d,.4,{width:f,ease:Quint.easeOut}),TweenMax.to(t(".vertical-title.prev"),.4,{x:0,ease:Quint.easeOut})}function S(){var i=function(){var i=new TimelineMax({paused:!0,onComplete:_});i.to(h.next().find(".project-slide__image"),0,{opacity:1,ease:Power1.easeOut}),i.to(e,.7,{x:"-="+f,ease:Quint.easeOut}),i.to(u,.7,{width:f,ease:Quint.easeOut},"-=.7"),i.to(h,.7,{width:o,left:"-="+(o-f),x:0,ease:Quint.easeOut},"-=.7"),f>70&&!t("html").is(".is--ie9, .is--ie-le10")?i.to(h.next(),.4,{width:160,x:-60,ease:Quint.easeOut},"-=.7"):(i.to(h.find(".project-slide__image"),.4,{opacity:1,ease:Power1.easeOut},"-=.4"),i.to(h.next().find(".project-slide__image"),.4,{opacity:.6,ease:Power1.easeOut},"-=.4"));return i.to(u.find(".project-slide__image"),.4,{opacity:.6,ease:Power1.easeOut},"-=.4"),i}();d=u,u=h,h=h.next(),g(),M(u),i.play(),F(1)}function _(){l.first().appendTo(e).css("left","+="+s),l=e.children(),z(),v()}function k(){var i=function(){var i=new TimelineMax({paused:!0,onComplete:E});i.to(d.prev().find(".project-slide__image"),0,{opacity:1,ease:Quint.easeOut}),i.to(e,.7,{x:"+="+f,ease:Quint.easeOut}),i.to(u,.7,{width:f,left:"+="+(o-f),ease:Quint.easeOut},"-=.7"),i.to(d,.7,{width:o,x:0,ease:Quint.easeOut},"-=.7"),t("html").is(".is--ie9, .is--ie-le10")||i.to(d.prev(),.4,{width:160,ease:Quint.easeOut},"-=.7");return i.to(u.find(".project-slide__image"),.4,{opacity:.6,ease:Quint.easeOut},"-=.4"),i}();h=u,u=d,d=d.prev(),g(),M(u),i.play(),F(-1)}function E(){l.last().prependTo(e).css("left","-="+s),l=e.children(),z(),v()}function F(e){var i=t(".rsNavSelected"),n=i.index();i.removeClass("rsNavSelected"),n+e==c?t(".rsBullet").eq(0).addClass("rsNavSelected"):n+e==-1?t(".rsBullet").eq(c-1).addClass("rsNavSelected"):t(".rsBullet").eq(n+e).addClass("rsNavSelected")}function A(){i.find(".portfolio_types").html(u.data("types")),i.find("a").attr("href",u.data("link")).attr("title",u.data("link-title")),u.find(".project-slide__image").css("opacity",1),TweenMax.fromTo(i.find(".project-slide__title h1"),.7,{y:"-100%"},{y:"0%",delay:.5,ease:Expo.easeInOut}),TweenMax.fromTo(i.find(".js-title-mask"),.7,{y:"100%"},{y:"0%",delay:.5,ease:Expo.easeInOut}),TweenMax.fromTo(i.find(".portfolio_types"),.3,{opacity:0},{opacity:1,delay:.9,ease:Quint.easeIn}),TweenMax.fromTo(i.find(".project-slide__text"),.4,{x:-10,opacity:0},{x:0,opacity:1,delay:1,ease:Quint.easeOut})}function M(e){var n=i.find(".project-slide__title h1"),r=i.clone(),o=r.find(".project-slide__title h1"),a=r.find(".portfolio_types"),s=e.data("title"),l=e.data("types"),c=e.data("link"),u=e.data("link-title"),d=t(".vertical-title.next span"),h=d.clone(),f=e.next().data("title"),p=t(".vertical-title.prev span"),m=p.clone(),g=e.prev().data("title"),v=new TimelineMax({paused:!0,onComplete:function(){p.remove(),d.remove(),i.remove(),i=r}});m.text(g),h.text(f),o.text(s),a.html(l),r.find("a").attr({href:c,title:u});var y=i.find(".portfolio_types").add(d).add(p),w=a.add(h).add(m);v.fromTo(y,.3,{opacity:1},{opacity:0,ease:Quint.easeIn}),v.fromTo(w,.3,{opacity:0},{opacity:1,ease:Quint.easeIn},"-=0.2"),v.fromTo(n,.3,{opacity:1},{opacity:0,ease:Quint.easeOut},"-=0.3"),v.fromTo(o,.5,{y:"-100%"},{y:"0%",ease:Expo.easeOut},"-=0.2"),v.fromTo(r.find(".js-title-mask"),.5,{y:"100%"},{y:"0%",ease:Expo.easeOut},"-=0.5"),i.find(".project-slide__text").css("opacity",0),h.insertAfter(d),m.insertAfter(p),r.insertAfter(i),v.play()}function z(){u.css("z-index",""),d.css("z-index",10).prev().css("z-index",20),h.css("z-index",10).next().css("z-index",20)}return{init:function(){if(void 0===(e=t(".projects-slider")).data("loaded")||!0!==e.data("loaded")){var m;if(i=t(".project-slide__content"),n=t(".vertical-title.prev"),r=t(".vertical-title.next"),r.add(n),o=e.width(),a=e.height(),s=0,l=e.children(),c=l.length,u=l.eq(0),f=r.width()-100,c<2)return e.css({opacity:1,margin:0}),void A();c<3&&(e.css({marginLeft:0}),o=e.width(),n.hide()),c<5&&(l.clone().appendTo(e),l=e.children()),l.not(u).width(f),e.imagesLoaded(function(){l.each(function(e,i){var n=t(i);0!=e?(s+=f,n.css("left",o+(e-1)*f)):s+=o,p(n.find("img"))}),TweenMax.to(e,.3,{opacity:1}),m=parseInt((l.length-1)/2,10),l.slice(-m).prependTo(e).each(function(e,i){t(i).css("left","-="+s)}),l=e.children(),d=u.prev(),h=u.next(),function(){for(var e=t(".projects-slider__bullets"),i=0;i');e.children().first().addClass("rsNavSelected")}(),z(),g(),v(),A()}),e.data("loaded",!0)}},onResize:function(){var i=e.width(),n=u.nextAll(),r=i-o;a=e.height(),s+=r,o=i,u.width(o),n.each(function(e,i){t(i).css("left","+="+r)}),l.each(function(e,i){p(t(i).find("img"))})}}}();i=function(t,e){var i;t.fn.hammer=function(i){return this.each(function(){!function(i,n){var r=t(i);r.data("hammer")||r.data("hammer",new e(r[0],n))}(this,i)})},e.Manager.prototype.emit=(i=e.Manager.prototype.emit,function(e,n){i.call(this,e,n),t(this.element).trigger({type:e,gesture:n})})},"function"==typeof define&&define.amd?define(["jquery","hammerjs"],i):"object"==typeof exports?i(require("jquery"),require("hammerjs")):i(jQuery,Hammer);var o=function(){var e,i=t(".mobile-header");function n(t){t.preventDefault(),e?a():o()}function r(){t(".js-nav-toggle").css({marginTop:i.outerHeight()/2})}function o(){$body.addClass("navigation--is-visible"),e=!0}function a(){$body.removeClass("navigation--is-visible"),e=!1}return{init:function(){e=!1,r(),t(".js-nav-toggle").off("click",n).on("click",n)},onResize:r,open:o,close:a}}(),a=function(){var e;function i(){e.each(function(e,i){var n=t(i),r=n.data("image"),o=n.data("src");void 0===o&&(o=n.data("srcsmall")),n.data("loaded")||function(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);var e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return e.top<=1.5*i&&e.left<=1.5*n&&e.bottom>=-.5*i&&e.right>=-.5*n}(n)&&(n.data("loaded",!0),r.attr("src",o),r.prependTo(n),r.imagesLoaded(function(){TweenMax.to(r,.3,{opacity:1}),n.addClass("js-loaded")}))})}return{update:function(n,r){n=n||t("body"),(e=n.find(".js-placeholder")).each(function(e,i){t(i)}),e.each(function(e,i){var n=t(i).data("loaded",!1),r=n.data("width"),o=n.data("height"),a=n.height(),s=Math.round(a*r/o),l=t(document.createElement("img")).css("opacity",0);n.data("newHeight",a),n.data("newWidth",s),n.data("image",l)}),e.each(function(e,i){var n=t(i);n.width(n.data("newWidth"))}),t(window).on("DOMContentLoaded load resize scroll",i),t(".portfolio--grid, .site-content").on("scroll",i),i()},resize:function(){e.each(function(e,i){var n=t(i),r=n.data("width"),o=n.data("height"),a=n.height(),s=Math.round(a*r/o);n.data("newWidth",s)}),e.each(function(e,i){var n=t(i);n.width(n.data("newWidth"))})}}}();function s(){var e=navigator.userAgent.toLowerCase(),i=navigator.platform.toLowerCase();isiPhone=i.indexOf("iphone"),isiPod=i.indexOf("ipod"),isAndroidPhone=i.indexOf("android"),isSafari=-1!=e.indexOf("safari")&&-1==e.indexOf("chrome"),isIE="undefined"!=typeof is_ie||!window.ActiveXObject&&"ActiveXObject"in window,isiele10=ua.match(/msie (9|([1-9][0-9]))/i),ieMobile=!!ua.match(/Windows Phone/i),iOS=function(t){return t=t||navigator.userAgent,parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(t)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||!1}(),android=function(t){var e;return!!(e=(t=t||navigator.userAgent).match(/[A|a]ndroid\s([0-9\.]*)/))&&e[1]}(),isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,isWindows=-1!==navigator.platform.toUpperCase().indexOf("WIN"),isiPad=null!=navigator.userAgent.match(/iPad/i),iOS&&iOS<8&&$html.addClass("no-scroll-fx"),function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}()&&$html.addClass("is--ie"),isiele10&&$html.addClass("is--ie-le10"),ieMobile&&$html.addClass("is--ie-mobile"),isiPad&&$html.addClass("is--ipad");var n=function(){return-1!=navigator.appVersion.indexOf("MSIE")},r=(navigator.appVersion,function(){var t=999;return-1!=navigator.appVersion.indexOf("MSIE")&&(t=parseFloat(navigator.appVersion.split("MSIE")[1])),t});n()&&9==r()&&t("html").addClass("is--ie9")}var l,c,u,d,h,f,p,m=(d=!1,h=function(){t(".site-content.portfolio-archive").on("scroll",function(){requestTick()}),t(".js-projects-filter").on("click",".filter__item",function(){return c=t(this).data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==u?f():l.mixItUp("filter",c),!1}),t(".js-filter-mobile-portfolio").change(function(){return c=t(this).children(":selected").data("filter"),t(".filter__item").removeClass("active"),t(this).addClass("active"),1==u?f():l.mixItUp("filter",c),!1})},{init:function(){if(l=t(".portfolio-wrapper"),c="*",u=!0,d=!1,l.length){t(".navigation").hide();var e="flex";isSafari&&(e="-webkit-flex"),t("html").hasClass("is--ie")&&(e="block"),l.mixItUp({animation:{effects:"fade"},selectors:{filter:".no-real-selector-for-filtering",target:".portfolio--project"},layout:{display:e},callbacks:{onMixEnd:function(t){isiele10&&calcIEFilmstrip()}}}),h(),l.children("article").last().offset().top").addClass("fullview__image"),m=t(document.createElement("img"));return s=r*f,l=o*f,F(e),p.css({width:s,height:l,top:(l-c)/-2,left:(s-a)/-2}),n.append(p),i?e.find("iframe").clone().prependTo(p):m.attr("src",e.data("srcfull")).prependTo(p),p}function C(e){if(void 0===e||!t(e.target).is(".js-thumbs, .js-plus, .js-minus")){var i=t(this),r=T(i);t(".button-full").css("opacity",0),i.addClass("hide-meta"),latestDeviceAlpha,c=latestDeviceBeta,u=latestDeviceGamma,k(i,r),"fit"===d?n.css("backgroundColor","#222222"):Modernizr.touchevents?(t(window).on("deviceorientation",S),$document.on("mousemove",S)):setTimeout(function(){TweenMax.to(t(".fullview__image img"),.5,{x:(windowWidth/2-latestKnownMouseX)*(s-windowWidth)/windowWidth,y:(windowHeight/2-latestKnownMouseY)*(l-windowHeight)/windowHeight,ease:Back.easeOut,onComplete:function(){$document.on("mousemove",S),t(window).on("deviceorientation",S),F(i)}})},500),n.addClass("fullview--visible")}}function S(){t(".fullview__image img").each(function(e,i){var n=t(i),r=n.width(),o=n.height();if(Modernizr.touchevents){var a,s,l=c-latestDeviceBeta,d=u-latestDeviceGamma;a=d=d<-30?-30:d>30?30:d,s=l=l<-30?-30:l>30?30:l,windowWidth>windowHeight&&(a=-l,s=-d),r>windowWidth&&TweenMax.to(n,0,{x:a/60*(r-windowWidth)}),o>windowHeight&&TweenMax.to(n,0,{y:s/60*(o-windowHeight)})}else r>windowWidth&&TweenMax.to(n,0,{x:(windowWidth/2-latestKnownMouseX)*(r-windowWidth)/windowWidth}),o>windowHeight&&TweenMax.to(n,0,{y:(windowHeight/2-latestKnownMouseY)*(o-windowHeight)/windowHeight})})}function _(e){var i=t(".fullview__image"),r=t(".portfolio__item--active").addClass("hide-meta"),o=r.is(".portfolio__item--video");function a(){k(i,r,{},function(){t(".site-content").removeClass("site-content--fullview"),t(".button-full").css("opacity",1),r.removeClass("hide-meta")}),setTimeout(function(){n.removeClass("fullview--visible"),i.remove()},10)}void 0!==e&&(e.stopPropagation(),e.preventDefault()),r.children().not(".jetpack-video-wrapper").add(r).addClass("no-transition").css("opacity",0),setTimeout(function(){r.children().add(r).removeClass("no-transition")},10),"fit"==d&&n.css("backgroundColor","transparent"),$document.off("mousemove",S),t(window).off("deviceorientation",S),F(r),b(r),t(".site-content").addClass("site-content--fullview"),o?a():"fill"===d?TweenMax.to(t(".fullview__image img"),.2,{x:0,y:0,onComplete:a}):(n.css("backgroundColor","transparent"),setTimeout(function(){a()},200))}function k(e,i,n,r,o){var a=e.offset(),s=e.width(),l=e.height(),c=i.offset(),u=i.width(),d=i.height(),h=e.clone().addClass("portfolio__item--clone");o=void 0===o||o,h.css({position:"absolute",top:a.top-c.top,left:a.left-c.left,width:s,height:l,background:"none"}),i.css({position:"relative",transition:"none","z-index":"10000",opacity:1,background:"none"}),h.css("opacity",1),h.find("img").css("opacity",1),i.find("img").css("opacity",0);var f={x:c.left-a.left+(u-s)/2,y:c.top-a.top+(d-l)/2,scale:u/s,force3D:!0,ease:Expo.easeInOut,onComplete:function(){i.find("img").css("opacity",1),i.css({background:"",position:"","z-index":"",transition:"",opacity:""}),E(i.data("caption"))||i.children(".photometa").css("opacity",1),e.css("opacity",""),o&&h.remove(),void 0!==r&&r()}},p=t.extend(f,n);requestAnimationFrame(function(){TweenMax.to(i.children(".photometa"),0,{opacity:0}),h.prependTo(i),TweenMax.to(h.children(".photometa"),.3,{opacity:0}),TweenMax.to(h,.5,p)})}function F(i){e.find(".js-portfolio-item").removeClass("portfolio__item--active"),i.addClass("portfolio__item--active"),t(".portfolio__position").text(i.data("count")+1+" "+objectl10n.tCounter+" "+e.find(".js-portfolio-item").not(".portfolio__item--clone").length)}return s=windowWidth,l=windowHeight,{init:function(){t(".single-jetpack-portfolio").length&&(a||((t(".image-scaling--fit").length||Modernizr.touchevents&&void 0!==window.disable_mobile_panning&&1==window.disable_mobile_panning)&&(d="fit"),t(".project_layout-filmstrip").length&&(e=t(".js-portfolio"),i=e.clone(!0,!0).addClass("portfolio--grid").insertBefore(e),e.addClass("portfolio--filmstrip").addClass("portfolio--visible"),i.find(".js-portfolio-item").each(function(e,i){var n=t(i);n.data("src",n.data("srcsmall"))}),e.find(".js-portfolio-item").each(function(e,i){var n=t(i);n.data("src",n.data("srcfull"))}),n=t(".fullview"),(t(".single-proof_gallery").length?e.add(i):e).find(".js-portfolio-item").each(function(e,i){var n=t(i),r=n.data("caption"),o=t('').html(r),a=n.data("description"),s=t('').html(""+a+"
"),l=t(''),c=t(''),u=n.data("exif"),d=t('');E(r)&&(c.css("opacity",0),c.addClass("no-caption"),E(a)&&E(u)&&c.hide()),E(u)||t.each(u,function(e,i){t(''+i+"").appendTo(l)}),d.prependTo(n),o.appendTo(c),l.appendTo(c),s.appendTo(c),c.appendTo(n)}),t(window).on("project:resize",h),t(".portfolio--grid").on("click",".js-portfolio-item",x),t(".portfolio--filmstrip").on("click",".js-portfolio-item",C),t(".fullview__close").on("click",_),t(".fullview .rsArrowRight").on("click",m),t(".fullview .rsArrowLeft").on("click",p),t(".fullview").on("click",_),t(".js-details").on("click",f),t(".js-thumbs").on("click",function(t){t.preventDefault(),w()}),t(document).keydown(function(i){if(t(".portfolio--filmstrip.portfolio--visible").length){var n,r,o,a=e.find(".js-portfolio-item");if(a.each(function(e,i){t(i).hasClass("portfolio__item--active")&&(n=e)}),void 0!==n){switch(i.which){case 27:if(t(".fullview--visible").length)return _(),void i.preventDefault();if(t(".portfolio--filmstrip.portfolio--visible").length)return w(),void i.preventDefault();case 13:if(t(".portfolio--filmstrip.portfolio--visible").length&&!t(".fullview--visible").length)return C.call(t(".portfolio__item--active")),void i.preventDefault()}if(t(".fullview--visible").length>0)switch(i.which){case 37:p(),i.preventDefault();break;case 39:m(),i.preventDefault()}else{switch(i.which){case 37:if(0===n)return;r=n-1,i.preventDefault();break;case 39:if(n===a.length-1)return;r=n+1,i.preventDefault();break;default:return}o=a.eq(r);var s=parseInt(t(".bar--fixed").css("left"),10),l=o.data("middle")-t(".site-content").width()/2+s;TweenLite.to(window,.6,{scrollTo:{x:l},ease:Power1.easeInOut})}}}}),a=!0)))},prepare:function(){!t(".project_layout-filmstrip").length&&!t(".project_layout-thumbnails").length||t(".password-required").length||(filmWidth=e.width(),contentWidth=t(".site-content").width(),sidebarWidth=t(".site-sidebar").width(),y(),v(),i.show(),F(e.find(".js-portfolio-item").first().addClass("portfolio__item--active")),t(".project_layout-filmstrip").length||w(0,!0))},onResize:h,getCurrent:function(){if(void 0!==e&&t(".single-jetpack-portfolio").length&&!t(".fullview--visible").length&&a){var i,n=t(".portfolio__item--active").data("middle"),s=latestKnownScrollX+r+(o-r)*latestKnownScrollX/(filmWidth-contentWidth),l=Math.abs(s-n);t(".js-reference").css("left",s).text(parseInt(s,10)),e.find(".js-portfolio-item").each(function(e,n){var r=t(n).data("middle");Math.abs(r-s)1){var k=t(".js-gallery-slides-total"),E=(t(".js-decimal"),t(".js-unit"));k.html(_),S.ev.on("rsBeforeAnimStart",function(t){var e=S.currSlideId+1;E.html(e)})}1==_&&e.addClass("single-slide");if(e.addClass("slider--loaded"),e.hasClass("pixslider")){var F=e.find(".rsArrow");F.appendTo(e);var A=new TimelineLite({delay:.5,paused:!0});A.to(e,0,{overflow:"visible"}).fromTo(F,.3,{opacity:0},{opacity:1}),A.play()}}(t(this));var e=t(this).data("royalSlider");if(e.slides.length){var i=e.slides[0],n=t(i.content);(void 0!==(n.hasClass("video")?n:n.find(".video")).data("video_autoplay")||ieMobile||iOS||android)&&i.holder.on("rsAfterContentSet",function(){e.playVideo()}),e.ev.on("rsBeforeAnimStart",function(t){e.stopVideo()}),e.ev.on("rsAfterSlideChange",function(i){var n=t(e.currSlide.content);(void 0!==(n.hasClass("video")?n:n.find(".video")).data("video_autoplay")||ieMobile||iOS||android)&&(e.stopVideo(),e.playVideo())}),e.ev.on("rsOnDestroyVideoElement",function(e,i){var n=t(this.currSlide.content);(n.hasClass("video")?n:n.find(".video")).removeClass("video_autoplay")})}})}function y(){var e,i,o;isWindows&&($html.niceScroll({zindex:5e3,smoothscroll:!1}),$html.addClass("has--nicescroll"),$html.addClass("is--windows"),t(document).on("jp_carousel.afterClose",function(){$html.getNiceScroll().resize()})),F(),t("html, body, *").unbind("mousewheel",z),horToVertScroll=!1,windowWidth>900&&Modernizr.touchevents&&j.handle(),t(".single-jetpack-portfolio").length?(g.init(),a.update(),g.prepare()):a.update(),m.init(),n.init(),r.init(),v(),videos.init(),e=t(".js-projects-filter"),i=t(".js-projects-filter-content"),o=t(".js-projects-filter-list"),t(".js-projects-filter-trigger").on("mouseenter",function(){e.addClass("is-open"),TweenMax.to(i,.2,{opacity:1,onStart:function(){o.css("display","block")}})}),e.on("mouseleave",function(){e.removeClass("is-open"),TweenMax.to(i,.2,{opacity:0,onComplete:function(){o.css("display","none")}})}),t(".site-header, #page, .site-footer").css("opacity",1),t(".pixcode--tabs").organicTabs(),Modernizr.touchevents||horToVertScroll||M()}function w(){k(),F(),Modernizr.touchevents&&(windowWidth>=900?j.handle():windowWidth<900&&j.unHandle()),g.onResize(),o.onResize(),r.onResize(),videos.resize(),isiele10&&n.calcIeFilmstrip(),a.resize()}function x(){t(".page-has-featured-image").length&&latestKnownScrollY>windowHeight-62?t("body").addClass("header--not-light"):t("body").removeClass("header--not-light")}window.videos=function(){function e(){globalDebug&&console.group("videos::resize"),t(".portfolio__item--video iframe, iframe[data-aspectRatio]").each(function(){var e,i,n=t(this),r=n.attr("data-aspectRatio");if(n.closest(".portfolio__item--video").length)globalDebug&&console.log(e,i,r),e=(i=n.closest(".portfolio__item--video").height())*r,n.width(e),n.height(i);else{i=(e=n.css("width","100%").width())/r;var o=n.parent().width();e>o?n.width(e).height(o*r):n.width(e).height(i)}}),globalDebug&&console.groupEnd()}return{init:function(){globalDebug&&console.group("videos::init"),t(".portfolio__item--video iframe, iframe[width][height]").each(function(){var e=t(this).attr("width")?t(this).attr("width"):t(this).width(),i=t(this).attr("height")?t(this).attr("height"):t(this).height();t(this).attr("data-aspectRatio",e/i).removeAttr("height").removeAttr("width").width(e).height(i)}),t("iframe").each(function(){var i,n,r,o,a,s=t(this).attr("src");E(s)||t(this).attr("src",(i=s,n="wmode",r="transparent",o=new RegExp("([?|&])"+n+"=.*?(&|$)","i"),a="",a=-1!==i.indexOf("?")?"&":"?",i.match(o)?i.replace(o,"$1"+n+"="+r+"$2"):i+a+n+"="+r)),t(this).on("load",function(){e(),t(window).trigger("project:resize")})}),globalDebug&&console.groupEnd()},resize:e}}(),t(function(){t.support.touch=Modernizr.touchevents,t.support.svg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),t.support.transform=function(){for(var t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i740&&M()}(),_()});var b,T=!1;function C(e){t(".filmstrip").length||t(".portfolio--filmstrip.portfolio--visible").length?latestKnownScrollX=t(this).scrollLeft():latestKnownScrollY=t(this).scrollTop(),T||(T=!0,$body.addClass("is-scrolling")),clearTimeout(b),b=setTimeout(S,1e3)}function S(){$body.removeClass("is-scrolling"),T=!1}function _(){g.getCurrent(),m.maybeloadNextProjects(),n.maybeLoadNextPosts(),x(),requestAnimationFrame(_)}function k(){windowHeight=$window.height(),windowWidth=$window.width(),documentHeight=$document.height(),myOrientation=windowWidth>windowHeight?"portrait":"landscape"}function E(t){if("number"==typeof t||"boolean"==typeof t)return!1;if(null==t)return!0;if(void 0!==t.length)return 0===t.length;var e=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e++;return 0===e}function F(){t(".portfolio__item--text").each(function(e,i){var n,r,o,a,s,l=t(i).css("width",""),c=l.offset().left;n=t(i).children(),o=l.outerHeight(),n.length?(r=n.filter(":visible").last()).length&&(s=r.offset().top-l.offset().top+r.outerHeight(),r.offset().left-l.offset().left+r.outerWidth(),a=s>o?l.outerWidth()*(parseInt(s/o)+1):r.offset().left-c+r.outerWidth(),l.width(a)):l.remove()})}function A(){return $body.hasClass("blog")||$body.hasClass("project_layout-filmstrip")||$body.hasClass("project_layout-thumbnails")}function M(){A()&&!$html.hasClass("is--ie-le10")&&(t("html, body, .filmstrip, .portfolio--filmstrip").bind("mousewheel",z),horToVertScroll=!0)}function z(e,i){(t(".filmstrip").length||t(".portfolio--filmstrip.portfolio--visible").length)&&(this.scrollLeft-=i*e.deltaFactor)}!function(){function t(t){"touch"===t.pointerType&&(Modernizr.touchevents=!0)}window.disable_mobile_panning=!0,window.addEventListener("touchstart",function t(){Modernizr.touchevents=!0,window.removeEventListener("touchstart",t,!1)},!1),window.addEventListener("MSPointerDown",t),window.addEventListener("pointerdown",t),window.addEventListener("devicemotion",function(t){t.rotationRate&&(t.rotationRate.alpha||t.rotationRate.beta||t.rotationRate.gamma)&&(window.disable_mobile_panning=!1)})}();var j={handle:function(){t(".menu-item-has-children").removeClass("hover"),t(".menu-item-has-children > a").each(function(){t(this).addClass("prevent-one"),t(this).attr("href-original",t(this).attr("href")),t(this).attr("href",t(this).attr("href")+"#")}),t("a.prevent-one").on("click",function(e){e.preventDefault(),e.stopPropagation(),t(this).parent().siblings().removeClass("hover"),t(this).attr("href",t(this).attr("href-original")),t(this).parent().addClass("hover")})},unHandle:function(){t("a.prevent-one").each(function(){t(this).unbind(),t(this).attr("href",t(this).attr("href-original")),t(this).removeClass("prevent-one")})},bindOuterNavClick:function(){t("body").on("touchstart",function(e){var i=t(".nav--main");i.is(e.target)||0!==i.has(e.target).length||(t(".menu-item-has-children").removeClass("hover"),t("a.prevent-one").each(function(){t(this).attr("href",t(this).attr("href-original")+"#")}))})}}}(jQuery);
\ No newline at end of file
diff --git a/assets/js/main/main.js b/assets/js/main/main.js
index 6fffda9..d6ea9ec 100644
--- a/assets/js/main/main.js
+++ b/assets/js/main/main.js
@@ -62,7 +62,7 @@ function softInit() {
}
// /* ====== ON WINDOW LOAD ====== */
-$window.load(function () {
+$window.on('load', function () {
softInit();
eventHandlers();
loop();
diff --git a/inc/integrations/jetpack/responsive-videos/responsive-videos.js b/inc/integrations/jetpack/responsive-videos/responsive-videos.js
index 7b09922..ec36a6b 100644
--- a/inc/integrations/jetpack/responsive-videos/responsive-videos.js
+++ b/inc/integrations/jetpack/responsive-videos/responsive-videos.js
@@ -87,7 +87,7 @@
* Load responsive_videos().
* Trigger resize to make sure responsive_videos() is loaded after IS.
*/
- $( window ).load( responsive_videos ).resize( debounce( responsive_videos, 100 ) ).trigger( 'resize' );
+ $( window ).on('load', responsive_videos ).resize( debounce( responsive_videos, 100 ) ).trigger( 'resize' );
$( document ).on( 'post-load', responsive_videos );
-} )( jQuery );
\ No newline at end of file
+} )( jQuery );
diff --git a/inc/integrations/jetpack/responsive-videos/responsive-videos.min.js b/inc/integrations/jetpack/responsive-videos/responsive-videos.min.js
index e6873a3..ac18845 100644
--- a/inc/integrations/jetpack/responsive-videos/responsive-videos.min.js
+++ b/inc/integrations/jetpack/responsive-videos/responsive-videos.min.js
@@ -1 +1 @@
-!function(t){function a(){t(".jetpack-video-wrapper").find("embed, iframe, object").each(function(){var a=t(this);a.attr("data-ratio")||a.attr("data-ratio",this.height/this.width).attr("data-width",this.width).attr("data-height",this.height).css({display:"block",margin:0});var i=a.attr("data-width"),e=a.attr("data-height"),r=a.attr("data-ratio"),h=a.parent(),n=h.width();"Infinity"===r&&(i="100%"),a.removeAttr("height").removeAttr("width"),i>n?a.width(n).height(n*r):a.width(i).height(e)})}var i=function(t,a){var i,e,r,h;return function(){r=this,e=[].slice.call(arguments,0),h=new Date;var n=function(){var d=new Date-h;a>d?i=setTimeout(n,a-d):(i=null,t.apply(r,e))};i||(i=setTimeout(n,a))}};t(window).load(a).resize(i(a,100)).trigger("resize"),t(document).on("post-load",a)}(jQuery);
\ No newline at end of file
+!function(t){function a(){t(".jetpack-video-wrapper").find("embed, iframe, object").each(function(){var a=t(this);a.attr("data-ratio")||a.attr("data-ratio",this.height/this.width).attr("data-width",this.width).attr("data-height",this.height).css({display:"block",margin:0});var i=a.attr("data-width"),e=a.attr("data-height"),r=a.attr("data-ratio"),h=a.parent(),n=h.width();"Infinity"===r&&(i="100%"),a.removeAttr("height").removeAttr("width"),i>n?a.width(n).height(n*r):a.width(i).height(e)})}var i=function(t,a){var i,e,r,h;return function(){r=this,e=[].slice.call(arguments,0),h=new Date;var n=function(){var d=new Date-h;a>d?i=setTimeout(n,a-d):(i=null,t.apply(r,e))};i||(i=setTimeout(n,a))}};t(window).on('load', a).resize(i(a,100)).trigger("resize"),t(document).on("post-load",a)}(jQuery);
diff --git a/package-lock.json b/package-lock.json
index 8f99bd5..79c0216 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2266,7 +2266,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -2284,11 +2285,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2301,15 +2304,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -2412,7 +2418,8 @@
},
"inherits": {
"version": "2.0.3",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -2422,6 +2429,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -2434,17 +2442,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -2461,6 +2472,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -2533,7 +2545,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -2543,6 +2556,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -2618,7 +2632,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -2648,6 +2663,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -2665,6 +2681,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2703,11 +2720,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.0.3",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},