Sindbad~EG File Manager

Current Path : /home/dtconseimw/www.2025.hack/wp-content/plugins.old/nature/template/js/
Upload File :
Current File : /home/dtconseimw/www.2025.hack/wp-content/plugins.old/nature/template/js/plugin.min.js

 /*! ease jquery */
jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,t,n,o,r){return jQuery.easing[jQuery.easing.def](e,t,n,o,r)},easeInQuad:function(e,t,n,o,r){return o*(t/=r)*t+n},easeOutQuad:function(e,t,n,o,r){return-o*(t/=r)*(t-2)+n},easeInOutQuad:function(e,t,n,o,r){return 1>(t/=r/2)?o/2*t*t+n:-o/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,o,r){return o*(t/=r)*t*t+n},easeOutCubic:function(e,t,n,o,r){return o*((t=t/r-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,o,r){return 1>(t/=r/2)?o/2*t*t*t+n:o/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,o,r){return o*(t/=r)*t*t*t+n},easeOutQuart:function(e,t,n,o,r){return-o*((t=t/r-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,o,r){return 1>(t/=r/2)?o/2*t*t*t*t+n:-o/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,o,r){return o*(t/=r)*t*t*t*t+n},easeOutQuint:function(e,t,n,o,r){return o*((t=t/r-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,o,r){return 1>(t/=r/2)?o/2*t*t*t*t*t+n:o/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,o,r){return-o*Math.cos(t/r*(Math.PI/2))+o+n},easeOutSine:function(e,t,n,o,r){return o*Math.sin(t/r*(Math.PI/2))+n},easeInOutSine:function(e,t,n,o,r){return-o/2*(Math.cos(Math.PI*t/r)-1)+n},easeInExpo:function(e,t,n,o,r){return 0==t?n:o*Math.pow(2,10*(t/r-1))+n},easeOutExpo:function(e,t,n,o,r){return t==r?n+o:o*(-Math.pow(2,-10*t/r)+1)+n},easeInOutExpo:function(e,t,n,o,r){return 0==t?n:t==r?n+o:1>(t/=r/2)?o/2*Math.pow(2,10*(t-1))+n:o/2*(-Math.pow(2,-10*--t)+2)+n},easeInCirc:function(e,t,n,o,r){return-o*(Math.sqrt(1-(t/=r)*t)-1)+n},easeOutCirc:function(e,t,n,o,r){return o*Math.sqrt(1-(t=t/r-1)*t)+n},easeInOutCirc:function(e,t,n,o,r){return 1>(t/=r/2)?-o/2*(Math.sqrt(1-t*t)-1)+n:o/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,o,r){var i=1.70158,s=0,a=o;if(0==t)return n;if(1==(t/=r))return n+o;if(s||(s=.3*r),Math.abs(o)>a){a=o;var i=s/4}else var i=s/(2*Math.PI)*Math.asin(o/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*r-i)*2*Math.PI/s))+n},easeOutElastic:function(e,t,n,o,r){var i=1.70158,s=0,a=o;if(0==t)return n;if(1==(t/=r))return n+o;if(s||(s=.3*r),Math.abs(o)>a){a=o;var i=s/4}else var i=s/(2*Math.PI)*Math.asin(o/a);return a*Math.pow(2,-10*t)*Math.sin((t*r-i)*2*Math.PI/s)+o+n},easeInOutElastic:function(e,t,n,o,r){var i=1.70158,s=0,a=o;if(0==t)return n;if(2==(t/=r/2))return n+o;if(s||(s=r*.3*1.5),Math.abs(o)>a){a=o;var i=s/4}else var i=s/(2*Math.PI)*Math.asin(o/a);return 1>t?-.5*a*Math.pow(2,10*(t-=1))*Math.sin((t*r-i)*2*Math.PI/s)+n:.5*a*Math.pow(2,-10*(t-=1))*Math.sin((t*r-i)*2*Math.PI/s)+o+n},easeInBack:function(e,t,n,o,r,i){return void 0==i&&(i=1.70158),o*(t/=r)*t*((i+1)*t-i)+n},easeOutBack:function(e,t,n,o,r,i){return void 0==i&&(i=1.70158),o*((t=t/r-1)*t*((i+1)*t+i)+1)+n},easeInOutBack:function(e,t,n,o,r,i){return void 0==i&&(i=1.70158),1>(t/=r/2)?o/2*t*t*(((i*=1.525)+1)*t-i)+n:o/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+n},easeInBounce:function(e,t,n,o,r){return o-jQuery.easing.easeOutBounce(e,r-t,0,o,r)+n},easeOutBounce:function(e,t,n,o,r){return 1/2.75>(t/=r)?o*7.5625*t*t+n:2/2.75>t?o*(7.5625*(t-=1.5/2.75)*t+.75)+n:2.5/2.75>t?o*(7.5625*(t-=2.25/2.75)*t+.9375)+n:o*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeInOutBounce:function(e,t,n,o,r){return r/2>t?.5*jQuery.easing.easeInBounce(e,2*t,0,o,r)+n:.5*jQuery.easing.easeOutBounce(e,2*t-r,0,o,r)+.5*o+n}}),function(e,t,n,o){function r(t,n){this.element=t,this.options=e.extend({},f,n),this._defaults=f,this._name=h,this.init()}function i(){var e,r=n.createElement("p"),i={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(r,null);for(var s in i)r.style[s]!==o&&(r.style[s]="translate3d(1px,1px,1px)",e=t.getComputedStyle(r).getPropertyValue(i[s]));return n.body.removeChild(r),e!==o&&e.length>0&&"none"!==e}function s(e,t){var n=e.indexOf(t);return-1!==n?!0:!1}function a(e){return e===!0}function l(e){return"number"==typeof e}function c(e){return"function"==typeof e}function u(e){return"object"==typeof e}var h="pofloor",f={pofloorFloorName:!1,childType:"div",windowsOn:0,direction:"y",loop:!1,width:"100%",height:"100%",time:250,easing:"linear",keyNavigation:!0,queued:!1,jump:!1,ready:!1,swipeNavigation:"mobile-only",swipeVelocity:.7};Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length>>>0,n=Number(arguments[1])||0;for(n=0>n?Math.ceil(n):Math.floor(n),0>n&&(n+=t);t>n;n++)if(n in this&&this[n]===e)return n;return-1}),r.prototype={init:function(){return this.AXIS_X=1,this.AXIS_Y=0,this.dataAttributeMap={next:"pofloor-next",prev:"pofloor-prev",down:"pofloor-down",up:"pofloor-up",left:"pofloor-left",right:"pofloor-right"},this.node=e(this.element),this.nodeChildren=this.node.children(this.options.childType),this.floorActive=l(this._getFloorFromHash())?this._getFloorFromHash():this.options.windowsOn,this.NH=this.node.height(),this.NW=this.node.width(),this.directionIsArray=u(this.options.direction),this.supportTransform=i(),u(this.options.pofloorFloorName)&&this.options.pofloorFloorName.length<this.nodeChildren.length?this._emitConsoleMessage("error","floors total ("+this.nodeChildren.length+") & floor name array length ("+this.options.pofloorFloorName.length+") don't match"):this.directionIsArray&&this.options.direction.length<this.nodeChildren.length?this._emitConsoleMessage("error","floors total ("+this.nodeChildren.length+") & direction array lenght ("+this.options.direction.length+") don't match"):(this.setup(),o)},setup:function(){this._positionElement(),this._bindEvents(),this.scrollToFloor(this.floorActive),u(this.options.pofloorFloorName)&&this._updateHash(this.floorActive),c(this.options.ready)&&this.options.ready()},_bindEvents:function(){var r=this;if(this.node.on("scrollToDirection",function(e,t){r.scrollToDirection(t)}),this.node.on("scrollToStage",function(t,n){if("string"==typeof n){var o=e.inArray(n,r.options.pofloorFloorName);-1!==o&&r.scrollToFloor(o)}else if("number"==typeof n){if(n>r.nodeChildren.length)return;r.scrollToFloor(n)}}),this.node.on("next",function(){var e=r.nodeChildren.eq(r.floorActive).data(r.dataAttributeMap.next);return e?r.scrollToFloor(e):(r.next(),o)}),this.node.on("prev",function(){var e=r.nodeChildren.eq(r.floorActive).data(r.dataAttributeMap.prev);return e?r.scrollToFloor(e):(r.prev(),o)}),this.node.on("refresh",function(){r.refresh()}),this.node.on("remove",function(){r.destroy()}),e(t).on("resize.pofloor",function(){r.scrollToFloor(r.floorActive,!1)}),u(this.options.pofloorFloorName)&&e(t).on("hashchange.pofloor",function(e){r._hashchangeHandler(e)}),t.DeviceOrientationEvent&&e(t).on("orientationchange.pofloor",function(){r.scrollToFloor(r.floorActive)}),this.options.keyNavigation&&e(n).on("keydown.pofloor",function(e){r._keypressHandler(e)}),this.options.swipeNavigation){var i="touchstart.pofloor touchend.pofloor";"mobile-only"!==this.options.swipeNavigation&&(i+=" mousedown.pofloor mouseup.pofloor"),this.node.on(i,function(e){r._handleTouchEvent(e)})}},refresh:function(){this.nodeChildren=this.node.children(this.options.childType),this._positionElement()},destroy:function(){this.node.off("scrollToDirection scrollToStage next prev refresh remove touchstart.pofloor touchend.pofloor mousedown.pofloor mouseup.pofloor"),e(t).off("resize.pofloor hashchange.pofloor orientationchange.pofloor"),e(n).off("keydown.pofloor"),this.node.css({position:"",overflow:"",top:"",left:"",width:"",height:""}),this.nodeChildren.css({position:"",overflow:"",top:"",left:"",width:"",height:"",transform:""}),this.node.removeData()},_handleTouchEvent:function(e){switch(e.type){case"touchstart":case"mousedown":this.touchStartTime=(new Date).getTime(),this.touchStartX="touchstart"==e.type?e.originalEvent.touches[0].pageX:e.pageX,this.touchStartY="touchstart"==e.type?e.originalEvent.touches[0].pageY:e.pageY;break;case"touchend":case"mouseup":this.touchEndTime=(new Date).getTime(),this.touchEndX="touchend"==e.type?e.originalEvent.changedTouches[0].pageX:e.pageX,this.touchEndY="touchend"==e.type?e.originalEvent.changedTouches[0].pageY:e.pageY;var t=this.touchStartX-this.touchEndX,n=this.touchStartY-this.touchEndY,o=this.touchEndTime-this.touchStartTime,r=Math.abs(t)/o,i=Math.abs(n)/o;r>this.options.swipeVelocity&&Math.abs(t)>Math.abs(n)&&0>t&&this.scrollToDirection("left"),r>this.options.swipeVelocity&&Math.abs(t)>Math.abs(n)&&t>0&&this.scrollToDirection("right"),i>this.options.swipeVelocity&&Math.abs(t)<Math.abs(n)&&0>n&&this.scrollToDirection("up"),i>this.options.swipeVelocity&&Math.abs(t)<Math.abs(n)&&n>0&&this.scrollToDirection("down")}},_positionElement:function(){var t=this;this.directionIsArray&&this._generateFloorMap(),this.node.css({position:"absolute",overflow:"hidden",top:"0",left:"0",width:this.options.width,height:this.options.height}),this.nodeChildren.css({position:"absolute",overflow:"auto",top:"0",left:"0",width:"100%",height:"100%"}),this.nodeChildren.each(function(n){t.supportTransform?e(this).css({transform:function(){return"y"===t.options.direction?"translateY("+100*n+"%)":"x"===t.options.direction?"translateX("+100*n+"%)":t.directionIsArray?"translateY("+100*t.options.direction[n][t.AXIS_Y]+"%) translateX("+100*t.options.direction[n][t.AXIS_X]+"%)":o}}):e(this).css({top:function(){return"y"===t.options.direction?100*n+"%":t.directionIsArray?100*t.options.direction[n][t.AXIS_Y]+"%":o},left:function(){return"x"===t.options.direction?100*n+"%":t.directionIsArray?100*t.options.direction[n][t.AXIS_X]+"%":o}})})},_getFloorFromHash:function(){return this._getHash()&&this.options.pofloorFloorName&&s(this.options.pofloorFloorName,this._getHash())?this.options.pofloorFloorName.indexOf(this._getHash()):!1},_getHash:function(){if(t.location.hash){var e=t.location.hash.split("#").pop();return e}return!1},_hashchangeHandler:function(){l(this._getFloorFromHash())&&this._getFloorFromHash()!==this.floorActive&&!this.node.is(":animated")&&this.scrollToFloor(this._getFloorFromHash())},_updateHash:function(e){u(this.options.pofloorFloorName)&&this._getHash()!==this.options.pofloorFloorName[e]&&t.location.replace((""+t.location).split("#")[0]+"#"+this.options.pofloorFloorName[e])},_emitEvent:function(e,t,n){this.node.trigger(e,floor={from:t,to:n})},_emitConsoleMessage:function(e,t){"error"==e&&console.error("pofloor.js: "+t),"warn"==e&&console.warn("pofloor.js: "+t)},_keypressHandler:function(t){var n=this,o=t.keyCode||t.which;if(!e("input, textarea, button").is(":focus"))switch(o){case 40:case 83:n.scrollToDirection("down");break;case 38:case 87:n.scrollToDirection("up");break;case 37:case 65:n.scrollToDirection("left");break;case 39:case 68:n.scrollToDirection("right")}},scrollToFloor:function(e){var t=this,n=e===this.floorActive?!1:!0;this.NW!==this.node.width()&&(this.NW=this.node.width()),this.NH!==this.node.height()&&(this.NH=this.node.height());var o=this._getAnimationSettings(e);n?(this._emitEvent("scrollStart",t.floorActive,e),this.node.stop().animate(o.property,t.options.time,t.options.easing,o.callback)):this.node.stop().scrollTop(o.defaults.scrollTop).scrollLeft(o.defaults.scrollLeft),this.floorActive=e,this.node.data("current-floor",this.floorActive)},prev:function(){var e=this.floorActive-1;if(0>e){if(!this.options.loop)return;e=this.nodeChildren.length-1}this.scrollToFloor(e)},next:function(){var e=this.floorActive+1;if(e>this.nodeChildren.length-1){if(!this.options.loop)return;e=0}this.scrollToFloor(e)},_getAnimationSettings:function(e){var t=this,n={property:{},callback:function(){t._emitEvent("scrollEnd",t.floorActive,e),t._updateHash(e)},defaults:{}},o={property:{},callback:function(){t._emitEvent("scrollEnd",t.floorActive,e),t._updateHash(e)}};if(n.defaults.scrollTop=e*t.NH,n.defaults.scrollLeft=e*t.NW,"y"===t.options.direction)return n.property.scrollTop=e*t.NH,n;if("x"===t.options.direction)return n.property.scrollLeft=e*t.NW,n;if(t.directionIsArray){var r=t.options.direction[e][t.AXIS_Y]*t.NH,i=t.options.direction[e][t.AXIS_X]*t.NW;if(n.defaults.scrollTop=r,n.defaults.scrollLeft=i,t.options.queued){{var s=this.node.scrollLeft()===i;this.node.scrollTop()===r}return"x"===t.options.queued&&s?(n.property.scrollTop=r,n):(n.property.scrollLeft=i,o.property.scrollTop=r,n.callback=function(){t.node.stop().animate(o.property,t.options.time,t.options.easing,o.callback)},n)}return n.property.scrollTop=r,n.property.scrollLeft=i,n}return n},scrollToDirection:function(e){var t=this,n=this.nodeChildren.eq(this.floorActive).data(this.dataAttributeMap[e]);if(n)return t.scrollToFloor(n);var o="right"==e||"left"==e,r="down"==e||"up"==e;if(!("y"==t.options.direction&&o||"x"==t.options.direction&&r)){if("y"==t.options.direction&&"down"==e||"x"==t.options.direction&&"right"==e)return t.next();if("y"==t.options.direction&&"up"==e||"x"==t.options.direction&&"left"==e)return t.prev();if(t.directionIsArray){var i=t.floorMap[t.floorActive],s=i[e];if(l(s))return t.scrollToFloor(s);var c=i.closest[e];if(a(t.options.jump)&&l(c))return t.scrollToFloor(c);var u=i.furthest[e];if(l(u)&&(a(t.options.loop)||o&&"loop-x"==t.options.loop||r&&"loop-y"==t.options.loop))return t.scrollToFloor(u);var h=i.increment[e];if(l(h)&&("increment"==t.options.loop||r&&"increment-y"==t.options.loop||o&&"increment-x"==t.options.loop))return t.scrollToFloor(h);if("increment-x"==t.options.loop&&o||"increment"==t.options.loop){if(t.floorActive==t.floorMap.furthest_x)return t.scrollToFloor(t.floorMap.closest_x);if(t.floorActive==t.floorMap.closest_x)return t.scrollToFloor(t.floorMap.furthest_x)}if("increment-y"==t.options.loop&&r||"increment"==t.options.loop){if(t.floorActive==t.floorMap.furthest_y)return t.scrollToFloor(t.floorMap.closest_y);if(t.floorActive==t.floorMap.closest_y)return t.scrollToFloor(t.floorMap.furthest_y)}}}},_getDirectFloorIndex:function(t,n,r){var i=this,s=[this.options.direction[n][this.AXIS_Y],this.options.direction[n][this.AXIS_X]];"right"==r&&(s[this.AXIS_X]+=1),"left"==r&&(s[this.AXIS_X]-=1),"up"==r&&(s[this.AXIS_Y]-=1),"down"==r&&(s[this.AXIS_Y]+=1);var a=!1;return e.each(t,function(e,t){return t[i.AXIS_Y]==s[i.AXIS_Y]&&t[i.AXIS_X]==s[i.AXIS_X]?(a=e,!1):o}),a},_getAxisFromDirection:function(e){var t,n=this;switch(e){case"up":case"down":t=n.AXIS_Y;break;case"left":case"right":t=n.AXIS_X}return t},_getClosestFloorIndex:function(t,n,o,r){r=r||0;var i=this._getAxisFromDirection(o),s=t[n][i],a=i==this.AXIS_Y?this.AXIS_X:this.AXIS_Y,l=!1,c=!1;return e.each(t,function(e,u){u[a]==t[n][a]+r&&(("right"==o||"down"==o)&&u[i]>s||("left"==o||"up"==o)&&s>u[i])&&(!c||Math.abs(u[i]-s)<Math.abs(c[i]))&&(l=e,c=u)}),l},_getFurthestFloorIndex:function(t,n,o,r){r=r||0;var i=this._getAxisFromDirection(o),s=t[n][i],a=i==this.AXIS_Y?this.AXIS_X:this.AXIS_Y,l=!1,c=!1;return e.each(t,function(e,o){o[a]==t[n][a]+r&&(!l||Math.abs(o[i]-s)>Math.abs(l[i]-s))&&(l=o,c=e)}),c},_generateFloorMap:function(){function t(e,t){var n=!1;return jQuery.each(e,function(e,o){(n===!1||n[t]<o[t])&&(n=o)}),n}function n(e,t){var n=!1;return jQuery.each(e,function(e,o){(n===!1||n[t]>o[t])&&(n=o)}),n}function o(e,t){return jQuery.grep(i,function(n){var o=n[t]==e[t];return o})}var r=this;this.floorMap=[];var i=jQuery.grep(r.options.direction,function(e,t){return r.nodeChildren.length>t});e.each(i,function(e){r.floorMap[e]={down:r._getDirectFloorIndex(i,e,"down"),up:r._getDirectFloorIndex(i,e,"up"),right:r._getDirectFloorIndex(i,e,"right"),left:r._getDirectFloorIndex(i,e,"left"),increment:{down:r._getFurthestFloorIndex(i,e,"down",1),up:r._getFurthestFloorIndex(i,e,"up",-1),right:r._getFurthestFloorIndex(i,e,"right",1),left:r._getFurthestFloorIndex(i,e,"left",-1)},closest:{down:r._getClosestFloorIndex(i,e,"down"),up:r._getClosestFloorIndex(i,e,"up"),right:r._getClosestFloorIndex(i,e,"right"),left:r._getClosestFloorIndex(i,e,"left")},furthest:{down:r._getFurthestFloorIndex(i,e,"down"),up:r._getFurthestFloorIndex(i,e,"up"),right:r._getFurthestFloorIndex(i,e,"right"),left:r._getFurthestFloorIndex(i,e,"left")}}});var s=t(i,r.AXIS_X),a=o(s,r.AXIS_X),l=t(a,r.AXIS_Y),c=t(i,r.AXIS_Y),u=o(c,r.AXIS_Y),h=t(u,r.AXIS_X);r.floorMap.furthest_x=i.indexOf(h),r.floorMap.furthest_y=i.indexOf(l);var f=n(i,r.AXIS_X),p=o(f,r.AXIS_X),d=n(p,r.AXIS_Y),g=n(i,r.AXIS_Y),m=o(g,r.AXIS_Y),v=n(m,r.AXIS_X);r.floorMap.closest_x=i.indexOf(v),r.floorMap.closest_y=i.indexOf(d)}},e.fn[h]=function(t){return this.each(function(){e.data(this,h)||e.data(this,h,new r(this,t))}),this}}(jQuery,window,document),window.PR_SHOULD_USE_CONTINUATION=!0,window.PR_TAB_WIDTH=8,window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0,window._pr_isIE6=function(){var e=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);return e=e?+e[1]:!1,window._pr_isIE6=function(){return e},e},function(){function e(e){return e.replace(_,"&amp;").replace(x,"&lt;").replace(A,"&gt;")}function t(n,o,r){switch(n.nodeType){case 1:var i=n.tagName.toLowerCase();o.push("<",i);var s=n.attributes,a=s.length;if(a){if(r){for(var l=[],c=a;--c>=0;)l[c]=s[c];l.sort(function(e,t){return e.name<t.name?-1:e.name===t.name?0:1}),s=l}for(c=0;a>c;++c)l=s[c],l.specified&&o.push(" ",l.name.toLowerCase(),'="',l.value.replace(_,"&amp;").replace(x,"&lt;").replace(A,"&gt;").replace(I,"&quot;"),'"')}for(o.push(">"),s=n.firstChild;s;s=s.nextSibling)t(s,o,r);(n.firstChild||!/^(?:br|link|img)$/.test(i))&&o.push("</",i,">");break;case 3:case 4:o.push(e(n.nodeValue))}}function n(e){function t(e){if("\\"!==e.charAt(0))return e.charCodeAt(0);switch(e.charAt(1)){case"b":return 8;case"t":return 9;case"n":return 10;case"v":return 11;case"f":return 12;case"r":return 13;case"u":case"x":return parseInt(e.substring(2),16)||e.charCodeAt(1);case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return parseInt(e.substring(1),8);default:return e.charCodeAt(1)}}function n(e){return 32>e?(16>e?"\\x0":"\\x")+e.toString(16):(e=String.fromCharCode(e),("\\"===e||"-"===e||"["===e||"]"===e)&&(e="\\"+e),e)}function o(e){var o=e.substring(1,e.length-1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));e=[];for(var r=[],i="^"===o[0],s=i?1:0,a=o.length;a>s;++s){var l=o[s];switch(l){case"\\B":case"\\b":case"\\D":case"\\d":case"\\S":case"\\s":case"\\W":case"\\w":e.push(l);continue}l=t(l);var c;a>s+2&&"-"===o[s+1]?(c=t(o[s+2]),s+=2):c=l,r.push([l,c]),65>c||l>122||(65>c||l>90||r.push([32|Math.max(65,l),32|Math.min(c,90)]),97>c||l>122||r.push([-33&Math.max(97,l),-33&Math.min(c,122)]))}for(r.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]}),o=[],l=[0/0,0/0],s=0;r.length>s;++s)a=r[s],a[0]<=l[1]+1?l[1]=Math.max(l[1],a[1]):o.push(l=a);for(r=["["],i&&r.push("^"),r.push.apply(r,e),s=0;o.length>s;++s)a=o[s],r.push(n(a[0])),a[1]>a[0]&&(a[1]+1>a[0]&&r.push("-"),r.push(n(a[1])));return r.push("]"),r.join("")}function r(e){for(var t=e.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),n=t.length,r=[],a=0,l=0;n>a;++a){var c=t[a];"("===c?++l:"\\"===c.charAt(0)&&(c=+c.substring(1))&&l>=c&&(r[c]=-1)}for(a=1;r.length>a;++a)-1===r[a]&&(r[a]=++i);for(l=a=0;n>a;++a)c=t[a],"("===c?(++l,void 0===r[l]&&(t[a]="(?:")):"\\"===c.charAt(0)&&(c=+c.substring(1))&&l>=c&&(t[a]="\\"+r[l]);for(l=a=0;n>a;++a)"^"===t[a]&&"^"!==t[a+1]&&(t[a]="");if(e.ignoreCase&&s)for(a=0;n>a;++a)c=t[a],e=c.charAt(0),c.length>=2&&"["===e?t[a]=o(c):"\\"!==e&&(t[a]=c.replace(/[a-zA-Z]/g,function(e){return e=e.charCodeAt(0),"["+String.fromCharCode(-33&e,32|e)+"]"}));return t.join("")}for(var i=0,s=!1,a=!1,l=0,c=e.length;c>l;++l){var u=e[l];if(u.ignoreCase)a=!0;else if(/[a-z]/i.test(u.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){s=!0,a=!1;break}}var h=[];for(l=0,c=e.length;c>l;++l){if(u=e[l],u.global||u.multiline)throw Error(""+u);h.push("(?:"+r(u)+")")}return RegExp(h.join("|"),a?"gi":"g")}function o(e){var t=0;return function(n){for(var o=null,r=0,i=0,s=n.length;s>i;++i)switch(n.charAt(i)){case"	":for(o||(o=[]),o.push(n.substring(r,i)),r=e-t%e,t+=r;r>=0;r-=16)o.push("                ".substring(0,r));r=i+1;break;case"\n":t=0;break;default:++t}return o?(o.push(n.substring(r)),o.join("")):n}}function r(e,t,n,o){t&&(e={source:t,c:e},n(e),o.push.apply(o,e.d))}function i(e,t){function o(e){for(var n=e.c,l=[n,v],u=0,h=e.source.match(i)||[],f={},p=0,d=h.length;d>p;++p){var g,m=h[p],y=f[m],b=void 0;if("string"==typeof y)g=!1;else{var _=s[m.charAt(0)];if(_)b=m.match(_[1]),y=_[0];else{for(g=0;a>g;++g)if(_=t[g],b=m.match(_[1])){y=_[0];break}b||(y=v)}!(g=y.length>=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y=w),g||(f[m]=y)}if(_=u,u+=m.length,g){g=b[1];var x=m.indexOf(g),A=x+g.length;b[2]&&(A=m.length-b[2].length,x=A-g.length),y=y.substring(5),r(n+_,m.substring(0,x),o,l),r(n+_+x,g,c(y,g),l),r(n+_+A,m.substring(A),o,l)}else l.push(n+_,y)}e.d=l}var i,s={};(function(){for(var o=e.concat(t),r=[],a={},l=0,c=o.length;c>l;++l){var u=o[l],h=u[3];if(h)for(var f=h.length;--f>=0;)s[h.charAt(f)]=u;u=u[1],h=""+u,a.hasOwnProperty(h)||(r.push(u),a[h]=null)}r.push(/[\0-\uffff]/),i=n(r)})();var a=t.length;return o}function s(e){var t=[],n=[];return e.tripleQuotedStrings?t.push([h,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([h,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([h,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([h,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]),e.hashComments&&(e.cStyleComments?(t.push([p,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([h,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])):t.push([p,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([p,/^\/\/[^\r\n]*/,null]),n.push([p,/^\/\*[\s\S]*?(?:\*\/|$)/,null])),e.regexLiterals&&n.push(["lang-regex",RegExp("^"+b+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]),e=e.keywords.replace(/^\s+|\s+$/g,""),e.length&&n.push([f,RegExp("^(?:"+e.replace(/\s+/g,"|")+")\\b"),null]),t.push([v,/^\s+/,null," \r\n	 "]),n.push([g,/^@[a-z_$][a-z_$@0-9]*/i,null],[d,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],[v,/^[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[m,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]),i(t,n)}function a(t){function n(t){if(t>l){c&&c!==u&&(a.push("</span>"),c=null),!c&&u&&(c=u,a.push('<span class="',c,'">'));var n=e(p(r.substring(l,t))).replace(w?g:d,"$1&#160;");w=v.test(n),a.push(n.replace(m,b)),l=t}}var r=t.source,i=t.g,s=t.d,a=[],l=0,c=null,u=null,h=0,f=0,p=o(window.PR_TAB_WIDTH),d=/([\r\n ]) /g,g=/(^| ) /gm,m=/\r\n?|\n/g,v=/[ \r\n]$/,w=!0,y=window._pr_isIE6();y=y?"PRE"===t.b.tagName?6===y?"&#160;\r\n":7===y?"&#160;<br>\r":"&#160;\r":"&#160;<br />":"<br />";var b,_=t.b.className.match(/\blinenums\b(?::(\d+))?/);if(_){for(var x=[],A=0;10>A;++A)x[A]=y+'</li><li class="L'+A+'">';var I=_[1]&&_[1].length?_[1]-1:0;a.push('<ol class="linenums"><li class="L',I%10,'"'),I&&a.push(' value="',I+1,'"'),a.push(">"),b=function(){var e=x[++I%10];return c?"</span>"+e+'<span class="'+c+'">':e}}else b=y;for(;;)if(i.length>h?s.length>f?i[h]<=s[f]:!0:!1)n(i[h]),c&&(a.push("</span>"),c=null),a.push(i[h+1]),h+=2;else{if(!(s.length>f))break;n(s[f]),u=s[f+1],f+=2}n(r.length),c&&a.push("</span>"),_&&a.push("</li></ol>"),t.a=a.join("")}function l(e,t){for(var n=t.length;--n>=0;){var o=t[n];R.hasOwnProperty(o)?"console"in window&&console.warn("cannot override language handler %s",o):R[o]=e}}function c(e,t){return e&&R.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),R[e]}function u(e){var t=e.f,n=e.e;e.a=t;try{var o,r=t.match(X);t=[];var i=0,s=[];if(r)for(var l=0,u=r.length;u>l;++l){var h=r[l];if(h.length>1&&"<"===h.charAt(0)){if(!O.test(h))if(P.test(h))t.push(h.substring(9,h.length-3)),i+=h.length-12;else if(D.test(h))t.push("\n"),++i;else if(h.indexOf(y)>=0&&h.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var f,p=h.match($)[2],d=1;f=l+1;e:for(;u>f;++f){var g=r[f].match($);if(g&&g[2]===p)if("/"===g[1]){if(0===--d)break e}else++d}u>f?(s.push(i,r.slice(l,f+1).join("")),l=f):s.push(i,h)}else s.push(i,h)}else{var m;d=h;var v=d.indexOf("&");if(0>v)m=d;else{for(--v;(v=d.indexOf("&#",v+1))>=0;){var w=d.indexOf(";",v);if(w>=0){var b=d.substring(v+3,w),_=10;b&&"x"===b.charAt(0)&&(b=b.substring(1),_=16);var x=parseInt(b,_);isNaN(x)||(d=d.substring(0,v)+String.fromCharCode(x)+d.substring(w+1))}}m=d.replace(S,"<").replace(T,">").replace(M,"'").replace(C,'"').replace(N," ").replace(k,"&")}t.push(m),i+=m.length}}o={source:t.join(""),h:s};var A=o.source;e.source=A,e.c=0,e.g=o.h,c(n,A)(e),a(e)}catch(I){"console"in window&&console.log(I&&I.stack?I.stack:I)}}var h="str",f="kwd",p="com",d="typ",g="lit",m="pun",v="pln",w="src",y="nocode",b=function(){for(var e=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],t="(?:^^|[+-]",n=0;e.length>n;++n)t+="|"+e[n].replace(/([^=<>:&a-z])/g,"\\$1");return t+=")\\s*"}(),_=/&/g,x=/</g,A=/>/g,I=/\"/g,S=/&lt;/g,T=/&gt;/g,M=/&apos;/g,C=/&quot;/g,k=/&amp;/g,N=/&nbsp;/g,F=/[\r\n]/g,E=null,X=RegExp("[^<]+|<!--[\\s\\S]*?-->|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),O=/^<\!--/,P=/^<!\[CDATA\[/,D=/^<br\b/i,$=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,L=s({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),R={};l(L,["default-code"]),l(i([],[[v,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[p,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[m,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),l(i([[v,/^[\s]+/,null," 	\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[m,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),l(i([],[["atv",/^[\s\S]+/]]),["uq.val"]),l(s({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",hashComments:!0,cStyleComments:!0}),["c","cc","cpp","cxx","cyc","m"]),l(s({keywords:"null true false"}),["json"]),l(s({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",hashComments:!0,cStyleComments:!0,verbatimStrings:!0}),["cs"]),l(s({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",cStyleComments:!0}),["java"]),l(s({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),l(s({keywords:"break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),l(s({keywords:"caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),l(s({keywords:"break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),l(s({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:!0,regexLiterals:!0}),["js"]),l(i([],[[h,/^[\s\S]+/]]),["regex"]),window.PR_normalizedHtml=t,window.prettyPrintOne=function(e,t){var n={f:e,e:t};
return u(n),n.a},window.prettyPrint=function(n){function o(){for(var r=window.PR_SHOULD_USE_CONTINUATION?c.now()+250:1/0;i.length>f&&r>c.now();f++){var s=i[f];if(s.className&&s.className.indexOf("prettyprint")>=0){var a=s.className.match(/\blang-(\w+)\b/);a&&(a=a[1]);for(var l=!1,p=s.parentNode;p;p=p.parentNode)if(("pre"===p.tagName||"code"===p.tagName||"xmp"===p.tagName)&&p.className&&p.className.indexOf("prettyprint")>=0){l=!0;break}if(!l){if(p=s,null===E&&(l=document.createElement("PRE"),l.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')),E=!/</.test(l.innerHTML)),E){if(l=p.innerHTML,"XMP"===p.tagName)l=e(l);else{if(p=p,"PRE"===p.tagName)p=!0;else if(F.test(l)){var d="";p.currentStyle?d=p.currentStyle.whiteSpace:window.getComputedStyle&&(d=window.getComputedStyle(p,null).whiteSpace),p=!d||"pre"===d}else p=!0;p||(l=l.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g," "))}l=l}else{for(l=[],p=p.firstChild;p;p=p.nextSibling)t(p,l);l=l.join("")}if(l=l.replace(/(?:\r\n?|\n)$/,""),h={f:l,e:a,b:s},u(h),s=h.a)if(a=h.b,"XMP"===a.tagName){for(l=document.createElement("PRE"),p=0;a.attributes.length>p;++p)d=a.attributes[p],d.specified&&("class"===d.name.toLowerCase()?l.className=d.value:l.setAttribute(d.name,d.value));l.innerHTML=s,a.parentNode.replaceChild(l,a)}else a.innerHTML=s}}}i.length>f?setTimeout(o,250):n&&n()}for(var r=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],i=[],s=0;r.length>s;++s)for(var a=0,l=r[s].length;l>a;++a)i.push(r[s][a]);r=null;var c=Date;c.now||(c={now:function(){return(new Date).getTime()}});var h,f=0;o()},window.PR={combinePrefixPatterns:n,createSimpleLexer:i,registerLangHandler:l,sourceDecorator:s,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:p,PR_DECLARATION:"dec",PR_KEYWORD:f,PR_LITERAL:g,PR_NOCODE:y,PR_PLAIN:v,PR_PUNCTUATION:m,PR_SOURCE:w,PR_STRING:h,PR_TAG:"tag",PR_TYPE:d}}();
(function($){"use strict";$.ajaxChimp={responses:{"We have sent you a confirmation email":0,"Please enter a value":1,"An email address must contain a single @":2,"The domain portion of the email address is invalid (the portion after the @: )":3,"The username portion of the email address is invalid (the portion before the @: )":4,"This email address looks fake or invalid. Please enter a real email address":5},translations:{en:null},init:function(selector,options){$(selector).ajaxChimp(options)}};$.fn.ajaxChimp=function(options){$(this).each(function(i,elem){var form=$(elem);var email=form.find("input[type=email]");var label=form.find("label[for="+email.attr("id")+"]");var settings=$.extend({url:form.attr("action"),language:"en"},options);var url=settings.url.replace("/post?","/post-json?").concat("&c=?");form.attr("novalidate","true");email.attr("name","EMAIL");form.submit(function(){var msg;function successCallback(resp){if(resp.result==="success"){msg="We have sent you a confirmation email";label.removeClass("error").addClass("valid");email.removeClass("error").addClass("valid")}else{email.removeClass("valid").addClass("error");label.removeClass("valid").addClass("error");var index=-1;try{var parts=resp.msg.split(" - ",2);if(parts[1]===undefined){msg=resp.msg}else{var i=parseInt(parts[0],10);if(i.toString()===parts[0]){index=parts[0];msg=parts[1]}else{index=-1;msg=resp.msg}}}catch(e){index=-1;msg=resp.msg}}if(settings.language!=="en"&&$.ajaxChimp.responses[msg]!==undefined&&$.ajaxChimp.translations&&$.ajaxChimp.translations[settings.language]&&$.ajaxChimp.translations[settings.language][$.ajaxChimp.responses[msg]]){msg=$.ajaxChimp.translations[settings.language][$.ajaxChimp.responses[msg]]}label.html(msg);label.show(2e3);if(settings.callback){settings.callback(resp)}}var data={};var dataArray=form.serializeArray();$.each(dataArray,function(index,item){data[item.name]=item.value});$.ajax({url:url,data:data,success:successCallback,dataType:"jsonp",error:function(resp,text){console.log("mailchimp ajax submit error: "+text)}});var submitMsg="Submitting...";if(settings.language!=="en"&&$.ajaxChimp.translations&&$.ajaxChimp.translations[settings.language]&&$.ajaxChimp.translations[settings.language]["submit"]){submitMsg=$.ajaxChimp.translations[settings.language]["submit"]}label.html(submitMsg).show(2e3);return false})});return this}})(jQuery);
/*! pofloor */
(function($,window,document,undefined){var pluginName='pofloor';var defaults={pofloorFloorName:false,childType:'div',windowsOn:0,direction:'y',loop:false,width:'100%',height:'100%',time:250,easing:'linear',keyNavigation:true,queued:false,jump:false,ready:false,swipeNavigation:'mobile-only',swipeVelocity:0.7,wheelNavigation:false,wheelNavigationDelay:40,};function Plugin(element,options){this.element=element;this.options=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;this.init();}
function has3d(){var el=document.createElement('p'),support3D,transforms={'webkitTransform':'-webkit-transform','OTransform':'-o-transform','msTransform':'-ms-transform','MozTransform':'-moz-transform','transform':'transform'};document.body.insertBefore(el,null);for(var t in transforms){if(el.style[t]!==undefined){el.style[t]='translate3d(1px,1px,1px)';support3D=window.getComputedStyle(el).getPropertyValue(transforms[t]);}}
document.body.removeChild(el);return(support3D!==undefined&&support3D.length>0&&support3D!=='none');}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(elt){var len=this.length>>>0;var from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0)from+=len;for(;from<len;from++){if(from in this&&this[from]===elt)return from;}
return-1;};}
function existInArray(array,item){var index=array.indexOf(item);if(index!==-1)return true;return false;}
function isFalse(value){return value===false;}
function isTrue(value){return value===true;}
function isNumber(value){return typeof(value)==='number';}
function isString(value){return typeof(value)==='string';}
function isFunction(value){return typeof(value)==='function';}
function isObject(value){return typeof(value)==='object';}
Plugin.prototype={init:function(){var self=this;this.AXIS_X=1;this.AXIS_Y=0;this.dataAttributeMap={"next":"pofloor-next","prev":"pofloor-prev","down":"pofloor-down","up":"pofloor-up","left":"pofloor-left","right":"pofloor-right"};this.node=$(this.element);this.nodeChildren=this.node.children(this.options.childType);this.floorActive=(isNumber(this._getFloorFromHash()))?this._getFloorFromHash():this.options.windowsOn;this.NH=this.node.height();this.NW=this.node.width();var androidCompatible=true;var version=navigator.userAgent.match(/Android\s+([\d\.]+)/);if(version)androidCompatible=parseFloat(version[1])>3;this.directionIsArray=isObject(this.options.direction);this.supportTransform=has3d()&&androidCompatible;if(isObject(this.options.pofloorFloorName)&&this.options.pofloorFloorName.length<this.nodeChildren.length){return this._emitConsoleMessage("error","floors total ("+this.nodeChildren.length+") & floor name array length ("+this.options.pofloorFloorName.length+") don't match");}
if(this.directionIsArray&&this.options.direction.length<this.nodeChildren.length){return this._emitConsoleMessage("error","floors total ("+this.nodeChildren.length+") & direction array lenght ("+this.options.direction.length+") don't match");}
this.setup();},setup:function(){this._positionElement();this._bindEvents();this.scrollToFloor(this.floorActive);if(isObject(this.options.pofloorFloorName)){this._updateHash(this.floorActive);}
if(isFunction(this.options.ready))this.options.ready();},_bindEvents:function(){var self=this;this.node.on('scrollToDirection',function(event,direction){self.scrollToDirection(direction);});this.node.on('scrollToStage',function(event,floor){if(typeof floor=='string'){var floorId=$.inArray(floor,self.options.pofloorFloorName);if(floorId!==-1)self.scrollToFloor(floorId);}else if(typeof floor=='number'){if(floor>self.nodeChildren.length)return;self.scrollToFloor(floor);}});this.node.on('next',function(event,floor){var dataAttributeDirection=self.nodeChildren.eq(self.floorActive).data(self.dataAttributeMap.next);if(dataAttributeDirection)return self.scrollToFloor(dataAttributeDirection);self.next();});this.node.on('prev',function(event,floor){var dataAttributeDirection=self.nodeChildren.eq(self.floorActive).data(self.dataAttributeMap.prev);if(dataAttributeDirection)return self.scrollToFloor(dataAttributeDirection);self.prev();});this.node.on('refresh',function(){self.refresh();});this.node.on('remove',function(){self.destroy();});$(window).on('resize.pofloor',function(event){self.scrollToFloor(self.floorActive,false);});if(isObject(this.options.pofloorFloorName)){$(window).on('hashchange.pofloor',function(event){self._hashchangeHandler(event);});}
if(window.DeviceOrientationEvent){$(window).on('orientationchange.pofloor',function(event){self.scrollToFloor(self.floorActive);});}
if(this.options.keyNavigation){$(document).on('keydown.pofloor',function(event){self._keypressHandler(event);});}
if(this.options.wheelNavigation){this.node.on('mousewheel.pofloor DOMMouseScroll.pofloor wheel.pofloor',function(e){setTimeout(function(){if(!self.scrollInChildren)self._handleMouseWheelEvent(e);},10);});this.nodeChildren.on('scroll.pofloor',function(e){self.scrollInChildren=true;if(self.scrollTimeOut)clearTimeout(self.scrollTimeOut);self.scrollTimeOut=setTimeout(function(){self.scrollInChildren=false;},300);});}
if(this.options.swipeNavigation){var touchEvent='touchstart.pofloor touchend.pofloor touchcancel.pofloor';if(this.options.swipeNavigation!=='mobile-only')touchEvent+=' mousedown.pofloor mouseup.pofloor';this.node.on(touchEvent,function(event){self._handleTouchEvent(event);});}},refresh:function(){this.nodeChildren=this.node.children(this.options.childType);this._positionElement();},destroy:function(){this.nodeChildren.off('scroll.pofloor');this.node.off('mousewheel.pofloor DOMMouseScroll.pofloor wheel.pofloor scrollToDirection scrollToStage next prev refresh remove touchstart.pofloor touchend.pofloor mousedown.pofloor mouseup.pofloor touchcancel.pofloor');$(window).off('resize.pofloor hashchange.pofloor orientationchange.pofloor');$(document).off('keydown.pofloor');this.node.css({'position':'','overflow':'','top':'','left':'','width':'','height':''});this.nodeChildren.css({'position':'','overflow':'','top':'','left':'','width':'','height':'','transform':''});this.node.removeData();},_handleMouseWheelEvent:function(event){if(this.node.is(':animated'))return;this.scrollTime=new Date().getTime();if(!this.lastScrollTime||this.scrollTime-this.lastScrollTime>this.options.wheelNavigationDelay){this.lastScrollTime=this.scrollTime;return;}
this.lastScrollTime=this.scrollTime;var deltaY,deltaX,delta;if('detail'in event.originalEvent){deltaY=event.originalEvent.detail*-1;}
if('wheelDelta'in event.originalEvent){deltaY=event.originalEvent.wheelDelta;}
if('wheelDeltaY'in event.originalEvent){deltaY=event.originalEvent.wheelDeltaY;}
if('wheelDeltaX'in event.originalEvent){deltaX=event.originalEvent.wheelDeltaX*-1;}
if('axis'in event.originalEvent&&event.originalEvent.axis===event.originalEvent.HORIZONTAL_AXIS){deltaX=deltaY*-1;deltaY=0;}
delta=deltaY===0?deltaX:deltaY;if('deltaY'in event.originalEvent){deltaY=event.originalEvent.deltaY*-1;delta=deltaY;}
if('deltaX'in event.originalEvent){deltaX=event.originalEvent.deltaX;if(deltaY===0){delta=deltaX*-1;}}
if(Math.abs(deltaX)>Math.abs(deltaY)&&deltaX>0)this.scrollToDirection('left');if(Math.abs(deltaX)>Math.abs(deltaY)&&deltaX<0)this.scrollToDirection('right');if(Math.abs(deltaY)>Math.abs(deltaX)&&deltaY>0)this.scrollToDirection('up');if(Math.abs(deltaY)>Math.abs(deltaX)&&deltaY<0)this.scrollToDirection('down');},_handleTouchEvent:function(event){var self=this;switch(event.type){case'touchstart':case'mousedown':this.touchStartTime=new Date().getTime();this.touchStartX=(event.type=='touchstart')?event.originalEvent.touches[0].pageX:event.pageX;this.touchStartY=(event.type=='touchstart')?event.originalEvent.touches[0].pageY:event.pageY;break;case'touchend':case'touchcancel':case'mouseup':this.touchEndTime=new Date().getTime();this.touchEndX=(event.type=='touchend'||event.type=='touchcancel')?event.originalEvent.changedTouches[0].pageX:event.pageX;this.touchEndY=(event.type=='touchend'||event.type=='touchcancel')?event.originalEvent.changedTouches[0].pageY:event.pageY;var distanceX=this.touchStartX-this.touchEndX;var distanceY=this.touchStartY-this.touchEndY;var duration=this.touchEndTime-this.touchStartTime;var velocityX=Math.abs(distanceX)/duration;var velocityY=Math.abs(distanceY)/duration;if(velocityX>this.options.swipeVelocity&&Math.abs(distanceX)>Math.abs(distanceY)&&distanceX<0)this.scrollToDirection('left');if(velocityX>this.options.swipeVelocity&&Math.abs(distanceX)>Math.abs(distanceY)&&distanceX>0)this.scrollToDirection('right');if(velocityY>this.options.swipeVelocity&&Math.abs(distanceX)<Math.abs(distanceY)&&distanceY<0)this.scrollToDirection('up');if(velocityY>this.options.swipeVelocity&&Math.abs(distanceX)<Math.abs(distanceY)&&distanceY>0)this.scrollToDirection('down');break;}},_positionElement:function(){var self=this;if(this.directionIsArray)this._generateFloorMap();this.node.css({'position':'absolute','overflow':'hidden','top':'0','left':'0','width':this.options.width,'height':this.options.height});this.nodeChildren.css({'position':'absolute','overflow':'auto','top':'0','left':'0','width':'100%','height':'100%'});this.nodeChildren.each(function(index){if(self.supportTransform){$(this).css({'transform':function(){if(self.options.direction==='y')return'translateY('+index*100+'%)';if(self.options.direction==='x')return'translateX('+index*100+'%)';if(self.directionIsArray)return'translateY('+self.options.direction[index][self.AXIS_Y]*100+'%) translateX('+self.options.direction[index][self.AXIS_X]*100+'%)';}});}else{$(this).css({'top':function(){if(self.options.direction==='y')return index*100+'%';if(self.directionIsArray)return self.options.direction[index][self.AXIS_Y]*100+'%';},'left':function(){if(self.options.direction==='x')return index*100+'%';if(self.directionIsArray)return self.options.direction[index][self.AXIS_X]*100+'%';},});}});},_getFloorFromHash:function(){if(this._getHash()){if(this.options.pofloorFloorName&&existInArray(this.options.pofloorFloorName,this._getHash())){return this.options.pofloorFloorName.indexOf(this._getHash());}}
return false;},_getHash:function(){if(window.location.hash){var hash=window.location.hash.split('#').pop();return hash;}
return false;},_hashchangeHandler:function(event){if(isNumber(this._getFloorFromHash())&&this._getFloorFromHash()!==this.floorActive&&!this.node.is(':animated')){this.scrollToFloor(this._getFloorFromHash());}},_updateHash:function(floorIndex){if(isObject(this.options.pofloorFloorName)&&this._getHash()!==this.options.pofloorFloorName[floorIndex]){window.location.replace((''+window.location).split('#')[0]+'#'+this.options.pofloorFloorName[floorIndex]);}},_emitEvent:function(eventName,from,to){this.node.trigger(eventName,floor={from:from,to:to});},_emitConsoleMessage:function(type,warn){if(type=="error")console.error("pofloor.js: "+warn);if(type=="warn")console.warn("pofloor.js: "+warn);},_keypressHandler:function(e){var self=this;var key=e.keyCode||e.which;if(!$('input, textarea, button').is(':focus')){switch(key){case 40:case 83:self.scrollToDirection('down');break;case 38:case 87:self.scrollToDirection('up');break;case 37:case 65:self.scrollToDirection('left');break;case 39:case 68:self.scrollToDirection('right');break;}}},scrollToFloor:function(floor){if(isString(floor)&&existInArray(this.options.pofloorFloorName,floor))floor=this.options.pofloorFloorName.indexOf(floor);var self=this;var animate=(floor===this.floorActive)?false:true;if(this.NW!==this.node.width())this.NW=this.node.width();if(this.NH!==this.node.height())this.NH=this.node.height();var animationObject=this._getAnimationSettings(floor);if(animate){this._emitEvent('scrollStart',self.floorActive,floor);this.node.stop().animate(animationObject.property,self.options.time,self.options.easing,animationObject.callback);}else{this.node.stop().scrollTop(animationObject.defaults.scrollTop).scrollLeft(animationObject.defaults.scrollLeft);}
this.floorActive=floor;this.node.data('current-floor',this.floorActive);},prev:function(){var targetFloor=this.floorActive-1;if(targetFloor<0){if(!this.options.loop)return;targetFloor=this.nodeChildren.length-1;}
this.scrollToFloor(targetFloor);},next:function(){var targetFloor=this.floorActive+1;if(targetFloor>this.nodeChildren.length-1){if(!this.options.loop)return;targetFloor=0;}
this.scrollToFloor(targetFloor);},_getAnimationSettings:function(floor){var self=this;var saveFloorActive=self.floorActive;var animationSettings={property:{},callback:function(){self._emitEvent('scrollEnd',saveFloorActive,floor);self._updateHash(floor);},defaults:{}};var secondAnimationSettings={property:{},callback:function(){self._emitEvent('scrollEnd',saveFloorActive,floor);self._updateHash(floor);}};animationSettings.defaults.scrollTop=floor*self.NH;animationSettings.defaults.scrollLeft=floor*self.NW;if(self.options.direction==='y'){animationSettings.property.scrollTop=floor*self.NH;return animationSettings;}
else if(self.options.direction==='x'){animationSettings.property.scrollLeft=floor*self.NW;return animationSettings;}
else if(self.directionIsArray){var scrollTopValue=self.options.direction[floor][self.AXIS_Y]*self.NH;var scrollLeftValue=self.options.direction[floor][self.AXIS_X]*self.NW;animationSettings.defaults.scrollTop=scrollTopValue;animationSettings.defaults.scrollLeft=scrollLeftValue;if(self.options.queued){var sameXposition=this.node.scrollLeft()===scrollLeftValue;var sameYposition=this.node.scrollTop()===scrollTopValue;if(self.options.queued==='x'&&sameXposition){animationSettings.property.scrollTop=scrollTopValue;return animationSettings;}
else{animationSettings.property.scrollLeft=scrollLeftValue;secondAnimationSettings.property.scrollTop=scrollTopValue;animationSettings.callback=function(){self.node.stop().animate(secondAnimationSettings.property,self.options.time,self.options.easing,secondAnimationSettings.callback);};return animationSettings;}
if(self.options.queued==='y'&&sameYposition){animationSettings.property.scrollLeft=scrollLeftValue;return animationSettings;}
else{animationSettings.property.scrollTop=scrollTopValue;secondAnimationSettings.property.scrollLeft=scrollLeftValue;animationSettings.callback=function(){self.node.stop().animate(secondAnimationSettings.property,self.options.time,self.options.easing,secondAnimationSettings.callback);};return animationSettings;}}
else{animationSettings.property.scrollTop=scrollTopValue;animationSettings.property.scrollLeft=scrollLeftValue;return animationSettings;}}
return animationSettings;},scrollToDirection:function(direction){var self=this;var dataAttributeDirection=this.nodeChildren.eq(this.floorActive).data(this.dataAttributeMap[direction]);if(isNumber(dataAttributeDirection))return self.scrollToFloor(dataAttributeDirection);var directionIsHorizontal=(direction=='right'||direction=='left');var directionIsVertical=(direction=='down'||direction=='up');if((self.options.direction=='y'&&directionIsHorizontal)||(self.options.direction=='x'&&directionIsVertical))return;if((self.options.direction=='y'&&direction=='down')||(self.options.direction=='x'&&direction=='right'))return self.next();if((self.options.direction=='y'&&direction=='up')||(self.options.direction=='x'&&direction=='left'))return self.prev();if(self.directionIsArray){var floorObject=self.floorMap[self.floorActive];var directFloor=floorObject[direction];if(isNumber(directFloor))return self.scrollToFloor(directFloor);var closestFloor=floorObject.closest[direction];if(isTrue(self.options.jump)&&isNumber(closestFloor))return self.scrollToFloor(closestFloor);var furthestFloor=floorObject.furthest[direction];if(isNumber(furthestFloor)&&(isTrue(self.options.loop)||(directionIsHorizontal&&self.options.loop=='loop-x')||(directionIsVertical&&self.options.loop=='loop-y'))){return self.scrollToFloor(furthestFloor);}
var incrementFloor=floorObject.increment[direction];if(isNumber(incrementFloor)){if(self.options.loop=='increment'||directionIsVertical&&self.options.loop=='increment-y'||directionIsHorizontal&&self.options.loop=='increment-x'){return self.scrollToFloor(incrementFloor);}}
if((self.options.loop=='increment-x'&&directionIsHorizontal)||self.options.loop=='increment'){if(self.floorActive==self.floorMap.furthest_x)return self.scrollToFloor(self.floorMap.closest_x);if(self.floorActive==self.floorMap.closest_x)return self.scrollToFloor(self.floorMap.furthest_x);}
if((self.options.loop=='increment-y'&&directionIsVertical)||self.options.loop=='increment'){if(self.floorActive==self.floorMap.furthest_y)return self.scrollToFloor(self.floorMap.closest_y);if(self.floorActive==self.floorMap.closest_y)return self.scrollToFloor(self.floorMap.furthest_y);}}},_getDirectFloorIndex:function(DA,floorIndex,direction){var self=this;var floorTarget=[this.options.direction[floorIndex][this.AXIS_Y],this.options.direction[floorIndex][this.AXIS_X]];if(direction=='right')floorTarget[this.AXIS_X]+=1;if(direction=='left')floorTarget[this.AXIS_X]-=1;if(direction=='up')floorTarget[this.AXIS_Y]-=1;if(direction=='down')floorTarget[this.AXIS_Y]+=1;var floorTargetIndex=false;$.each(DA,function(index,map){if(map[self.AXIS_Y]==floorTarget[self.AXIS_Y]&&map[self.AXIS_X]==floorTarget[self.AXIS_X]){floorTargetIndex=index;return false;}});return floorTargetIndex;},_getAxisFromDirection:function(direction){var self=this;var axis;switch(direction){case'up':case'down':axis=self.AXIS_Y;break;case'left':case'right':axis=self.AXIS_X;break;}
return axis;},_getClosestFloorIndex:function(DA,floorIndex,direction,level){var self=this;level=level||0;var axis=this._getAxisFromDirection(direction);var goal=DA[floorIndex][axis];var oppositeAxis=(axis==this.AXIS_Y)?this.AXIS_X:this.AXIS_Y;var closestIndex=false;var closestMap=false;$.each(DA,function(index,map){if(map[oppositeAxis]==(DA[floorIndex][oppositeAxis]+level)){if(((direction=='right'||direction=='down')&&map[axis]>goal)||((direction=='left'||direction=='up')&&map[axis]<goal)){if(!closestMap||Math.abs(map[axis]-goal)<Math.abs(closestMap[axis])){closestIndex=index;closestMap=map;}}}});return closestIndex;},_getFurthestFloorIndex:function(DA,floorIndex,direction,level){var self=this;level=level||0;var axis=this._getAxisFromDirection(direction);var goal=DA[floorIndex][axis];var oppositeAxis=(axis==this.AXIS_Y)?this.AXIS_X:this.AXIS_Y;var furthestMap=false;var furthestIndex=false;$.each(DA,function(index,map){if(map[oppositeAxis]==(DA[floorIndex][oppositeAxis]+level)){if(!furthestMap||(Math.abs(map[axis]-goal)>Math.abs(furthestMap[axis]-goal))){furthestMap=map;furthestIndex=index;}}});return furthestIndex;},_generateFloorMap:function(){var self=this;this.floorMap=[];var DA=jQuery.grep(self.options.direction,function(directionArray,index){return self.nodeChildren.length>index;});$.each(DA,function(index,floorItem){self.floorMap[index]={'down':self._getDirectFloorIndex(DA,index,'down'),'up':self._getDirectFloorIndex(DA,index,'up'),'right':self._getDirectFloorIndex(DA,index,'right'),'left':self._getDirectFloorIndex(DA,index,'left'),'increment':{'down':self._getFurthestFloorIndex(DA,index,'down',1),'up':self._getFurthestFloorIndex(DA,index,'up',-1),'right':self._getFurthestFloorIndex(DA,index,'right',1),'left':self._getFurthestFloorIndex(DA,index,'left',-1)},'closest':{'down':self._getClosestFloorIndex(DA,index,'down'),'up':self._getClosestFloorIndex(DA,index,'up'),'right':self._getClosestFloorIndex(DA,index,'right'),'left':self._getClosestFloorIndex(DA,index,'left')},'furthest':{'down':self._getFurthestFloorIndex(DA,index,'down'),'up':self._getFurthestFloorIndex(DA,index,'up'),'right':self._getFurthestFloorIndex(DA,index,'right'),'left':self._getFurthestFloorIndex(DA,index,'left')}};});function getFurtherFloorArray(floorArray,axis){var furtherFloor=false;jQuery.each(floorArray,function(index,DA){if(furtherFloor===false||furtherFloor[axis]<DA[axis]){furtherFloor=DA;}});return furtherFloor;}
function getClosestFloorOnAxis(floorArray,axis){var furtherFloor=false;jQuery.each(floorArray,function(index,DA){if(furtherFloor===false||furtherFloor[axis]>DA[axis]){furtherFloor=DA;}});return furtherFloor;}
function getSameAxisFloor(floorItem,axis){return jQuery.grep(DA,function(DA){var isOnSameAxis=DA[axis]==floorItem[axis];return isOnSameAxis;});}
var approximateFurtherX=getFurtherFloorArray(DA,self.AXIS_X);var sameAxisXFurthest=getSameAxisFloor(approximateFurtherX,self.AXIS_X);var furtherY=getFurtherFloorArray(sameAxisXFurthest,self.AXIS_Y);var approximateFurtherY=getFurtherFloorArray(DA,self.AXIS_Y);var sameAxisYFurthest=getSameAxisFloor(approximateFurtherY,self.AXIS_Y);var furtherX=getFurtherFloorArray(sameAxisYFurthest,self.AXIS_X);self.floorMap.furthest_x=DA.indexOf(furtherX);self.floorMap.furthest_y=DA.indexOf(furtherY);var approximateClosestX=getClosestFloorOnAxis(DA,self.AXIS_X);var sameAxisXClosest=getSameAxisFloor(approximateClosestX,self.AXIS_X);var closestY=getClosestFloorOnAxis(sameAxisXClosest,self.AXIS_Y);var approximateClosestY=getClosestFloorOnAxis(DA,self.AXIS_Y);var sameAxisYClosest=getSameAxisFloor(approximateClosestY,self.AXIS_Y);var closestX=getClosestFloorOnAxis(sameAxisYClosest,self.AXIS_X);self.floorMap.closest_x=DA.indexOf(closestX);self.floorMap.closest_y=DA.indexOf(closestY);},};$.fn[pluginName]=function(options){this.each(function(){if(!$.data(this,pluginName)){$.data(this,pluginName,new Plugin(this,options));}});return this;};})(jQuery,window,document);

 /*! form */
;(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
var method,action,url,$form=this;if(typeof options=='function'){options={success:options};}
method=this.attr('method');action=this.attr('action');url=(typeof action==='string')?$.trim(action):'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];}
options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
var traditional=options.traditional;if(traditional===undefined){traditional=$.ajaxSettings.traditional;}
var qx,n,v,a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;qx=$.param(options.data,traditional);}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a,traditional);if(qx){q=(q?(q+'&'+qx):qx);}
if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else{options.data=q;}
var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}
if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden);});}
if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});}
else if(options.success){callbacks.push(options.success);}
options.success=function(data,status,xhr){var context=options.context||options;for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(context,[data,status,xhr||$form,$form]);}};var fileInputs=false
var hasFileInputs=fileInputs.length>0;var mp='multipart/form-data';var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp);var fileAPI=!!(hasFileInputs&&fileInputs.get(0).files&&window.FormData);log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){fileUploadIframe(a);});}
else{fileUploadIframe(a);}}
else if((hasFileInputs||multipart)&&fileAPI){options.progress=options.progress||$.noop;fileUploadXhr(a);}
else{$.ajax(options);}
this.trigger('form-submit-notify',[this,options]);return this;function fileUploadXhr(a){var formdata=new FormData();for(var i=0;i<a.length;i++){if(a[i].type=='file')
continue;formdata.append(a[i].name,a[i].value);}
$form.find('input:file:enabled').each(function(){var name=$(this).attr('name'),files=this.files;if(name){for(var i=0;i<files.length;i++)
formdata.append(name,files[i]);}});if(options.extraData){for(var k in options.extraData)
formdata.append(k,options.extraData[k])}
options.data=null;var s=$.extend(true,{},$.ajaxSettings,options,{contentType:false,processData:false,cache:false,type:'POST'});s.context=s.context||s;s.data=null;var beforeSend=s.beforeSend;s.beforeSend=function(xhr,o){o.data=formdata;if(xhr.upload){xhr.upload.onprogress=function(event){o.progress(event.position,event.total);};}
if(beforeSend)
beforeSend.call(o,xhr,options);};$.ajax(s);}
function fileUploadIframe(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var useProp=!!$.fn.prop;if(a){if(useProp){for(i=0;i<a.length;i++){el=$(form[a[i].name]);el.prop('disabled',false);}}else{for(i=0;i<a.length;i++){el=$(form[a[i].name]);el.removeAttr('disabled');}};}
if($(':input[name=submit],:input[id=submit]',form).length){alert('Error: Form elements must not have name or id of "submit".');return;}
s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id='jqFormIO'+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr('name');if(n==null)
$io.attr('name',id);else
id=n;}
else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />');$io.css({position:'absolute',top:'-1000px',left:'-1000px'});}
io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;$io.attr('src',s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,e,status);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}
if(g){$.event.trigger("ajaxSend",[xhr,s]);}
if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}
return;}
if(xhr.aborted){return;}
sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}}
var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc;}
var csrf_token=$('meta[name=csrf-token]').attr('content');var csrf_param=$('meta[name=csrf-param]').attr('content');if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token;}
function doSubmit(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(!method){form.setAttribute('method','POST');}
if(a!=s.url){form.setAttribute('action',s.url);}
if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);}
function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state.toLowerCase()=='uninitialized')
setTimeout(checkState,50);}
catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);timeoutHandle&&clearTimeout(timeoutHandle);timeoutHandle=undefined;}}
var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){extraInputs.push($('<input type="hidden" name="'+n+'">').attr('value',s.extraData[n]).appendTo(form)[0]);}}
if(!s.iframeTarget){$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);}
setTimeout(checkState,15);form.submit();}
finally{form.setAttribute('action',a);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');}
$(extraInputs).remove();}}
if(s.forceSync){doSubmit();}
else{setTimeout(doSubmit,10);}
var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;}
try{doc=getDoc(io);}
catch(ex){log('cannot access response document: ',ex);e=SERVER_ABORT;}
if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');return;}
else if(e==SERVER_ABORT&&xhr){xhr.abort('server abort');return;}
if(!doc||doc.location.href==s.iframeSrc){if(!timedOut)
return;}
io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var status='success',errMsg;try{if(timedOut){throw'timeout';}
var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body==null||doc.body.innerHTML=='')){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}}
var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml)
s.dataType='xml';xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;}
var dt=(s.dataType||'').toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;}
else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;}
else if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}}
else if(dt=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}
try{data=httpData(xhr,dt,s);}
catch(e){status='parsererror';xhr.error=errMsg=(e||status);}}
catch(e){log('error caught: ',e);status='error';xhr.error=errMsg=(e||status);}
if(xhr.aborted){log('upload aborted');status=null;}
if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';}
if(status==='success'){s.success&&s.success.call(s.context,data,'success',xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}
else if(status){if(errMsg==undefined)
errMsg=xhr.statusText;s.error&&s.error.call(s.context,xhr,status,errMsg);g&&$.event.trigger("ajaxError",[xhr,s,errMsg]);}
g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&! --$.active){$.event.trigger("ajaxStop");}
s.complete&&s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout)
clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget)
$io.remove();xhr.responseXML=null;},100);}
var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else{doc=(new DOMParser()).parseFromString(s,'text/xml');}
return(doc&&doc.documentElement&&doc.documentElement.nodeName!='parsererror')?doc:null;};var parseJSON=$.parseJSON||function(s){return window['eval']('('+s+')');};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=type==='xml'||!type&&ct.indexOf('xml')>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){$.error&&$.error('parsererror');}
if(s&&s.dataFilter){data=s.dataFilter(data,type);}
if(typeof data==='string'){if(type==='json'||!type&&ct.indexOf('json')>=0){data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}}
return data;};}};$.fn.ajaxForm=function(options){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
return this.ajaxFormUnbind().bind('submit.form-plugin',function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options);}}).bind('click.form-plugin',function(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length==0){return;}
target=t[0];}
var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic){var a=[];if(this.length===0){return a;}
var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els){return a;}
var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}
if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}
continue;}
v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}
else if(v!==null&&typeof v!='undefined'){a.push({name:n,value:v,type:el.type});}}
if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}
var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}
else if(v!==null&&typeof v!='undefined'){a.push({name:this.name,value:v});}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length)){continue;}
v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(successful===undefined){successful=true;}
if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1)){return null;}
if(tag=='select'){var index=el.selectedIndex;if(index<0){return null;}
var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;}
if(one){return v;}
a.push(v);}}
return a;}
return $(el).val();};$.fn.clearForm=function(includeHidden){return this.each(function(){$('input,select,textarea',this).clearFields(includeHidden);});};$.fn.clearFields=$.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=='textarea'||(includeHidden&&/hidden/.test(t))){this.value='';}
else if(t=='checkbox'||t=='radio'){this.checked=false;}
else if(tag=='select'){this.selectedIndex=-1;}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}
return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select===undefined){select=true;}
return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio'){this.checked=select;}
else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
this.selected=select;}});};$.fn.ajaxSubmit.debug=false;function log(){if(!$.fn.ajaxSubmit.debug)
return;var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log){window.console.log(msg);}
else if(window.opera&&window.opera.postError){window.opera.postError(msg);}};})(jQuery);
 /*! countdown */
!function(e){"use strict";function t(t,l){this.$element=t,this.settings=e.extend({},s,l),this._defaults=s,this._name=n,this._serverDate=null,this._javaScriptDate=null,this.currentDate=null,this.targetDate=null,this.days=null,this.hours=null,this.minutes=null,this.seconds=null,this.deciseconds=null,this.milliseconds=null,this.daysLabel=null,this.hoursLabel=null,this.minutesLabel=null,this.secondsLabel=null,this.decisecondsLabel=null,this.millisecondsLabel=null,this._intervalId=null,this._wrapsExists={},this._oldValues={},this._changed=!1,this.init()}var n="countEverest",s={day:1,month:1,year:2050,hour:0,minute:0,second:0,millisecond:0,timeZone:null,countUp:!1,currentDateTime:null,daysWrapper:".ce-days",hoursWrapper:".ce-hours",minutesWrapper:".ce-minutes",secondsWrapper:".ce-seconds",decisecondsWrapper:".ce-dseconds",millisecondsWrapper:".ce-mseconds",daysLabelWrapper:".ce-days-label",hoursLabelWrapper:".ce-hours-label",minutesLabelWrapper:".ce-minutes-label",secondsLabelWrapper:".ce-seconds-label",decisecondsLabelWrapper:".ce-dseconds-label",millisecondsLabelWrapper:".ce-mseconds-label",singularLabels:!1,daysLabel:"Days",dayLabel:"Day",hoursLabel:"Hours",hourLabel:"Hour",minutesLabel:"Minutes",minuteLabel:"Minute",secondsLabel:"Seconds",secondLabel:"Second",decisecondsLabel:"Deciseconds",decisecondLabel:"Decisecond",millisecondsLabel:"Milliseconds",millisecondLabel:"Millisecond",timeout:1e3,highspeedTimeout:4,leftHandZeros:!0,wrapDigits:!0,wrapDigitsTag:"span",dayInMilliseconds:864e5,hourInMilliseconds:36e5,minuteInMilliseconds:6e4,secondInMilliseconds:1e3,decisecondInMilliseconds:100,onInit:null,beforeCalculation:null,afterCalculation:null,onChange:null,onComplete:null};t.prototype={init:function(){var t=this,n=t.$element,s=t.settings;(e(n).find(s.decisecondsWrapper).length>0||e(n).find(s.millisecondsWrapper).length>0)&&(s.timeout=s.highspeedTimeout),null!=s.currentDateTime&&t.setCurrentDate(s.currentDateTime),e.isFunction(s.onInit)&&s.onInit.call(t),t._intervalId=setInterval(function(){t.calculate()},s.timeout),t.calculate()},calculate:function(){var t=this,n=t.settings,s=n.dayInMilliseconds,l=n.hourInMilliseconds,i=n.minuteInMilliseconds,a=n.secondInMilliseconds,r=n.decisecondInMilliseconds,o=!1;t._changed=!1,t.setTargetDate(new Date(n.year,n.month-1,n.day,n.hour,n.minute,n.second)),e.isFunction(n.beforeCalculation)&&n.beforeCalculation.call(t);var u=t.getCurrentDate(),c=t.getTargetDate(),d=u.getTime(),h=null===n.timeZone?0:(c.getTimezoneOffset()/60+n.timeZone)*n.hourInMilliseconds,m=c.getTime()-h,p=m-d,g=p;t.currentDate=u;var b=t.round(g/s);g%=s;var f=t.round(g/l);g%=l;var L=t.round(g/i);g%=i;var D=t.round(g/a),v=g%a,_=t.round(v/r);0==n.countUp?(b=t.naturalNum(b),f=t.naturalNum(f),L=t.naturalNum(L),D=t.naturalNum(D),v=t.naturalNum(v),_=t.naturalNum(_)):(b=-1*b,f=-1*f,L=-1*L,D=-1*D,v=-1*v,_=-1*_),t.days=b,t.hours=f,t.minutes=L,t.seconds=D,t.milliseconds=v,t.deciseconds=_,t.format(),t.output(),Math.floor(p/n.timeout)<=0&&0==n.countUp&&(o=!0,(null!=n.millisecondsWrapper||null!=n.decisecondsWrapper)&&(o=0>=p?!0:!1)),1==o&&(e.isFunction(n.onComplete)&&n.onComplete.call(t),clearInterval(t._intervalId)),e.isFunction(n.afterCalculation)&&n.afterCalculation.call(t)},format:function(){var e=this,t=e.settings,n=t.singularLabels,s=e.days,l=e.hours,i=e.minutes,a=e.seconds,r=e.deciseconds,o=e.milliseconds,u=t.dayLabel,c=t.hourLabel,d=t.minuteLabel,h=t.secondLabel,m=t.decisecondLabel,p=t.millisecondsLabel;1==t.leftHandZeros&&(e.days=e.strPad(s,2),e.hours=e.strPad(l,2),e.minutes=e.strPad(i,2),e.seconds=e.strPad(a,2),e.milliseconds=e.strPad(o,3)),e.daysLabel=1==s&&null!==u&&1==n?u:t.daysLabel,e.hoursLabel=1==l&&null!==c&&1==n?c:t.hoursLabel,e.minutesLabel=1==i&&null!==d&&1==n?d:t.minutesLabel,e.secondsLabel=1==a&&null!==h&&1==n?h:t.secondsLabel,e.decisecondsLabel=1==r&&null!==m&&1==n?m:t.decisecondsLabel,e.millisecondsLabel=1==o&&null!==p&&1==n?p:t.millisecondsLabel},output:function(){var t=this,n=t.settings;t.writeLabelToDom(n.daysLabelWrapper,t.daysLabel),t.writeLabelToDom(n.hoursLabelWrapper,t.hoursLabel),t.writeLabelToDom(n.minutesLabelWrapper,t.minutesLabel),t.writeLabelToDom(n.secondsLabelWrapper,t.secondsLabel),t.writeLabelToDom(n.decisecondsLabelWrapper,t.decisecondsLabel),t.writeLabelToDom(n.millisecondsLabelWrapper,t.millisecondsLabel),t.writeDigitsToDom(n.daysWrapper,t.days,"ce-days-digit"),t.writeDigitsToDom(n.hoursWrapper,t.hours,"ce-hours-digit"),t.writeDigitsToDom(n.minutesWrapper,t.minutes,"ce-minutes-digit"),t.writeDigitsToDom(n.secondsWrapper,t.seconds,"ce-seconds-digit"),t.writeDigitsToDom(n.decisecondsWrapper,t.deciseconds,"ce-dseconds-digit"),t.writeDigitsToDom(n.millisecondsWrapper,t.milliseconds,"ce-mseconds-digit"),e.isFunction(n.onChange)&&1==t._changed&&n.onChange.call(t)},pause:function(){var e=this,t=e._intervalId;t&&clearInterval(t)},resume:function(){var e=this,t=e.settings;e._intervalId=setInterval(function(){e.calculate()},t.timeout)},destroy:function(){var e=this,t=e._intervalId;t&&clearInterval(t)},getOption:function(e){return this.settings[e]},setOption:function(e,t){this.settings[e]=t,"currentDateTime"==e&&this.setCurrentDate(t)},setTargetDate:function(e){this.targetDate=e},getTargetDate:function(){return this.targetDate},setCurrentDate:function(e){this._serverDate=new Date(e),this._javaScriptDate=new Date},getCurrentDate:function(){var e,t,n=this,s=n.settings;return null!=s.currentDateTime?(e=n._serverDate-n._javaScriptDate,t=(new Date).getTime(),new Date(t+e)):new Date},round:function(e){return 0==this.settings.countUp?Math.floor(e):Math.ceil(e)},naturalNum:function(e){return 0>e?0:e},strPad:function(e,t,n){var s=e.toString();for(n||(n="0");s.length<t;)s=n+s;return s},writeLabelToDom:function(t,n){var s=this,l=e(s.$element);null==s._wrapsExists[t]&&(s._wrapsExists[t]=l.find(t).length>0?!0:!1),s._oldValues[t]!=n&&s._wrapsExists[t]&&(s._oldValues[t]=n,l.find(t).text(n),s._changed=!0)},writeDigitsToDom:function(t,n,s){var l,i,a=this,r=a.settings,o=r.wrapDigitsTag,u=e(a.$element),c=u.find(t),n=n.toString(),d=[];if(null==a._wrapsExists[t]&&(a._wrapsExists[t]=c.length>0?!0:!1),0==a._wrapsExists[t])return!1;if(1==r.wrapDigits)for(var h=0;h<n.length;h++)d[h]=n[h];else d[0]=n;if("undefined"==typeof a._oldValues[t]&&(a._oldValues[t]=[]),a._oldValues[t].length>d.length){i=a._oldValues[t].length-d.length,l=c.find(o),l.slice(0,i).remove(),l=c.find(o);for(var h=0;h<d.length;h++)l.eq(h).text(d[h]);a._changed=!0}if(a._oldValues[t].length<d.length){if(0==r.wrapDigits)c.text(d[0]);else{0==a._oldValues[t].length&&c.text("");for(var m="",h=0;h<d.length;h++)i=d.length-a._oldValues[t].length,i>h?m+="<"+o+' class="'+s+'">'+d[h]+"</"+o+">":(l=c.find(o),l.eq(h-i).text(d[h]));c.prepend(m)}a._changed=!0}if(a._oldValues[t].length==d.length)if(0==r.wrapDigits)a._oldValues[t][0]!=d[0]&&(c.text(d[0]),a._changed=!0);else for(var h=0;h<d.length;h++)a._oldValues[t][h]!=d[h]&&(l=c.find(o),l.eq(h).text(d[h]),a._changed=!0);a._oldValues[t]=[];for(var h=0;h<d.length;h++)a._oldValues[t][h]=d[h]}},e.fn[n]=function(s,l,i){var a=null,r=this.each(function(){var r=null;if(e.data(this,n)){if(r=e.data(this,n),"destroy"===s)return r.destroy(),e.data(this,n,null),void 0;var o=r[s];return"function"==typeof o&&(a=o.call(r,l,i)),!1}r=new t(this,s),e.data(this,n,r)});return a?a:r}}(jQuery,window,document);
 /*! scroll */
 (function(e){"function"===typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){var y=!1,C=!1,J=5E3,K=2E3,x=0,F=["ms","moz","webkit","o"],s=window.requestAnimationFrame||!1,v=window.cancelAnimationFrame||!1;if(!s)for(var L in F){var D=F[L];s||(s=window[D+"RequestAnimationFrame"]);v||(v=window[D+"CancelAnimationFrame"]||window[D+"CancelRequestAnimationFrame"])}var z=window.MutationObserver||window.WebKitMutationObserver||!1,G={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",
cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!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:0.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=document.getElementsByTagName("script"),e=e[e.length-1].src.split("?")[0];return 0<e.split("/").length?e.split("/").slice(0,-1).join("/")+"/":""}()},E=!1,M=function(){if(E)return E;
var e=document.createElement("DIV"),b={haspointerlock:"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document};b.isopera="opera"in window;b.isopera12=b.isopera&&"getUserMedia"in navigator;b.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini);b.isie="all"in document&&"attachEvent"in e&&!b.isopera;b.isieold=b.isie&&!("msInterpolationMode"in e.style);b.isie7=b.isie&&!b.isieold&&(!("documentMode"in document)||7==document.documentMode);
b.isie8=b.isie&&"documentMode"in document&&8==document.documentMode;b.isie9=b.isie&&"performance"in window&&9<=document.documentMode;b.isie10=b.isie&&"performance"in window&&10<=document.documentMode;b.isie9mobile=/iemobile.9/i.test(navigator.userAgent);b.isie9mobile&&(b.isie9=!1);b.isie7mobile=!b.isie9mobile&&b.isie7&&/iemobile/i.test(navigator.userAgent);b.ismozilla="MozAppearance"in e.style;b.iswebkit="WebkitAppearance"in e.style;b.ischrome="chrome"in window;b.ischrome22=b.ischrome&&b.haspointerlock;
b.ischrome26=b.ischrome&&"transition"in e.style;b.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window;b.hasmstouch=window.navigator.msPointerEnabled||!1;b.ismac=/^mac$/i.test(navigator.platform);b.isios=b.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform);b.isios4=b.isios&&!("seal"in Object);b.isandroid=/android/i.test(navigator.userAgent);b.trstyle=!1;b.hastransform=!1;b.hastranslate3d=!1;b.transitionstyle=!1;b.hastransition=!1;b.transitionend=!1;for(var h=["transform",
"msTransform","webkitTransform","MozTransform","OTransform"],k=0;k<h.length;k++)if("undefined"!=typeof e.style[h[k]]){b.trstyle=h[k];break}b.hastransform=!1!=b.trstyle;b.hastransform&&(e.style[b.trstyle]="translate3d(1px,2px,3px)",b.hastranslate3d=/translate3d/.test(e.style[b.trstyle]));b.transitionstyle=!1;b.prefixstyle="";b.transitionend=!1;for(var h="transition webkitTransition MozTransition OTransition OTransition msTransition KhtmlTransition".split(" "),l=" -webkit- -moz- -o- -o -ms- -khtml-".split(" "),
q="transitionend webkitTransitionEnd transitionend otransitionend oTransitionEnd msTransitionEnd KhtmlTransitionEnd".split(" "),k=0;k<h.length;k++)if(h[k]in e.style){b.transitionstyle=h[k];b.prefixstyle=l[k];b.transitionend=q[k];break}b.ischrome26&&(b.prefixstyle=l[1]);b.hastransition=b.transitionstyle;a:{h=["-moz-grab","-webkit-grab","grab"];if(b.ischrome&&!b.ischrome22||b.isie)h=[];for(k=0;k<h.length;k++)if(l=h[k],e.style.cursor=l,e.style.cursor==l){h=l;break a}h="url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize"}b.cursorgrabvalue=
h;b.hasmousecapture="setCapture"in e;b.hasMutationObserver=!1!==z;return E=b},N=function(g,b){function h(){var c=a.win;if("zIndex"in c)return c.zIndex();for(;0<c.length&&9!=c[0].nodeType;){var b=c.css("zIndex");if(!isNaN(b)&&0!=b)return parseInt(b);c=c.parent()}return!1}function k(c,b,f){b=c.css(b);c=parseFloat(b);return isNaN(c)?(c=w[b]||0,f=3==c?f?a.win.outerHeight()-a.win.innerHeight():a.win.outerWidth()-a.win.innerWidth():1,a.isie8&&c&&(c+=1),f?c:0):c}function l(c,b,f,e){a._bind(c,b,function(a){a=
a?a:window.event;var e={original:a,target:a.target||a.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==a.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){a.preventDefault?a.preventDefault():a.returnValue=!1;return!1},stopImmediatePropagation:function(){a.stopImmediatePropagation?a.stopImmediatePropagation():a.cancelBubble=!0}};"mousewheel"==b?(e.deltaY=-0.025*a.wheelDelta,a.wheelDeltaX&&(e.deltaX=-0.025*a.wheelDeltaX)):e.deltaY=a.detail;return f.call(c,e)},e)}function q(c,b,f){var e,d;
0==c.deltaMode?(e=-Math.floor(c.deltaX*(a.opt.mousescrollstep/54)),d=-Math.floor(c.deltaY*(a.opt.mousescrollstep/54))):1==c.deltaMode&&(e=-Math.floor(c.deltaX*a.opt.mousescrollstep),d=-Math.floor(c.deltaY*a.opt.mousescrollstep));b&&(a.opt.oneaxismousemode&&0==e&&d)&&(e=d,d=0);e&&(a.scrollmom&&a.scrollmom.stop(),a.lastdeltax+=e,a.debounced("mousewheelx",function(){var c=a.lastdeltax;a.lastdeltax=0;a.rail.drag||a.doScrollLeftBy(c)},15));if(d){if(a.opt.nativeparentscrolling&&f&&!a.ispage&&!a.zoomactive)if(0>
d){if(a.getScrollTop()>=a.page.maxh)return!0}else if(0>=a.getScrollTop())return!0;a.scrollmom&&a.scrollmom.stop();a.lastdeltay+=d;a.debounced("mousewheely",function(){var c=a.lastdeltay;a.lastdeltay=0;a.rail.drag||a.doScrollBy(c)},15)}c.stopImmediatePropagation();return c.preventDefault()}var a=this;this.version="3.5.4";this.name="nicescroll";this.me=b;this.opt={doc:e("body"),win:!1};e.extend(this.opt,G);this.opt.snapbackspeed=80;if(g)for(var p in a.opt)"undefined"!=typeof g[p]&&(a.opt[p]=g[p]);this.iddoc=
(this.doc=a.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(a.opt.win?a.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==a.opt.win;this.win=a.opt.win||(this.ispage?e(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win;this.body=e("body");this.iframe=this.isfixed=this.viewport=!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"!=a.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.isrtlmode=!1;do this.id="ascrail"+K++;while(document.getElementById(this.id));this.hasmousefocus=
this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1;this.visibility=!0;this.hidden=this.locked=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=a.opt.overflowx;this.overflowy=a.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=M();var d=e.extend({},this.detected);this.ishwscroll=(this.canhwscroll=d.hastransform&&a.opt.hwacceleration)&&
a.haswrapper;this.istouchcapable=!1;d.cantouch&&(d.ischrome&&!d.isios&&!d.isandroid)&&(this.istouchcapable=!0,d.cantouch=!1);d.cantouch&&(d.ismozilla&&!d.isios&&!d.isandroid)&&(this.istouchcapable=!0,d.cantouch=!1);a.opt.enablemouselockapi||(d.hasmousecapture=!1,d.haspointerlock=!1);this.delayed=function(c,b,f,e){var d=a.delaylist[c],h=(new Date).getTime();if(!e&&d&&d.tt)return!1;d&&d.tt&&clearTimeout(d.tt);if(d&&d.last+f>h&&!d.tt)a.delaylist[c]={last:h+f,tt:setTimeout(function(){a&&(a.delaylist[c].tt=
0,b.call())},f)};else if(!d||!d.tt)a.delaylist[c]={last:h,tt:0},setTimeout(function(){b.call()},0)};this.debounced=function(c,b,f){var d=a.delaylist[c];(new Date).getTime();a.delaylist[c]=b;d||setTimeout(function(){var b=a.delaylist[c];a.delaylist[c]=!1;b.call()},f)};var r=!1;this.synched=function(c,b){a.synclist[c]=b;(function(){r||(s(function(){r=!1;for(c in a.synclist){var b=a.synclist[c];b&&b.call(a);a.synclist[c]=!1}}),r=!0)})();return c};this.unsynched=function(c){a.synclist[c]&&(a.synclist[c]=
!1)};this.css=function(c,b){for(var f in b)a.saved.css.push([c,f,c.css(f)]),c.css(f,b[f])};this.scrollTop=function(c){return"undefined"==typeof c?a.getScrollTop():a.setScrollTop(c)};this.scrollLeft=function(c){return"undefined"==typeof c?a.getScrollLeft():a.setScrollLeft(c)};BezierClass=function(a,b,f,d,e,h,k){this.st=a;this.ed=b;this.spd=f;this.p1=d||0;this.p2=e||1;this.p3=h||0;this.p4=k||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(a){return 3*a*a*(1-
a)},B3:function(a){return 3*a*(1-a)*(1-a)},B4:function(a){return(1-a)*(1-a)*(1-a)},getNow:function(){var a=1-((new Date).getTime()-this.ts)/this.spd,b=this.B2(a)+this.B3(a)+this.B4(a);return 0>a?this.ed:this.st+Math.round(this.df*b)},update:function(a,b){this.st=this.getNow();this.ed=a;this.spd=b;this.ts=(new Date).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};d.hastranslate3d&&d.isios&&this.doc.css("-webkit-backface-visibility",
"hidden");var t=function(){var c=a.doc.css(d.trstyle);return c&&"matrix"==c.substr(0,6)?c.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1};this.getScrollTop=function(c){if(!c){if(c=t())return 16==c.length?-c[13]:-c[5];if(a.timerscroll&&a.timerscroll.bz)return a.timerscroll.bz.getNow()}return a.doc.translate.y};this.getScrollLeft=function(c){if(!c){if(c=t())return 16==c.length?-c[12]:-c[4];if(a.timerscroll&&a.timerscroll.bh)return a.timerscroll.bh.getNow()}return a.doc.translate.x};
this.notifyScrollEvent=document.createEvent?function(a){var b=document.createEvent("UIEvents");b.initUIEvent("scroll",!1,!0,window,1);a.dispatchEvent(b)}:document.fireEvent?function(a){var b=document.createEventObject();a.fireEvent("onscroll");b.cancelBubble=!0}:function(a,b){};d.hastranslate3d&&a.opt.enabletranslate3d?(this.setScrollTop=function(c,b){a.doc.translate.y=c;a.doc.translate.ty=-1*c+"px";a.doc.css(d.trstyle,"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");b||a.notifyScrollEvent(a.win[0])},
this.setScrollLeft=function(c,b){a.doc.translate.x=c;a.doc.translate.tx=-1*c+"px";a.doc.css(d.trstyle,"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");b||a.notifyScrollEvent(a.win[0])}):(this.setScrollTop=function(c,b){a.doc.translate.y=c;a.doc.translate.ty=-1*c+"px";a.doc.css(d.trstyle,"translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");b||a.notifyScrollEvent(a.win[0])},this.setScrollLeft=function(c,b){a.doc.translate.x=c;a.doc.translate.tx=-1*c+"px";a.doc.css(d.trstyle,
"translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");b||a.notifyScrollEvent(a.win[0])})}else this.getScrollTop=function(){return a.docscroll.scrollTop()},this.setScrollTop=function(c){return a.docscroll.scrollTop(c)},this.getScrollLeft=function(){return a.docscroll.scrollLeft()},this.setScrollLeft=function(c){return a.docscroll.scrollLeft(c)};this.getTarget=function(a){return!a?!1:a.target?a.target:a.srcElement?a.srcElement:!1};this.hasParent=function(a,b){if(!a)return!1;for(var f=a.target||
a.srcElement||a||!1;f&&f.id!=b;)f=f.parentNode||!1;return!1!==f};var w={thin:1,medium:3,thick:5};this.getOffset=function(){if(a.isfixed)return{top:parseFloat(a.win.css("top")),left:parseFloat(a.win.css("left"))};if(!a.viewport)return a.win.offset();var c=a.win.offset(),b=a.viewport.offset();return{top:c.top-b.top+a.viewport.scrollTop(),left:c.left-b.left+a.viewport.scrollLeft()}};this.updateScrollBar=function(c){if(a.ishwscroll)a.rail.css({height:a.win.innerHeight()}),a.railh&&a.railh.css({width:a.win.innerWidth()});
else{var b=a.getOffset(),f=b.top,d=b.left,f=f+k(a.win,"border-top-width",!0);a.win.outerWidth();a.win.innerWidth();var d=d+(a.rail.align?a.win.outerWidth()-k(a.win,"border-right-width")-a.rail.width:k(a.win,"border-left-width")),e=a.opt.railoffset;e&&(e.top&&(f+=e.top),a.rail.align&&e.left&&(d+=e.left));a.locked||a.rail.css({top:f,left:d,height:c?c.h:a.win.innerHeight()});a.zoom&&a.zoom.css({top:f+1,left:1==a.rail.align?d-20:d+a.rail.width+4});a.railh&&!a.locked&&(f=b.top,d=b.left,c=a.railh.align?
f+k(a.win,"border-top-width",!0)+a.win.innerHeight()-a.railh.height:f+k(a.win,"border-top-width",!0),d+=k(a.win,"border-left-width"),a.railh.css({top:c,left:d,width:a.railh.width}))}};this.doRailClick=function(c,b,f){var d;a.locked||(a.cancelEvent(c),b?(b=f?a.doScrollLeft:a.doScrollTop,d=f?(c.pageX-a.railh.offset().left-a.cursorwidth/2)*a.scrollratio.x:(c.pageY-a.rail.offset().top-a.cursorheight/2)*a.scrollratio.y,b(d)):(b=f?a.doScrollLeftBy:a.doScrollBy,d=f?a.scroll.x:a.scroll.y,c=f?c.pageX-a.railh.offset().left:
c.pageY-a.rail.offset().top,f=f?a.view.w:a.view.h,d>=c?b(f):b(-f)))};a.hasanimationframe=s;a.hascancelanimationframe=v;a.hasanimationframe?a.hascancelanimationframe||(v=function(){a.cancelAnimationFrame=!0}):(s=function(a){return setTimeout(a,15-Math.floor(+new Date/1E3)%16)},v=clearInterval);this.init=function(){a.saved.css=[];if(d.isie7mobile||d.isoperamini)return!0;d.hasmstouch&&a.css(a.ispage?e("html"):a.win,{"-ms-touch-action":"none"});a.zindex="auto";a.zindex=!a.ispage&&"auto"==a.opt.zindex?
h()||"auto":a.opt.zindex;!a.ispage&&"auto"!=a.zindex&&a.zindex>x&&(x=a.zindex);a.isie&&(0==a.zindex&&"auto"==a.opt.zindex)&&(a.zindex="auto");if(!a.ispage||!d.cantouch&&!d.isieold&&!d.isie9mobile){var c=a.docscroll;a.ispage&&(c=a.haswrapper?a.win:a.doc);d.isie9mobile||a.css(c,{"overflow-y":"hidden"});a.ispage&&d.isie7&&("BODY"==a.doc[0].nodeName?a.css(e("html"),{"overflow-y":"hidden"}):"HTML"==a.doc[0].nodeName&&a.css(e("body"),{"overflow-y":"hidden"}));d.isios&&(!a.ispage&&!a.haswrapper)&&a.css(e("body"),
{"-webkit-overflow-scrolling":"touch"});var b=e(document.createElement("div"));b.css({position:"relative",top:0,"float":"right",width:a.opt.cursorwidth,height:"0px","background-color":a.opt.cursorcolor,border:a.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,"border-radius":a.opt.cursorborderradius});b.hborder=parseFloat(b.outerHeight()-b.innerHeight());a.cursor=b;var f=e(document.createElement("div"));
f.attr("id",a.id);f.addClass("nicescroll-rails");var u,k,g=["left","right"],l;for(l in g)k=g[l],(u=a.opt.railpadding[k])?f.css("padding-"+k,u+"px"):a.opt.railpadding[k]=0;f.append(b);f.width=Math.max(parseFloat(a.opt.cursorwidth),b.outerWidth())+a.opt.railpadding.left+a.opt.railpadding.right;f.css({width:f.width+"px",zIndex:a.zindex,background:a.opt.background,cursor:"default"});f.visibility=!0;f.scrollable=!0;f.align="left"==a.opt.railalign?0:1;a.rail=f;b=a.rail.drag=!1;a.opt.boxzoom&&(!a.ispage&&
!d.isieold)&&(b=document.createElement("div"),a.bind(b,"click",a.doZoom),a.zoom=e(b),a.zoom.css({cursor:"pointer","z-index":a.zindex,backgroundImage:"url("+a.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),a.opt.dblclickzoom&&a.bind(a.win,"dblclick",a.doZoom),d.cantouch&&a.opt.gesturezoom&&(a.ongesturezoom=function(c){1.5<c.scale&&a.doZoomIn(c);0.8>c.scale&&a.doZoomOut(c);return a.cancelEvent(c)},a.bind(a.win,"gestureend",a.ongesturezoom)));a.railh=!1;if(a.opt.horizrailenabled){a.css(c,
{"overflow-x":"hidden"});b=e(document.createElement("div"));b.css({position:"relative",top:0,height:a.opt.cursorwidth,width:"0px","background-color":a.opt.cursorcolor,border:a.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,"border-radius":a.opt.cursorborderradius});b.wborder=parseFloat(b.outerWidth()-b.innerWidth());a.cursorh=b;var m=e(document.createElement("div"));m.attr("id",a.id+"-hr");m.addClass("nicescroll-rails");
m.height=Math.max(parseFloat(a.opt.cursorwidth),b.outerHeight());m.css({height:m.height+"px",zIndex:a.zindex,background:a.opt.background});m.append(b);m.visibility=!0;m.scrollable=!0;m.align="top"==a.opt.railvalign?0:1;a.railh=m;a.railh.drag=!1}a.ispage?(f.css({position:"fixed",top:"0px",height:"100%"}),f.align?f.css({right:"0px"}):f.css({left:"0px"}),a.body.append(f),a.railh&&(m.css({position:"fixed",left:"0px",width:"100%"}),m.align?m.css({bottom:"0px"}):m.css({top:"0px"}),a.body.append(m))):(a.ishwscroll?
("static"==a.win.css("position")&&a.css(a.win,{position:"relative"}),c="HTML"==a.win[0].nodeName?a.body:a.win,a.zoom&&(a.zoom.css({position:"absolute",top:1,right:0,"margin-right":f.width+4}),c.append(a.zoom)),f.css({position:"absolute",top:0}),f.align?f.css({right:0}):f.css({left:0}),c.append(f),m&&(m.css({position:"absolute",left:0,bottom:0}),m.align?m.css({bottom:0}):m.css({top:0}),c.append(m))):(a.isfixed="fixed"==a.win.css("position"),c=a.isfixed?"fixed":"absolute",a.isfixed||(a.viewport=a.getViewport(a.win[0])),
a.viewport&&(a.body=a.viewport,!1==/fixed|relative|absolute/.test(a.viewport.css("position"))&&a.css(a.viewport,{position:"relative"})),f.css({position:c}),a.zoom&&a.zoom.css({position:c}),a.updateScrollBar(),a.body.append(f),a.zoom&&a.body.append(a.zoom),a.railh&&(m.css({position:c}),a.body.append(m))),d.isios&&a.css(a.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),d.isie&&a.opt.disableoutline&&a.win.attr("hideFocus","true"),d.iswebkit&&a.opt.disableoutline&&
a.win.css({outline:"none"}));!1===a.opt.autohidemode?(a.autohidedom=!1,a.rail.css({opacity:a.opt.cursoropacitymax}),a.railh&&a.railh.css({opacity:a.opt.cursoropacitymax})):!0===a.opt.autohidemode||"leave"===a.opt.autohidemode?(a.autohidedom=e().add(a.rail),d.isie8&&(a.autohidedom=a.autohidedom.add(a.cursor)),a.railh&&(a.autohidedom=a.autohidedom.add(a.railh)),a.railh&&d.isie8&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"scroll"==a.opt.autohidemode?(a.autohidedom=e().add(a.rail),a.railh&&(a.autohidedom=
a.autohidedom.add(a.railh))):"cursor"==a.opt.autohidemode?(a.autohidedom=e().add(a.cursor),a.railh&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"hidden"==a.opt.autohidemode&&(a.autohidedom=!1,a.hide(),a.locked=!1);if(d.isie9mobile)a.scrollmom=new H(a),a.onmangotouch=function(c){c=a.getScrollTop();var b=a.getScrollLeft();if(c==a.scrollmom.lastscrolly&&b==a.scrollmom.lastscrollx)return!0;var f=c-a.mangotouch.sy,d=b-a.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(d,2)+Math.pow(f,2)))){var n=0>
f?-1:1,e=0>d?-1:1,h=+new Date;a.mangotouch.lazy&&clearTimeout(a.mangotouch.lazy);80<h-a.mangotouch.tm||a.mangotouch.dry!=n||a.mangotouch.drx!=e?(a.scrollmom.stop(),a.scrollmom.reset(b,c),a.mangotouch.sy=c,a.mangotouch.ly=c,a.mangotouch.sx=b,a.mangotouch.lx=b,a.mangotouch.dry=n,a.mangotouch.drx=e,a.mangotouch.tm=h):(a.scrollmom.stop(),a.scrollmom.update(a.mangotouch.sx-d,a.mangotouch.sy-f),a.mangotouch.tm=h,f=Math.max(Math.abs(a.mangotouch.ly-c),Math.abs(a.mangotouch.lx-b)),a.mangotouch.ly=c,a.mangotouch.lx=
b,2<f&&(a.mangotouch.lazy=setTimeout(function(){a.mangotouch.lazy=!1;a.mangotouch.dry=0;a.mangotouch.drx=0;a.mangotouch.tm=0;a.scrollmom.doMomentum(30)},100)))}},f=a.getScrollTop(),m=a.getScrollLeft(),a.mangotouch={sy:f,ly:f,dry:0,sx:m,lx:m,drx:0,lazy:!1,tm:0},a.bind(a.docscroll,"scroll",a.onmangotouch);else{if(d.cantouch||a.istouchcapable||a.opt.touchbehavior||d.hasmstouch){a.scrollmom=new H(a);a.ontouchstart=function(c){if(c.pointerType&&2!=c.pointerType)return!1;a.hasmoving=!1;if(!a.locked){if(d.hasmstouch)for(var b=
c.target?c.target:!1;b;){var f=e(b).getNiceScroll();if(0<f.length&&f[0].me==a.me)break;if(0<f.length)return!1;if("DIV"==b.nodeName&&b.id==a.id)break;b=b.parentNode?b.parentNode:!1}a.cancelScroll();if((b=a.getTarget(c))&&/INPUT/i.test(b.nodeName)&&/range/i.test(b.type))return a.stopPropagation(c);!("clientX"in c)&&"changedTouches"in c&&(c.clientX=c.changedTouches[0].clientX,c.clientY=c.changedTouches[0].clientY);a.forcescreen&&(f=c,c={original:c.original?c.original:c},c.clientX=f.screenX,c.clientY=
f.screenY);a.rail.drag={x:c.clientX,y:c.clientY,sx:a.scroll.x,sy:a.scroll.y,st:a.getScrollTop(),sl:a.getScrollLeft(),pt:2,dl:!1};if(a.ispage||!a.opt.directionlockdeadzone)a.rail.drag.dl="f";else{var f=e(window).width(),n=e(window).height(),h=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),k=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),n=Math.max(0,k-n),f=Math.max(0,h-f);a.rail.drag.ck=!a.rail.scrollable&&a.railh.scrollable?0<n?"v":!1:a.rail.scrollable&&
!a.railh.scrollable?0<f?"h":!1:!1;a.rail.drag.ck||(a.rail.drag.dl="f")}a.opt.touchbehavior&&(a.isiframe&&d.isie)&&(f=a.win.position(),a.rail.drag.x+=f.left,a.rail.drag.y+=f.top);a.hasmoving=!1;a.lastmouseup=!1;a.scrollmom.reset(c.clientX,c.clientY);if(!d.cantouch&&!this.istouchcapable&&!d.hasmstouch){if(!b||!/INPUT|SELECT|TEXTAREA/i.test(b.nodeName))return!a.ispage&&d.hasmousecapture&&b.setCapture(),a.opt.touchbehavior?(b.onclick&&!b._onclick&&(b._onclick=b.onclick,b.onclick=function(c){if(a.hasmoving)return!1;
b._onclick.call(this,c)}),a.cancelEvent(c)):a.stopPropagation(c);/SUBMIT|CANCEL|BUTTON/i.test(e(b).attr("type"))&&(pc={tg:b,click:!1},a.preventclick=pc)}}};a.ontouchend=function(c){if(c.pointerType&&2!=c.pointerType)return!1;if(a.rail.drag&&2==a.rail.drag.pt&&(a.scrollmom.doMomentum(),a.rail.drag=!1,a.hasmoving&&(a.lastmouseup=!0,a.hideCursor(),d.hasmousecapture&&document.releaseCapture(),!d.cantouch)))return a.cancelEvent(c)};var q=a.opt.touchbehavior&&a.isiframe&&!d.hasmousecapture;a.ontouchmove=
function(c,b){if(c.pointerType&&2!=c.pointerType)return!1;if(a.rail.drag&&2==a.rail.drag.pt){if(d.cantouch&&"undefined"==typeof c.original)return!0;a.hasmoving=!0;a.preventclick&&!a.preventclick.click&&(a.preventclick.click=a.preventclick.tg.onclick||!1,a.preventclick.tg.onclick=a.onpreventclick);c=e.extend({original:c},c);"changedTouches"in c&&(c.clientX=c.changedTouches[0].clientX,c.clientY=c.changedTouches[0].clientY);if(a.forcescreen){var f=c;c={original:c.original?c.original:c};c.clientX=f.screenX;
c.clientY=f.screenY}f=ofy=0;if(q&&!b){var n=a.win.position(),f=-n.left;ofy=-n.top}var h=c.clientY+ofy,n=h-a.rail.drag.y,k=c.clientX+f,u=k-a.rail.drag.x,g=a.rail.drag.st-n;a.ishwscroll&&a.opt.bouncescroll?0>g?g=Math.round(g/2):g>a.page.maxh&&(g=a.page.maxh+Math.round((g-a.page.maxh)/2)):(0>g&&(h=g=0),g>a.page.maxh&&(g=a.page.maxh,h=0));if(a.railh&&a.railh.scrollable){var l=a.rail.drag.sl-u;a.ishwscroll&&a.opt.bouncescroll?0>l?l=Math.round(l/2):l>a.page.maxw&&(l=a.page.maxw+Math.round((l-a.page.maxw)/
2)):(0>l&&(k=l=0),l>a.page.maxw&&(l=a.page.maxw,k=0))}f=!1;if(a.rail.drag.dl)f=!0,"v"==a.rail.drag.dl?l=a.rail.drag.sl:"h"==a.rail.drag.dl&&(g=a.rail.drag.st);else{var n=Math.abs(n),u=Math.abs(u),m=a.opt.directionlockdeadzone;if("v"==a.rail.drag.ck){if(n>m&&u<=0.3*n)return a.rail.drag=!1,!0;u>m&&(a.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==a.rail.drag.ck){if(u>m&&n<=0.3*u)return a.rail.drag=!1,!0;n>m&&(a.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}a.synched("touchmove",
function(){a.rail.drag&&2==a.rail.drag.pt&&(a.prepareTransition&&a.prepareTransition(0),a.rail.scrollable&&a.setScrollTop(g),a.scrollmom.update(k,h),a.railh&&a.railh.scrollable?(a.setScrollLeft(l),a.showCursor(g,l)):a.showCursor(g),d.isie10&&document.selection.clear())});d.ischrome&&a.istouchcapable&&(f=!1);if(f)return a.cancelEvent(c)}}}a.onmousedown=function(c,b){if(!(a.rail.drag&&1!=a.rail.drag.pt)){if(a.locked)return a.cancelEvent(c);a.cancelScroll();a.rail.drag={x:c.clientX,y:c.clientY,sx:a.scroll.x,
sy:a.scroll.y,pt:1,hr:!!b};var f=a.getTarget(c);!a.ispage&&d.hasmousecapture&&f.setCapture();a.isiframe&&!d.hasmousecapture&&(a.saved.csspointerevents=a.doc.css("pointer-events"),a.css(a.doc,{"pointer-events":"none"}));a.hasmoving=!1;return a.cancelEvent(c)}};a.onmouseup=function(c){if(a.rail.drag&&(d.hasmousecapture&&document.releaseCapture(),a.isiframe&&!d.hasmousecapture&&a.doc.css("pointer-events",a.saved.csspointerevents),1==a.rail.drag.pt))return a.rail.drag=!1,a.hasmoving&&a.triggerScrollEnd(),
a.cancelEvent(c)};a.onmousemove=function(c){if(a.rail.drag&&1==a.rail.drag.pt){if(d.ischrome&&0==c.which)return a.onmouseup(c);a.cursorfreezed=!0;a.hasmoving=!0;if(a.rail.drag.hr){a.scroll.x=a.rail.drag.sx+(c.clientX-a.rail.drag.x);0>a.scroll.x&&(a.scroll.x=0);var b=a.scrollvaluemaxw;a.scroll.x>b&&(a.scroll.x=b)}else a.scroll.y=a.rail.drag.sy+(c.clientY-a.rail.drag.y),0>a.scroll.y&&(a.scroll.y=0),b=a.scrollvaluemax,a.scroll.y>b&&(a.scroll.y=b);a.synched("mousemove",function(){a.rail.drag&&1==a.rail.drag.pt&&
(a.showCursor(),a.rail.drag.hr?a.doScrollLeft(Math.round(a.scroll.x*a.scrollratio.x),a.opt.cursordragspeed):a.doScrollTop(Math.round(a.scroll.y*a.scrollratio.y),a.opt.cursordragspeed))});return a.cancelEvent(c)}};if(d.cantouch||a.opt.touchbehavior)a.onpreventclick=function(c){if(a.preventclick)return a.preventclick.tg.onclick=a.preventclick.click,a.preventclick=!1,a.cancelEvent(c)},a.bind(a.win,"mousedown",a.ontouchstart),a.onclick=d.isios?!1:function(c){return a.lastmouseup?(a.lastmouseup=!1,a.cancelEvent(c)):
!0},a.opt.grabcursorenabled&&d.cursorgrabvalue&&(a.css(a.ispage?a.doc:a.win,{cursor:d.cursorgrabvalue}),a.css(a.rail,{cursor:d.cursorgrabvalue}));else{var p=function(c){if(a.selectiondrag){if(c){var b=a.win.outerHeight();c=c.pageY-a.selectiondrag.top;0<c&&c<b&&(c=0);c>=b&&(c-=b);a.selectiondrag.df=c}0!=a.selectiondrag.df&&(a.doScrollBy(2*-Math.floor(a.selectiondrag.df/6)),a.debounced("doselectionscroll",function(){p()},50))}};a.hasTextSelected="getSelection"in document?function(){return 0<document.getSelection().rangeCount}:
"selection"in document?function(){return"None"!=document.selection.type}:function(){return!1};a.onselectionstart=function(c){a.ispage||(a.selectiondrag=a.win.offset())};a.onselectionend=function(c){a.selectiondrag=!1};a.onselectiondrag=function(c){a.selectiondrag&&a.hasTextSelected()&&a.debounced("selectionscroll",function(){p(c)},250)}}d.hasmstouch&&(a.css(a.rail,{"-ms-touch-action":"none"}),a.css(a.cursor,{"-ms-touch-action":"none"}),a.bind(a.win,"MSPointerDown",a.ontouchstart),a.bind(document,
"MSPointerUp",a.ontouchend),a.bind(document,"MSPointerMove",a.ontouchmove),a.bind(a.cursor,"MSGestureHold",function(a){a.preventDefault()}),a.bind(a.cursor,"contextmenu",function(a){a.preventDefault()}));this.istouchcapable&&(a.bind(a.win,"touchstart",a.ontouchstart),a.bind(document,"touchend",a.ontouchend),a.bind(document,"touchcancel",a.ontouchend),a.bind(document,"touchmove",a.ontouchmove));a.bind(a.cursor,"mousedown",a.onmousedown);a.bind(a.cursor,"mouseup",a.onmouseup);a.railh&&(a.bind(a.cursorh,
"mousedown",function(c){a.onmousedown(c,!0)}),a.bind(a.cursorh,"mouseup",a.onmouseup));if(a.opt.cursordragontouch||!d.cantouch&&!a.opt.touchbehavior)a.rail.css({cursor:"default"}),a.railh&&a.railh.css({cursor:"default"}),a.jqbind(a.rail,"mouseenter",function(){if(!a.win.is(":visible"))return!1;a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.rail,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.rail,"click",function(c){a.doRailClick(c,
!1,!1)}),a.bind(a.rail,"dblclick",function(c){a.doRailClick(c,!0,!1)}),a.bind(a.cursor,"click",function(c){a.cancelEvent(c)}),a.bind(a.cursor,"dblclick",function(c){a.cancelEvent(c)})),a.railh&&(a.jqbind(a.railh,"mouseenter",function(){if(!a.win.is(":visible"))return!1;a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.railh,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.railh,"click",function(c){a.doRailClick(c,!1,!0)}),a.bind(a.railh,
"dblclick",function(c){a.doRailClick(c,!0,!0)}),a.bind(a.cursorh,"click",function(c){a.cancelEvent(c)}),a.bind(a.cursorh,"dblclick",function(c){a.cancelEvent(c)})));!d.cantouch&&!a.opt.touchbehavior?(a.bind(d.hasmousecapture?a.win:document,"mouseup",a.onmouseup),a.bind(document,"mousemove",a.onmousemove),a.onclick&&a.bind(document,"click",a.onclick),!a.ispage&&a.opt.enablescrollonselection&&(a.bind(a.win[0],"mousedown",a.onselectionstart),a.bind(document,"mouseup",a.onselectionend),a.bind(a.cursor,
"mouseup",a.onselectionend),a.cursorh&&a.bind(a.cursorh,"mouseup",a.onselectionend),a.bind(document,"mousemove",a.onselectiondrag)),a.zoom&&(a.jqbind(a.zoom,"mouseenter",function(){a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.zoom,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}))):(a.bind(d.hasmousecapture?a.win:document,"mouseup",a.ontouchend),a.bind(document,"mousemove",a.ontouchmove),a.onclick&&a.bind(document,"click",a.onclick),a.opt.cursordragontouch&&
(a.bind(a.cursor,"mousedown",a.onmousedown),a.bind(a.cursor,"mousemove",a.onmousemove),a.cursorh&&a.bind(a.cursorh,"mousedown",function(c){a.onmousedown(c,!0)}),a.cursorh&&a.bind(a.cursorh,"mousemove",a.onmousemove)));a.opt.enablemousewheel&&(a.isiframe||a.bind(d.isie&&a.ispage?document:a.win,"mousewheel",a.onmousewheel),a.bind(a.rail,"mousewheel",a.onmousewheel),a.railh&&a.bind(a.railh,"mousewheel",a.onmousewheelhr));!a.ispage&&(!d.cantouch&&!/HTML|^BODY/.test(a.win[0].nodeName))&&(a.win.attr("tabindex")||
a.win.attr({tabindex:J++}),a.jqbind(a.win,"focus",function(c){y=a.getTarget(c).id||!0;a.hasfocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"blur",function(c){y=!1;a.hasfocus=!1}),a.jqbind(a.win,"mouseenter",function(c){C=a.getTarget(c).id||!0;a.hasmousefocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"mouseleave",function(){C=!1;a.hasmousefocus=!1;a.rail.drag||a.hideCursor()}))}a.onkeypress=function(c){if(a.locked&&0==a.page.maxh)return!0;c=c?c:window.e;var b=a.getTarget(c);
if(b&&/INPUT|TEXTAREA|SELECT|OPTION/.test(b.nodeName)&&(!b.getAttribute("type")&&!b.type||!/submit|button|cancel/i.tp)||e(b).attr("contenteditable"))return!0;if(a.hasfocus||a.hasmousefocus&&!y||a.ispage&&!y&&!C){b=c.keyCode;if(a.locked&&27!=b)return a.cancelEvent(c);var f=c.ctrlKey||!1,n=c.shiftKey||!1,d=!1;switch(b){case 38:case 63233:a.doScrollBy(72);d=!0;break;case 40:case 63235:a.doScrollBy(-72);d=!0;break;case 37:case 63232:a.railh&&(f?a.doScrollLeft(0):a.doScrollLeftBy(72),d=!0);break;case 39:case 63234:a.railh&&
(f?a.doScrollLeft(a.page.maxw):a.doScrollLeftBy(-72),d=!0);break;case 33:case 63276:a.doScrollBy(a.view.h);d=!0;break;case 34:case 63277:a.doScrollBy(-a.view.h);d=!0;break;case 36:case 63273:a.railh&&f?a.doScrollPos(0,0):a.doScrollTo(0);d=!0;break;case 35:case 63275:a.railh&&f?a.doScrollPos(a.page.maxw,a.page.maxh):a.doScrollTo(a.page.maxh);d=!0;break;case 32:a.opt.spacebarenabled&&(n?a.doScrollBy(a.view.h):a.doScrollBy(-a.view.h),d=!0);break;case 27:a.zoomactive&&(a.doZoom(),d=!0)}if(d)return a.cancelEvent(c)}};
a.opt.enablekeyboard&&a.bind(document,d.isopera&&!d.isopera12?"keypress":"keydown",a.onkeypress);a.bind(document,"keydown",function(c){c.ctrlKey&&(a.wheelprevented=!0)});a.bind(document,"keyup",function(c){c.ctrlKey||(a.wheelprevented=!1)});a.bind(window,"resize",a.lazyResize);a.bind(window,"orientationchange",a.lazyResize);a.bind(window,"load",a.lazyResize);if(d.ischrome&&!a.ispage&&!a.haswrapper){var r=a.win.attr("style"),f=parseFloat(a.win.css("width"))+1;a.win.css("width",f);a.synched("chromefix",
function(){a.win.attr("style",r)})}a.onAttributeChange=function(c){a.lazyResize(250)};!a.ispage&&!a.haswrapper&&(!1!==z?(a.observer=new z(function(c){c.forEach(a.onAttributeChange)}),a.observer.observe(a.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),a.observerremover=new z(function(c){c.forEach(function(c){if(0<c.removedNodes.length)for(var b in c.removedNodes)if(c.removedNodes[b]==a.win[0])return a.remove()})}),a.observerremover.observe(a.win[0].parentNode,{childList:!0,characterData:!1,
attributes:!1,subtree:!1})):(a.bind(a.win,d.isie&&!d.isie9?"propertychange":"DOMAttrModified",a.onAttributeChange),d.isie9&&a.win[0].attachEvent("onpropertychange",a.onAttributeChange),a.bind(a.win,"DOMNodeRemoved",function(c){c.target==a.win[0]&&a.remove()})));!a.ispage&&a.opt.boxzoom&&a.bind(window,"resize",a.resizeZoom);a.istextarea&&a.bind(a.win,"mouseup",a.lazyResize);a.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var I=function(c){a.iframexd=!1;try{var b="contentDocument"in this?this.contentDocument:
this.contentWindow.document}catch(f){a.iframexd=!0,b=!1}if(a.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;a.forcescreen=!0;a.isiframe&&(a.iframe={doc:e(b),html:a.doc.contents().find("html")[0],body:a.doc.contents().find("body")[0]},a.getContentSize=function(){return{w:Math.max(a.iframe.html.scrollWidth,a.iframe.body.scrollWidth),h:Math.max(a.iframe.html.scrollHeight,a.iframe.body.scrollHeight)}},a.docscroll=e(a.iframe.body));!d.isios&&(a.opt.iframeautoresize&&
!a.isiframe)&&(a.win.scrollTop(0),a.doc.height(""),c=Math.max(b.getElementsByTagName("html")[0].scrollHeight,b.body.scrollHeight),a.doc.height(c));a.lazyResize(30);d.isie7&&a.css(e(a.iframe.html),{"overflow-y":"hidden"});a.css(e(a.iframe.body),{"overflow-y":"hidden"});d.isios&&a.haswrapper&&a.css(e(b.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?a.bind(this.contentWindow,"scroll",a.onscroll):a.bind(b,"scroll",a.onscroll);a.opt.enablemousewheel&&a.bind(b,"mousewheel",a.onmousewheel);
a.opt.enablekeyboard&&a.bind(b,d.isopera?"keypress":"keydown",a.onkeypress);if(d.cantouch||a.opt.touchbehavior)a.bind(b,"mousedown",a.ontouchstart),a.bind(b,"mousemove",function(c){a.ontouchmove(c,!0)}),a.opt.grabcursorenabled&&d.cursorgrabvalue&&a.css(e(b.body),{cursor:d.cursorgrabvalue});a.bind(b,"mouseup",a.ontouchend);a.zoom&&(a.opt.dblclickzoom&&a.bind(b,"dblclick",a.doZoom),a.ongesturezoom&&a.bind(b,"gestureend",a.ongesturezoom))};this.doc[0].readyState&&"complete"==this.doc[0].readyState&&
setTimeout(function(){I.call(a.doc[0],!1)},500);a.bind(this.doc,"load",I)}};this.showCursor=function(c,b){a.cursortimeout&&(clearTimeout(a.cursortimeout),a.cursortimeout=0);if(a.rail){a.autohidedom&&(a.autohidedom.stop().css({opacity:a.opt.cursoropacitymax}),a.cursoractive=!0);if(!a.rail.drag||1!=a.rail.drag.pt)"undefined"!=typeof c&&!1!==c&&(a.scroll.y=Math.round(1*c/a.scrollratio.y)),"undefined"!=typeof b&&(a.scroll.x=Math.round(1*b/a.scrollratio.x));a.cursor.css({height:a.cursorheight,top:a.scroll.y});
a.cursorh&&(!a.rail.align&&a.rail.visibility?a.cursorh.css({width:a.cursorwidth,left:a.scroll.x+a.rail.width}):a.cursorh.css({width:a.cursorwidth,left:a.scroll.x}),a.cursoractive=!0);a.zoom&&a.zoom.stop().css({opacity:a.opt.cursoropacitymax})}};this.hideCursor=function(c){!a.cursortimeout&&(a.rail&&a.autohidedom&&!(a.hasmousefocus&&"leave"==a.opt.autohidemode))&&(a.cursortimeout=setTimeout(function(){if(!a.rail.active||!a.showonmouseevent)a.autohidedom.stop().animate({opacity:a.opt.cursoropacitymin}),
a.zoom&&a.zoom.stop().animate({opacity:a.opt.cursoropacitymin}),a.cursoractive=!1;a.cursortimeout=0},c||a.opt.hidecursordelay))};this.noticeCursor=function(c,b,f){a.showCursor(b,f);a.rail.active||a.hideCursor(c)};this.getContentSize=a.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:a.haswrapper?function(){return{w:a.doc.outerWidth()+parseInt(a.win.css("paddingLeft"))+
parseInt(a.win.css("paddingRight")),h:a.doc.outerHeight()+parseInt(a.win.css("paddingTop"))+parseInt(a.win.css("paddingBottom"))}}:function(){return{w:a.docscroll[0].scrollWidth,h:a.docscroll[0].scrollHeight}};this.onResize=function(c,b){if(!a||!a.win)return!1;if(!a.haswrapper&&!a.ispage){if("none"==a.win.css("display"))return a.visibility&&a.hideRail().hideRailHr(),!1;!a.hidden&&!a.visibility&&a.showRail().showRailHr()}var f=a.page.maxh,d=a.page.maxw,e=a.view.w;a.view={w:a.ispage?a.win.width():parseInt(a.win[0].clientWidth),
h:a.ispage?a.win.height():parseInt(a.win[0].clientHeight)};a.page=b?b:a.getContentSize();a.page.maxh=Math.max(0,a.page.h-a.view.h);a.page.maxw=Math.max(0,a.page.w-a.view.w);if(a.page.maxh==f&&a.page.maxw==d&&a.view.w==e){if(a.ispage)return a;f=a.win.offset();if(a.lastposition&&(d=a.lastposition,d.top==f.top&&d.left==f.left))return a;a.lastposition=f}0==a.page.maxh?(a.hideRail(),a.scrollvaluemax=0,a.scroll.y=0,a.scrollratio.y=0,a.cursorheight=0,a.setScrollTop(0),a.rail.scrollable=!1):a.rail.scrollable=
!0;0==a.page.maxw?(a.hideRailHr(),a.scrollvaluemaxw=0,a.scroll.x=0,a.scrollratio.x=0,a.cursorwidth=0,a.setScrollLeft(0),a.railh.scrollable=!1):a.railh.scrollable=!0;a.locked=0==a.page.maxh&&0==a.page.maxw;if(a.locked)return a.ispage||a.updateScrollBar(a.view),!1;!a.hidden&&!a.visibility?a.showRail().showRailHr():!a.hidden&&!a.railh.visibility&&a.showRailHr();a.istextarea&&(a.win.css("resize")&&"none"!=a.win.css("resize"))&&(a.view.h-=20);a.cursorheight=Math.min(a.view.h,Math.round(a.view.h*(a.view.h/
a.page.h)));a.cursorheight=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,a.cursorheight);a.cursorwidth=Math.min(a.view.w,Math.round(a.view.w*(a.view.w/a.page.w)));a.cursorwidth=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,a.cursorwidth);a.scrollvaluemax=a.view.h-a.cursorheight-a.cursor.hborder;a.railh&&(a.railh.width=0<a.page.maxh?a.view.w-a.rail.width:a.view.w,a.scrollvaluemaxw=a.railh.width-a.cursorwidth-a.cursorh.wborder);a.ispage||
a.updateScrollBar(a.view);a.scrollratio={x:a.page.maxw/a.scrollvaluemaxw,y:a.page.maxh/a.scrollvaluemax};a.getScrollTop()>a.page.maxh?a.doScrollTop(a.page.maxh):(a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y)),a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)),a.cursoractive&&a.noticeCursor());a.scroll.y&&0==a.getScrollTop()&&a.doScrollTo(Math.floor(a.scroll.y*a.scrollratio.y));return a};this.resize=a.onResize;this.lazyResize=function(c){c=isNaN(c)?30:c;a.delayed("resize",a.resize,
c);return a};this._bind=function(c,b,f,d){a.events.push({e:c,n:b,f:f,b:d,q:!1});c.addEventListener?c.addEventListener(b,f,d||!1):c.attachEvent?c.attachEvent("on"+b,f):c["on"+b]=f};this.jqbind=function(c,b,f){a.events.push({e:c,n:b,f:f,q:!0});e(c).bind(b,f)};this.bind=function(c,b,f,e){var h="jquery"in c?c[0]:c;"mousewheel"==b?"onwheel"in a.win?a._bind(h,"wheel",f,e||!1):(c="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",l(h,c,f,e||!1),"DOMMouseScroll"==c&&l(h,"MozMousePixelScroll",
f,e||!1)):h.addEventListener?(d.cantouch&&/mouseup|mousedown|mousemove/.test(b)&&a._bind(h,"mousedown"==b?"touchstart":"mouseup"==b?"touchend":"touchmove",function(a){if(a.touches){if(2>a.touches.length){var c=a.touches.length?a.touches[0]:a;c.original=a;f.call(this,c)}}else a.changedTouches&&(c=a.changedTouches[0],c.original=a,f.call(this,c))},e||!1),a._bind(h,b,f,e||!1),d.cantouch&&"mouseup"==b&&a._bind(h,"touchcancel",f,e||!1)):a._bind(h,b,function(c){if((c=c||window.event||!1)&&c.srcElement)c.target=
c.srcElement;"pageY"in c||(c.pageX=c.clientX+document.documentElement.scrollLeft,c.pageY=c.clientY+document.documentElement.scrollTop);return!1===f.call(h,c)||!1===e?a.cancelEvent(c):!0})};this._unbind=function(a,b,f,d){a.removeEventListener?a.removeEventListener(b,f,d):a.detachEvent?a.detachEvent("on"+b,f):a["on"+b]=!1};this.unbindAll=function(){for(var c=0;c<a.events.length;c++){var b=a.events[c];b.q?b.e.unbind(b.n,b.f):a._unbind(b.e,b.n,b.f,b.b)}};this.cancelEvent=function(a){a=a.original?a.original:
a?a:window.event||!1;if(!a)return!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();a.preventManipulation&&a.preventManipulation();a.cancelBubble=!0;a.cancel=!0;return a.returnValue=!1};this.stopPropagation=function(a){a=a.original?a.original:a?a:window.event||!1;if(!a)return!1;if(a.stopPropagation)return a.stopPropagation();a.cancelBubble&&(a.cancelBubble=!0);return!1};this.showRail=function(){if(0!=a.page.maxh&&(a.ispage||"none"!=a.win.css("display")))a.visibility=!0,
a.rail.visibility=!0,a.rail.css("display","block");return a};this.showRailHr=function(){if(!a.railh)return a;if(0!=a.page.maxw&&(a.ispage||"none"!=a.win.css("display")))a.railh.visibility=!0,a.railh.css("display","block");return a};this.hideRail=function(){a.visibility=!1;a.rail.visibility=!1;a.rail.css("display","none");return a};this.hideRailHr=function(){if(!a.railh)return a;a.railh.visibility=!1;a.railh.css("display","none");return a};this.show=function(){a.hidden=!1;a.locked=!1;return a.showRail().showRailHr()};
this.hide=function(){a.hidden=!0;a.locked=!0;return a.hideRail().hideRailHr()};this.toggle=function(){return a.hidden?a.show():a.hide()};this.remove=function(){a.stop();a.cursortimeout&&clearTimeout(a.cursortimeout);a.doZoomOut();a.unbindAll();d.isie9&&a.win[0].detachEvent("onpropertychange",a.onAttributeChange);!1!==a.observer&&a.observer.disconnect();!1!==a.observerremover&&a.observerremover.disconnect();a.events=null;a.cursor&&a.cursor.remove();a.cursorh&&a.cursorh.remove();a.rail&&a.rail.remove();
a.railh&&a.railh.remove();a.zoom&&a.zoom.remove();for(var c=0;c<a.saved.css.length;c++){var b=a.saved.css[c];b[0].css(b[1],"undefined"==typeof b[2]?"":b[2])}a.saved=!1;a.me.data("__nicescroll","");var f=e.nicescroll;f.each(function(c){if(this&&this.id===a.id){delete f[c];for(var b=++c;b<f.length;b++,c++)f[c]=f[b];f.length--;f.length&&delete f[f.length]}});for(var h in a)a[h]=null,delete a[h];a=null};this.scrollstart=function(c){this.onscrollstart=c;return a};this.scrollend=function(c){this.onscrollend=
c;return a};this.scrollcancel=function(c){this.onscrollcancel=c;return a};this.zoomin=function(c){this.onzoomin=c;return a};this.zoomout=function(c){this.onzoomout=c;return a};this.isScrollable=function(a){a=a.target?a.target:a;if("OPTION"==a.nodeName)return!0;for(;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var b=e(a),b=b.css("overflowY")||b.css("overflowX")||b.css("overflow")||"";if(/scroll|auto/.test(b))return a.clientHeight!=a.scrollHeight;a=a.parentNode?a.parentNode:!1}return!1};this.getViewport=
function(a){for(a=a&&a.parentNode?a.parentNode:!1;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var b=e(a);if(/fixed|absolute/.test(b.css("position")))return b;var f=b.css("overflowY")||b.css("overflowX")||b.css("overflow")||"";if(/scroll|auto/.test(f)&&a.clientHeight!=a.scrollHeight||0<b.getNiceScroll().length)return b;a=a.parentNode?a.parentNode:!1}return a?e(a):!1};this.triggerScrollEnd=function(){if(a.onscrollend){var c=a.getScrollLeft(),b=a.getScrollTop();a.onscrollend.call(a,{type:"scrollend",
current:{x:c,y:b},end:{x:c,y:b}})}};this.onmousewheel=function(c){if(!a.wheelprevented){if(a.locked)return a.debounced("checkunlock",a.resize,250),!0;if(a.rail.drag)return a.cancelEvent(c);"auto"==a.opt.oneaxismousemode&&0!=c.deltaX&&(a.opt.oneaxismousemode=!1);if(a.opt.oneaxismousemode&&0==c.deltaX&&!a.rail.scrollable)return a.railh&&a.railh.scrollable?a.onmousewheelhr(c):!0;var b=+new Date,f=!1;a.opt.preservenativescrolling&&a.checkarea+600<b&&(a.nativescrollingarea=a.isScrollable(c),f=!0);a.checkarea=
b;if(a.nativescrollingarea)return!0;if(c=q(c,!1,f))a.checkarea=0;return c}};this.onmousewheelhr=function(c){if(!a.wheelprevented){if(a.locked||!a.railh.scrollable)return!0;if(a.rail.drag)return a.cancelEvent(c);var b=+new Date,f=!1;a.opt.preservenativescrolling&&a.checkarea+600<b&&(a.nativescrollingarea=a.isScrollable(c),f=!0);a.checkarea=b;return a.nativescrollingarea?!0:a.locked?a.cancelEvent(c):q(c,!0,f)}};this.stop=function(){a.cancelScroll();a.scrollmon&&a.scrollmon.stop();a.cursorfreezed=!1;
a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.noticeCursor();return a};this.getTransitionSpeed=function(b){var d=Math.round(10*a.opt.scrollspeed);b=Math.min(d,Math.round(b/20*a.opt.scrollspeed));return 20<b?b:0};a.opt.smoothscroll?a.ishwscroll&&d.hastransition&&a.opt.usetransition?(this.prepareTransition=function(b,e){var f=e?20<b?b:0:a.getTransitionSpeed(b),h=f?d.prefixstyle+"transform "+f+"ms ease-out":"";if(!a.lasttransitionstyle||a.lasttransitionstyle!=h)a.lasttransitionstyle=
h,a.doc.css(d.transitionstyle,h);return f},this.doScrollLeft=function(b,d){var f=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,f,d)},this.doScrollTop=function(b,d){var f=a.scrollrunning?a.newscrollx:a.getScrollLeft();a.doScrollPos(f,b,d)},this.doScrollPos=function(b,e,f){var h=a.getScrollTop(),g=a.getScrollLeft();(0>(a.newscrolly-h)*(e-h)||0>(a.newscrollx-g)*(b-g))&&a.cancelScroll();!1==a.opt.bouncescroll&&(0>e?e=0:e>a.page.maxh&&(e=a.page.maxh),0>b?b=0:b>a.page.maxw&&(b=a.page.maxw));
if(a.scrollrunning&&b==a.newscrollx&&e==a.newscrolly)return!1;a.newscrolly=e;a.newscrollx=b;a.newscrollspeed=f||!1;if(a.timer)return!1;a.timer=setTimeout(function(){var f=a.getScrollTop(),h=a.getScrollLeft(),g,k;g=b-h;k=e-f;g=Math.round(Math.sqrt(Math.pow(g,2)+Math.pow(k,2)));g=a.newscrollspeed&&1<a.newscrollspeed?a.newscrollspeed:a.getTransitionSpeed(g);a.newscrollspeed&&1>=a.newscrollspeed&&(g*=a.newscrollspeed);a.prepareTransition(g,!0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);
0<g&&(!a.scrollrunning&&a.onscrollstart&&a.onscrollstart.call(a,{type:"scrollstart",current:{x:h,y:f},request:{x:b,y:e},end:{x:a.newscrollx,y:a.newscrolly},speed:g}),d.transitionend?a.scrollendtrapped||(a.scrollendtrapped=!0,a.bind(a.doc,d.transitionend,a.onScrollTransitionEnd,!1)):(a.scrollendtrapped&&clearTimeout(a.scrollendtrapped),a.scrollendtrapped=setTimeout(a.onScrollTransitionEnd,g)),a.timerscroll={bz:new BezierClass(f,a.newscrolly,g,0,0,0.58,1),bh:new BezierClass(h,a.newscrollx,g,0,0,0.58,
1)},a.cursorfreezed||(a.timerscroll.tm=setInterval(function(){a.showCursor(a.getScrollTop(),a.getScrollLeft())},60)));a.synched("doScroll-set",function(){a.timer=0;a.scrollendtrapped&&(a.scrollrunning=!0);a.setScrollTop(a.newscrolly);a.setScrollLeft(a.newscrollx);if(!a.scrollendtrapped)a.onScrollTransitionEnd()})},50)},this.cancelScroll=function(){if(!a.scrollendtrapped)return!0;var b=a.getScrollTop(),e=a.getScrollLeft();a.scrollrunning=!1;d.transitionend||clearTimeout(d.transitionend);a.scrollendtrapped=
!1;a._unbind(a.doc,d.transitionend,a.onScrollTransitionEnd);a.prepareTransition(0);a.setScrollTop(b);a.railh&&a.setScrollLeft(e);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;a.cursorfreezed=!1;a.showCursor(b,e);return a},this.onScrollTransitionEnd=function(){a.scrollendtrapped&&a._unbind(a.doc,d.transitionend,a.onScrollTransitionEnd);a.scrollendtrapped=!1;a.prepareTransition(0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;var b=
a.getScrollTop(),e=a.getScrollLeft();a.setScrollTop(b);a.railh&&a.setScrollLeft(e);a.noticeCursor(!1,b,e);a.cursorfreezed=!1;0>b?b=0:b>a.page.maxh&&(b=a.page.maxh);0>e?e=0:e>a.page.maxw&&(e=a.page.maxw);if(b!=a.newscrolly||e!=a.newscrollx)return a.doScrollPos(e,b,a.opt.snapbackspeed);a.onscrollend&&a.scrollrunning&&a.triggerScrollEnd();a.scrollrunning=!1}):(this.doScrollLeft=function(b,d){var f=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,f,d)},this.doScrollTop=function(b,d){var f=
a.scrollrunning?a.newscrollx:a.getScrollLeft();a.doScrollPos(f,b,d)},this.doScrollPos=function(b,d,f){function e(){if(a.cancelAnimationFrame)return!0;a.scrollrunning=!0;if(p=1-p)return a.timer=s(e)||1;var b=0,c=sy=a.getScrollTop();if(a.dst.ay){var c=a.bzscroll?a.dst.py+a.bzscroll.getNow()*a.dst.ay:a.newscrolly,f=c-sy;if(0>f&&c<a.newscrolly||0<f&&c>a.newscrolly)c=a.newscrolly;a.setScrollTop(c);c==a.newscrolly&&(b=1)}else b=1;var d=sx=a.getScrollLeft();if(a.dst.ax){d=a.bzscroll?a.dst.px+a.bzscroll.getNow()*
a.dst.ax:a.newscrollx;f=d-sx;if(0>f&&d<a.newscrollx||0<f&&d>a.newscrollx)d=a.newscrollx;a.setScrollLeft(d);d==a.newscrollx&&(b+=1)}else b+=1;2==b?(a.timer=0,a.cursorfreezed=!1,a.bzscroll=!1,a.scrollrunning=!1,0>c?c=0:c>a.page.maxh&&(c=a.page.maxh),0>d?d=0:d>a.page.maxw&&(d=a.page.maxw),d!=a.newscrollx||c!=a.newscrolly?a.doScrollPos(d,c):a.onscrollend&&a.triggerScrollEnd()):a.timer=s(e)||1}d="undefined"==typeof d||!1===d?a.getScrollTop(!0):d;if(a.timer&&a.newscrolly==d&&a.newscrollx==b)return!0;a.timer&&
v(a.timer);a.timer=0;var h=a.getScrollTop(),g=a.getScrollLeft();(0>(a.newscrolly-h)*(d-h)||0>(a.newscrollx-g)*(b-g))&&a.cancelScroll();a.newscrolly=d;a.newscrollx=b;if(!a.bouncescroll||!a.rail.visibility)0>a.newscrolly?a.newscrolly=0:a.newscrolly>a.page.maxh&&(a.newscrolly=a.page.maxh);if(!a.bouncescroll||!a.railh.visibility)0>a.newscrollx?a.newscrollx=0:a.newscrollx>a.page.maxw&&(a.newscrollx=a.page.maxw);a.dst={};a.dst.x=b-g;a.dst.y=d-h;a.dst.px=g;a.dst.py=h;var k=Math.round(Math.sqrt(Math.pow(a.dst.x,
2)+Math.pow(a.dst.y,2)));a.dst.ax=a.dst.x/k;a.dst.ay=a.dst.y/k;var l=0,q=k;0==a.dst.x?(l=h,q=d,a.dst.ay=1,a.dst.py=0):0==a.dst.y&&(l=g,q=b,a.dst.ax=1,a.dst.px=0);k=a.getTransitionSpeed(k);f&&1>=f&&(k*=f);a.bzscroll=0<k?a.bzscroll?a.bzscroll.update(q,k):new BezierClass(l,q,k,0,1,0,1):!1;if(!a.timer){(h==a.page.maxh&&d>=a.page.maxh||g==a.page.maxw&&b>=a.page.maxw)&&a.checkContentSize();var p=1;a.cancelAnimationFrame=!1;a.timer=1;a.onscrollstart&&!a.scrollrunning&&a.onscrollstart.call(a,{type:"scrollstart",
current:{x:g,y:h},request:{x:b,y:d},end:{x:a.newscrollx,y:a.newscrolly},speed:k});e();(h==a.page.maxh&&d>=h||g==a.page.maxw&&b>=g)&&a.checkContentSize();a.noticeCursor()}},this.cancelScroll=function(){a.timer&&v(a.timer);a.timer=0;a.bzscroll=!1;a.scrollrunning=!1;return a}):(this.doScrollLeft=function(b,d){var f=a.getScrollTop();a.doScrollPos(b,f,d)},this.doScrollTop=function(b,d){var f=a.getScrollLeft();a.doScrollPos(f,b,d)},this.doScrollPos=function(b,d,f){var e=b>a.page.maxw?a.page.maxw:b;0>e&&
(e=0);var h=d>a.page.maxh?a.page.maxh:d;0>h&&(h=0);a.synched("scroll",function(){a.setScrollTop(h);a.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(b,d){var f=0,f=d?Math.floor((a.scroll.y-b)*a.scrollratio.y):(a.timer?a.newscrolly:a.getScrollTop(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.h/2);f<-e?f=-e:f>a.page.maxh+e&&(f=a.page.maxh+e)}a.cursorfreezed=!1;py=a.getScrollTop(!0);if(0>f&&0>=py)return a.noticeCursor();if(f>a.page.maxh&&py>=a.page.maxh)return a.checkContentSize(),
a.noticeCursor();a.doScrollTop(f)};this.doScrollLeftBy=function(b,d){var f=0,f=d?Math.floor((a.scroll.x-b)*a.scrollratio.x):(a.timer?a.newscrollx:a.getScrollLeft(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.w/2);f<-e?f=-e:f>a.page.maxw+e&&(f=a.page.maxw+e)}a.cursorfreezed=!1;px=a.getScrollLeft(!0);if(0>f&&0>=px||f>a.page.maxw&&px>=a.page.maxw)return a.noticeCursor();a.doScrollLeft(f)};this.doScrollTo=function(b,d){d&&Math.round(b*a.scrollratio.y);a.cursorfreezed=!1;a.doScrollTop(b)};this.checkContentSize=
function(){var b=a.getContentSize();(b.h!=a.page.h||b.w!=a.page.w)&&a.resize(!1,b)};a.onscroll=function(b){a.rail.drag||a.cursorfreezed||a.synched("scroll",function(){a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.railh&&(a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)));a.noticeCursor()})};a.bind(a.docscroll,"scroll",a.onscroll);this.doZoomIn=function(b){if(!a.zoomactive){a.zoomactive=!0;a.zoomrestore={style:{}};var h="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),
f=a.win[0].style,g;for(g in h){var k=h[g];a.zoomrestore.style[k]="undefined"!=typeof f[k]?f[k]:""}a.zoomrestore.style.width=a.win.css("width");a.zoomrestore.style.height=a.win.css("height");a.zoomrestore.padding={w:a.win.outerWidth()-a.win.width(),h:a.win.outerHeight()-a.win.height()};d.isios4&&(a.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0));a.win.css({position:d.isios4?"absolute":"fixed",top:0,left:0,"z-index":x+100,margin:"0px"});h=a.win.css("backgroundColor");(""==h||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(h))&&
a.win.css("backgroundColor","#fff");a.rail.css({"z-index":x+101});a.zoom.css({"z-index":x+102});a.zoom.css("backgroundPosition","0px -18px");a.resizeZoom();a.onzoomin&&a.onzoomin.call(a);return a.cancelEvent(b)}};this.doZoomOut=function(b){if(a.zoomactive)return a.zoomactive=!1,a.win.css("margin",""),a.win.css(a.zoomrestore.style),d.isios4&&e(window).scrollTop(a.zoomrestore.scrollTop),a.rail.css({"z-index":a.zindex}),a.zoom.css({"z-index":a.zindex}),a.zoomrestore=!1,a.zoom.css("backgroundPosition",
"0px 0px"),a.onResize(),a.onzoomout&&a.onzoomout.call(a),a.cancelEvent(b)};this.doZoom=function(b){return a.zoomactive?a.doZoomOut(b):a.doZoomIn(b)};this.resizeZoom=function(){if(a.zoomactive){var b=a.getScrollTop();a.win.css({width:e(window).width()-a.zoomrestore.padding.w+"px",height:e(window).height()-a.zoomrestore.padding.h+"px"});a.onResize();a.setScrollTop(Math.min(a.page.maxh,b))}};this.init();e.nicescroll.push(this)},H=function(e){var b=this;this.nc=e;this.steptime=this.lasttime=this.speedy=
this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(e,g){b.stop();var l=b.time();b.steptime=0;b.lasttime=l;b.speedx=0;b.speedy=0;b.lastx=e;b.lasty=g;b.lastscrollx=-1;b.lastscrolly=-1};this.update=function(e,g){var l=b.time();b.steptime=l-b.lasttime;b.lasttime=l;var l=g-b.lasty,q=e-b.lastx,a=b.nc.getScrollTop(),p=b.nc.getScrollLeft(),a=a+
l,p=p+q;b.snapx=0>p||p>b.nc.page.maxw;b.snapy=0>a||a>b.nc.page.maxh;b.speedx=q;b.speedy=l;b.lastx=e;b.lasty=g};this.stop=function(){b.nc.unsynched("domomentum2d");b.timer&&clearTimeout(b.timer);b.timer=0;b.lastscrollx=-1;b.lastscrolly=-1};this.doSnapy=function(e,g){var l=!1;0>g?(g=0,l=!0):g>b.nc.page.maxh&&(g=b.nc.page.maxh,l=!0);0>e?(e=0,l=!0):e>b.nc.page.maxw&&(e=b.nc.page.maxw,l=!0);l?b.nc.doScrollPos(e,g,b.nc.opt.snapbackspeed):b.nc.triggerScrollEnd()};this.doMomentum=function(e){var g=b.time(),
l=e?g+e:b.lasttime;e=b.nc.getScrollLeft();var q=b.nc.getScrollTop(),a=b.nc.page.maxh,p=b.nc.page.maxw;b.speedx=0<p?Math.min(60,b.speedx):0;b.speedy=0<a?Math.min(60,b.speedy):0;l=l&&60>=g-l;if(0>q||q>a||0>e||e>p)l=!1;e=b.speedx&&l?b.speedx:!1;if(b.speedy&&l&&b.speedy||e){var d=Math.max(16,b.steptime);50<d&&(e=d/50,b.speedx*=e,b.speedy*=e,d=50);b.demulxy=0;b.lastscrollx=b.nc.getScrollLeft();b.chkx=b.lastscrollx;b.lastscrolly=b.nc.getScrollTop();b.chky=b.lastscrolly;var r=b.lastscrollx,t=b.lastscrolly,
s=function(){var c=600<b.time()-g?0.04:0.02;if(b.speedx&&(r=Math.floor(b.lastscrollx-b.speedx*(1-b.demulxy)),b.lastscrollx=r,0>r||r>p))c=0.1;if(b.speedy&&(t=Math.floor(b.lastscrolly-b.speedy*(1-b.demulxy)),b.lastscrolly=t,0>t||t>a))c=0.1;b.demulxy=Math.min(1,b.demulxy+c);b.nc.synched("domomentum2d",function(){b.speedx&&(b.nc.getScrollLeft()!=b.chkx&&b.stop(),b.chkx=r,b.nc.setScrollLeft(r));b.speedy&&(b.nc.getScrollTop()!=b.chky&&b.stop(),b.chky=t,b.nc.setScrollTop(t));b.timer||(b.nc.hideCursor(),
b.doSnapy(r,t))});1>b.demulxy?b.timer=setTimeout(s,d):(b.stop(),b.nc.hideCursor(),b.doSnapy(r,t))};s()}else b.doSnapy(b.nc.getScrollLeft(),b.nc.getScrollTop())}},w=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(g,b,h){return(b=e.data(g,"__nicescroll")||!1)&&b.ishwscroll?b.getScrollTop():w.call(g)},set:function(g,b){var h=e.data(g,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollTop(parseInt(b)):w.call(g,b);return this}};e.fn.scrollTop=function(g){if("undefined"==typeof g){var b=this[0]?e.data(this[0],
"__nicescroll")||!1:!1;return b&&b.ishwscroll?b.getScrollTop():w.call(this)}return this.each(function(){var b=e.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollTop(parseInt(g)):w.call(e(this),g)})};var A=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(g,b,h){return(b=e.data(g,"__nicescroll")||!1)&&b.ishwscroll?b.getScrollLeft():A.call(g)},set:function(g,b){var h=e.data(g,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollLeft(parseInt(b)):A.call(g,b);return this}};e.fn.scrollLeft=function(g){if("undefined"==
typeof g){var b=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return b&&b.ishwscroll?b.getScrollLeft():A.call(this)}return this.each(function(){var b=e.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollLeft(parseInt(g)):A.call(e(this),g)})};var B=function(g){var b=this;this.length=0;this.name="nicescrollarray";this.each=function(e){for(var g=0,a=0;g<b.length;g++)e.call(b[g],a++);return b};this.push=function(e){b[b.length]=e;b.length++};this.eq=function(e){return b[e]};if(g)for(var h=0;h<g.length;h++){var k=
e.data(g[h],"__nicescroll")||!1;k&&(this[this.length]=k,this.length++)}return this};(function(e,b,h){for(var k=0;k<b.length;k++)h(e,b[k])})(B.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(e,b){e[b]=function(){var e=arguments;return this.each(function(){this[b].apply(this,e)})}});e.fn.getNiceScroll=function(g){return"undefined"==typeof g?new B(this):this[g]&&e.data(this[g],"__nicescroll")||!1};e.extend(e.expr[":"],{nicescroll:function(g){return e.data(g,"__nicescroll")?
!0:!1}});e.fn.niceScroll=function(g,b){"undefined"==typeof b&&("object"==typeof g&&!("jquery"in g))&&(b=g,g=!1);var h=new B;"undefined"==typeof b&&(b={});g&&(b.doc=e(g),b.win=e(this));var k=!("doc"in b);!k&&!("win"in b)&&(b.win=e(this));this.each(function(){var g=e(this).data("__nicescroll")||!1;g||(b.doc=k?e(this):b.doc,g=new N(b,e(this)),e(this).data("__nicescroll",g));h.push(g)});return 1==h.length?h[0]:h};window.NiceScroll={getjQuery:function(){return e}};e.nicescroll||(e.nicescroll=new B,e.nicescroll.options=
G)});
/*! slider */
(function(window,$){var Superslides,plugin='superslides';Superslides=function(el,options){this.options=$.extend({play:false,animation_speed:600,animation_easing:'swing',animation:'slide',inherit_width_from:window,inherit_height_from:window,usekeyboard:true,pagination:true,hashchange:false,scrollable:true,elements:{preserve:'.preserve',nav:'.slides-navigation',container:'.slides-container',pagination:'.slides-pagination'}},options);var that=this,$control=$('<div>',{"class":'slides-control'}),multiplier=1;this.$el=$(el);this.$container=this.$el.find(this.options.elements.container);var initialize=function(){multiplier=that._findMultiplier();that.$el.on('click',that.options.elements.nav+" a",function(e){e.preventDefault();that.stop();if($(this).hasClass('next')){that.animate('next',function(){that.start();});}else{that.animate('prev',function(){that.start();});}});$(document).on('keyup',function(e){if(that.options.usekeyboard){if(e.keyCode===37){that.animate('prev');}
if(e.keyCode===39){that.animate('next');}}});$(window).on('resize',function(){setTimeout(function(){var $children=that.$container.children();that.width=that._findWidth();that.height=that._findHeight();$children.css({width:that.width,left:that.width});that.css.containers();that.css.images();},10);});if(that.options.hashchange){$(window).on('hashchange',function(){var hash=that._parseHash(),index;index=that._upcomingSlide(hash);if(index>=0&&index!==that.current){that.animate(index);}});}
that.pagination._events();that.start();return that;};var css={containers:function(){if(that.init){that.$el.css({height:that.height});that.$control.css({width:that.width*multiplier,left:-that.width});that.$container.css({});}else{$('body').css({margin:0});that.$el.css({position:'relative',overflow:'hidden',width:'100%',height:that.height});that.$control.css({position:'relative',transform:'translate3d(0)',height:'100%',width:that.width*multiplier,left:-that.width});that.$container.css({display:'none',margin:'0',padding:'0',listStyle:'none',position:'relative',height:'100%'});}
if(that.size()===1){that.$el.find(that.options.elements.nav).hide();}},images:function(){var $images=that.$container.find('img').not(that.options.elements.preserve)
$images.removeAttr('width').removeAttr('height').css({"-webkit-backface-visibility":'hidden',"-ms-interpolation-mode":'bicubic',"position":'absolute',"left":'0',"top":'0',"z-index":'-1',"max-width":'none'});$images.each(function(){var image_aspect_ratio=that.image._aspectRatio(this),image=this;if(!$.data(this,'processed')){var img=new Image();img.onload=function(){that.image._scale(image,image_aspect_ratio);that.image._center(image,image_aspect_ratio);$.data(image,'processed',true);};img.src=this.src;}else{that.image._scale(image,image_aspect_ratio);that.image._center(image,image_aspect_ratio);}});},children:function(){var $children=that.$container.children();if($children.is('img')){$children.each(function(){if($(this).is('img')){$(this).wrap('<div>');var id=$(this).attr('id');$(this).removeAttr('id');$(this).parent().attr('id',id);}});$children=that.$container.children();}
if(!that.init){$children.css({display:'none',left:that.width*2});}
$children.css({position:'absolute',overflow:'hidden',height:'100%',width:that.width,top:0,zIndex:0});}}
var fx={slide:function(orientation,complete){var $children=that.$container.children(),$target=$children.eq(orientation.upcoming_slide);$target.css({left:orientation.upcoming_position,display:'block'});that.$control.animate({left:orientation.offset},that.options.animation_speed,that.options.animation_easing,function(){if(that.size()>1){that.$control.css({left:-that.width});$children.eq(orientation.upcoming_slide).css({left:that.width,zIndex:2});if(orientation.outgoing_slide>=0){$children.eq(orientation.outgoing_slide).css({left:that.width,display:'none',zIndex:0});}}
complete();});},fade:function(orientation,complete){var that=this,$children=that.$container.children(),$outgoing=$children.eq(orientation.outgoing_slide),$target=$children.eq(orientation.upcoming_slide);$target.css({left:this.width,opacity:0,display:'block'}).animate({opacity:1},that.options.animation_speed,that.options.animation_easing);if(orientation.outgoing_slide>=0){$outgoing.animate({opacity:0},that.options.animation_speed,that.options.animation_easing,function(){if(that.size()>1){$children.eq(orientation.upcoming_slide).css({zIndex:2});if(orientation.outgoing_slide>=0){$children.eq(orientation.outgoing_slide).css({opacity:1,display:'none',zIndex:0});}}
complete();});}else{$target.css({zIndex:2});complete();}}};fx=$.extend(fx,$.fn.superslides.fx);var image={_centerY:function(image){var $img=$(image);$img.css({top:(that.height-$img.height())/2});},_centerX:function(image){var $img=$(image);$img.css({left:(that.width-$img.width())/2});},_center:function(image){that.image._centerX(image);that.image._centerY(image);},_aspectRatio:function(image){if(!image.naturalHeight&&!image.naturalWidth){var img=new Image();img.src=image.src;image.naturalHeight=img.height;image.naturalWidth=img.width;}
return image.naturalHeight/image.naturalWidth;},_scale:function(image,image_aspect_ratio){image_aspect_ratio=image_aspect_ratio||that.image._aspectRatio(image);var container_aspect_ratio=that.height/that.width,$img=$(image);if(container_aspect_ratio>image_aspect_ratio){$img.css({height:that.height,width:that.height/image_aspect_ratio});}else{$img.css({height:that.width*image_aspect_ratio,width:that.width});}}};var pagination={_setCurrent:function(i){if(!that.$pagination){return;}
var $pagination_children=that.$pagination.children();$pagination_children.removeClass('current');$pagination_children.eq(i).addClass('current');},_addItem:function(i){var slide_number=i+1,href=slide_number,$slide=that.$container.children().eq(i),slide_id=$slide.attr('id');if(slide_id){href=slide_id;}
var $item=$("<a>",{'href':"#"+href,'text':href});$item.appendTo(that.$pagination);},_setup:function(){if(!that.options.pagination||that.size()===1){return;}
var $pagination=$("<nav>",{'class':that.options.elements.pagination.replace(/^\./,'')});that.$pagination=$pagination.appendTo(that.$el);for(var i=0;i<that.size();i++){that.pagination._addItem(i);}},_events:function(){that.$el.on('click',that.options.elements.pagination+' a',function(e){e.preventDefault();var hash=that._parseHash(this.hash),index;index=that._upcomingSlide(hash,true);if(index!==that.current){that.animate(index,function(){that.start();});}});}};this.css=css;this.image=image;this.pagination=pagination;this.fx=fx;this.animation=this.fx[this.options.animation];this.$control=this.$container.wrap($control).parent('.slides-control');that._findPositions();that.width=that._findWidth();that.height=that._findHeight();this.css.children();this.css.containers();this.css.images();this.pagination._setup();return initialize();};Superslides.prototype={_findWidth:function(){return $(this.options.inherit_width_from).width();},_findHeight:function(){return $(this.options.inherit_height_from).height();},_findMultiplier:function(){return this.size()===1?1:3;},_upcomingSlide:function(direction,from_hash_change){if(from_hash_change&&!isNaN(direction)){direction=direction-1;}
if((/next/).test(direction)){return this._nextInDom();}else if((/prev/).test(direction)){return this._prevInDom();}else if((/\d/).test(direction)){return+direction;}else if(direction&&(/\w/).test(direction)){var index=this._findSlideById(direction);if(index>=0){return index;}else{return 0;}}else{return 0;}},_findSlideById:function(id){return this.$container.find('#'+id).index();},_findPositions:function(current,thisRef){thisRef=thisRef||this;if(current===undefined){current=-1;}
thisRef.current=current;thisRef.next=thisRef._nextInDom();thisRef.prev=thisRef._prevInDom();},_nextInDom:function(){var index=this.current+1;if(index===this.size()){index=0;}
return index;},_prevInDom:function(){var index=this.current-1;if(index<0){index=this.size()-1;}
return index;},_parseHash:function(hash){hash=hash||window.location.hash;hash=hash.replace(/^#/,'');if(hash&&!isNaN(+hash)){hash=+hash;}
return hash;},size:function(){return this.$container.children().length;},destroy:function(){return this.$el.removeData();},update:function(){this.css.children();this.css.containers();this.css.images();this.pagination._addItem(this.size())
this._findPositions(this.current);this.$el.trigger('updated.slides');},stop:function(){clearInterval(this.play_id);delete this.play_id;this.$el.trigger('stopped.slides');},start:function(){var that=this;if(that.options.hashchange){$(window).trigger('hashchange');}else{this.animate();}
if(this.options.play){if(this.play_id){this.stop();}
this.play_id=setInterval(function(){that.animate();},this.options.play);}
this.$el.trigger('started.slides');},animate:function(direction,userCallback){var that=this,orientation={};if(this.animating){return;}
this.animating=true;if(direction===undefined){direction='next';}
orientation.upcoming_slide=this._upcomingSlide(direction);if(orientation.upcoming_slide>=this.size()){return;}
orientation.outgoing_slide=this.current;orientation.upcoming_position=this.width*2;orientation.offset=-orientation.upcoming_position;if(direction==='prev'||direction<orientation.outgoing_slide){orientation.upcoming_position=0;orientation.offset=0;}
if(that.size()>1){that.pagination._setCurrent(orientation.upcoming_slide);}
if(that.options.hashchange){var hash=orientation.upcoming_slide+1,id=that.$container.children(':eq('+orientation.upcoming_slide+')').attr('id');if(id){window.location.hash=id;}else{window.location.hash=hash;}}
if(that.size()===1){that.stop();that.options.play=0;that.options.animation_speed=0;orientation.upcoming_slide=0;orientation.outgoing_slide=-1;}
that.$el.trigger('animating.slides',[orientation]);that.animation(orientation,function(){that._findPositions(orientation.upcoming_slide,that);if(typeof userCallback==='function'){userCallback();}
that.animating=false;that.$el.trigger('animated.slides');if(!that.init){that.$el.trigger('init.slides');that.init=true;that.$container.fadeIn('fast');}});}};$.fn[plugin]=function(option,args){var result=[];this.each(function(){var $this,data,options;$this=$(this);data=$this.data(plugin);options=typeof option==='object'&&option;if(!data){result=$this.data(plugin,(data=new Superslides(this,options)));}
if(typeof option==="string"){result=data[option];if(typeof result==='function'){return result=result.call(data,args);}}});return result;};$.fn[plugin].fx={};})(this,jQuery);
/*! popup */
(function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;r.length>a;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()})(window.jQuery||window.Zepto);

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists