(function(n,t){var i={a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,"0":48,"1":49,"2":50,"3":51,"4":52,"5":53,"6":54,"7":55,"8":56,"9":57,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,shift:16,ctrl:17,control:17,alt:18,option:18,opt:18,cmd:224,command:224,fn:255,"function":255,backspace:8,osxdelete:8,enter:13,"return":13,space:32,spacebar:32,esc:27,escape:27,tab:9,capslock:20,capslk:20,"super":91,windows:91,insert:45,"delete":46,home:36,end:35,pgup:33,pageup:33,pgdn:34,pagedown:34,left:37,up:38,right:39,down:40,"!":49,"@":50,"#":51,$:52,"%":53,"^":54,"&":55,"*":56,"(":57,")":48,"`":96,"~":96,"-":45,_:45,"=":187,"+":187,"[":219,"{":219,"]":221,"}":221,"\\":220,"|":220,";":59,":":59,"'":222,'"':222,",":188,"<":188,".":190,">":190,"/":191,"?":191};n.key=n.fn.key=function(r,u){if(!(this instanceof n))return n.fn.key.apply(n(t),arguments);var f=0,e=[];return this.on({keydown:function(n){var t=n.which;e[e.length-1]!==t&&(e.push(t),f=t===r[f]||typeof r=="string"&&t===i[r.split("+")[f]]?f+1:0,(f===r.length||typeof r=="string"&&r.split("+").length===f)&&(u(n,e),f=0))},keyup:function(){f=0;e=[]}})}})(jQuery,document),function(n,t,i){"use strict";function r(t,i){return this.name=u,this.el=t,this.$el=n(t),this.options=n.extend({},f,i),this.$document=n(this.$el[0].ownerDocument),this.$body=this.$document.find("body"),this.moveTrigger="MSPointerMove pointermove touchmove mousemove",this.startTrigger="MSPointerDown pointerdown touchstart mousedown",this.stopTrigger="MSPointerUp pointerup touchend mouseup",this.startTriggerArray=this.startTrigger.split(" "),this.moveTriggerArray=this.moveTrigger.split(" "),this.stopTriggerArray=this.stopTrigger.split(" "),this.stopEvents=[this.stopTrigger,this.options.stopEvents].join(" "),this.$container=this.options.constrainTo==="window"?this.$document:this.options.constrainTo&&this.options.constrainTo!=="parent"?n(this.options.constrainTo):this.$el.parent(),this.isPointerEventCompatible()&&this.applyMSDefaults(),this.CSSEaseHash=this.getCSSEaseHash(),this.scale=1,this.started=!1,this.disabled=!1,this.activeDropRegions=[],this.resetVelocityQueue(),this.init(),this}var u="pep",f={initiate:function(){},start:function(){},drag:function(){},stop:function(){},easing:null,rest:function(){},moveTo:!1,callIfNotStarted:["stop","rest"],startThreshold:[0,0],grid:[1,1],debug:!1,activeClass:"pep-active",multiplier:1,velocityMultiplier:2.5,shouldPreventDefault:!0,allowDragEventPropagation:!0,stopEvents:"",hardwareAccelerate:!0,useCSSTranslation:!0,disableSelect:!0,cssEaseString:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",cssEaseDuration:1e3,shouldEase:!0,droppable:!1,droppableActiveClass:"pep-dpa",overlapFunction:!1,constrainTo:!1,removeMargins:!0,place:!0,deferPlacement:!1,axis:null,forceNonCSS3Movement:!1,elementsWithInteraction:"input",revert:!1,revertAfter:"stop",revertIf:function(){return!0},ignoreRightClick:!0,startPos:{left:null,top:null}};r.prototype.init=function(){this.options.debug&&this.buildDebugDiv();this.options.disableSelect&&this.disableSelect();this.options.place&&!this.options.deferPlacement&&(this.positionParent(),this.placeObject());this.ev={};this.pos={};this.subscribe()};r.prototype.subscribe=function(){var n=this;this.onStartEvent=function(t){n.handleStart(t)};this.$el.on(this.startTrigger,this.onStartEvent);this.onStartEventOnElementsWithInteraction=function(n){n.stopPropagation()};this.$el.on(this.startTrigger,this.options.elementsWithInteraction,this.onStartEventOnElementsWithInteraction);this.onStopEvents=function(t){n.handleStop(t)};this.$document.on(this.stopEvents,this.onStopEvents);this.onMoveEvents=function(t){n.moveEvent=t};this.$document.on(this.moveTrigger,this.onMoveEvents)};r.prototype.unsubscribe=function(){this.$el.off(this.startTrigger,this.onStartEvent);this.$el.off(this.startTrigger,this.options.elementsWithInteraction,this.onStartEventOnElementsWithInteraction);this.$document.off(this.stopEvents,this.onStopEvents);this.$document.off(this.moveTrigger,this.onMoveEvents)};r.prototype.handleStart=function(n){var t=this,i;if(this.isValidMoveEvent(n)&&!this.disabled&&!(this.options.ignoreRightClick&&n.which===3)){if(this.isPointerEventCompatible()&&n.preventManipulation&&n.preventManipulation(),n=this.normalizeEvent(n),this.options.place&&this.options.deferPlacement&&(this.positionParent(),this.placeObject()),this.log({type:"event",event:n.type}),this.options.hardwareAccelerate&&!this.hardwareAccelerated&&(this.hardwareAccelerate(),this.hardwareAccelerated=!0),i=this.options.initiate.call(this,n,this),i===!1)return;clearTimeout(this.restTimeout);this.$el.addClass(this.options.activeClass);this.removeCSSEasing();this.startX=this.ev.x=n.pep.x;this.startY=this.ev.y=n.pep.y;this.initialPosition=this.initialPosition||this.$el.position();this.startEvent=this.moveEvent=n;this.active=!0;this.options.shouldPreventDefault&&n.preventDefault();this.options.allowDragEventPropagation||n.stopPropagation(),function r(){t.active&&(t.handleMove(),t.requestAnimationFrame(r))}(),function u(){t.options.easing&&(t.easing&&t.options.easing.call(t,null,t),t.requestAnimationFrame(u))}()}};r.prototype.handleMove=function(){var r,u,o,s,h;if(typeof this.moveEvent!="undefined"){var i=this.normalizeEvent(this.moveEvent),f=t.parseInt(i.pep.x/this.options.grid[0])*this.options.grid[0],e=t.parseInt(i.pep.y/this.options.grid[1])*this.options.grid[1];if(this.addToLIFO({time:i.timeStamp,x:f,y:e}),n.inArray(i.type,this.startTriggerArray)>-1?(r=0,u=0):(r=f-this.ev.x,u=e-this.ev.y),this.dx=r,this.dy=u,this.ev.x=f,this.ev.y=e,r===0&&u===0){this.log({type:"event",event:"** stopped **"});return}if(o=Math.abs(this.startX-f),s=Math.abs(this.startY-e),!this.started&&(o>this.options.startThreshold[0]||s>this.options.startThreshold[1])&&(this.started=!0,this.$el.addClass("pep-start"),this.options.start.call(this,this.startEvent,this)),this.doMoveTo(r,u),this.options.droppable&&this.calculateActiveDropRegions(),h=this.options.drag.call(this,i,this),h===!1){this.resetVelocityQueue();return}this.log({type:"event",event:i.type});this.log({type:"event-coords",x:this.ev.x,y:this.ev.y});this.log({type:"velocity"})}};r.prototype.doMoveTo=function(n,t){var i=this.handleConstraint(n,t),r,u;typeof this.options.moveTo=="function"?(r=n>=0?"+="+Math.abs(n/this.scale)*this.options.multiplier:"-="+Math.abs(n/this.scale)*this.options.multiplier,u=t>=0?"+="+Math.abs(t/this.scale)*this.options.multiplier:"-="+Math.abs(t/this.scale)*this.options.multiplier,this.options.constrainTo&&(r=i.x!==!1?i.x:r,u=i.y!==!1?i.y:u),this.options.axis==="x"&&(u=i.y),this.options.axis==="y"&&(r=i.x),this.options.moveTo.call(this,r,u)):this.shouldUseCSSTranslation()?(n=n/this.scale*this.options.multiplier,t=t/this.scale*this.options.multiplier,this.options.constrainTo&&(n=i.x===!1?n:0,t=i.y===!1?t:0),this.options.axis==="x"&&(t=0),this.options.axis==="y"&&(n=0),this.moveToUsingTransforms(n,t)):(r=n>=0?"+="+Math.abs(n/this.scale)*this.options.multiplier:"-="+Math.abs(n/this.scale)*this.options.multiplier,u=t>=0?"+="+Math.abs(t/this.scale)*this.options.multiplier:"-="+Math.abs(t/this.scale)*this.options.multiplier,this.options.constrainTo&&(r=i.x!==!1?i.x:r,u=i.y!==!1?i.y:u),this.options.axis==="x"&&(u=i.y),this.options.axis==="y"&&(r=i.x),this.moveTo(r,u))};r.prototype.handleStop=function(t){this.active&&(this.log({type:"event",event:t.type}),this.active=!1,this.easing=!0,this.$el.removeClass("pep-start").addClass("pep-ease"),this.options.droppable&&this.calculateActiveDropRegions(),(this.started||!this.started&&n.inArray("stop",this.options.callIfNotStarted)>-1)&&this.options.stop.call(this,t,this),this.options.shouldEase?this.ease(t,this.started):this.removeActiveClass(),this.options.revert&&(this.options.revertAfter==="stop"||!this.options.shouldEase)&&this.options.revertIf&&this.options.revertIf.call(this)&&this.revert(),this.started=!1,this.resetVelocityQueue())};r.prototype.ease=function(t,i){var l=this.$el.position(),e=this.velocity(),a=this.dt,s=e.x/this.scale*this.options.multiplier,h=e.y/this.scale*this.options.multiplier,o=this.handleConstraint(s,h,!0),u,f,c,r;this.cssAnimationsSupported()&&this.$el.css(this.getCSSEaseHash());u=e.x>0?"+="+s:"-="+Math.abs(s);f=e.y>0?"+="+h:"-="+Math.abs(h);this.options.constrainTo&&(u=o.x!==!1?o.x:u,f=o.y!==!1?o.y:f);this.options.axis==="x"&&(f="+=0");this.options.axis==="y"&&(u="+=0");c=!this.cssAnimationsSupported()||this.options.forceNonCSS3Movement;typeof this.options.moveTo=="function"?this.options.moveTo.call(this,u,f):this.moveTo(u,f,c);r=this;this.restTimeout=setTimeout(function(){r.options.droppable&&r.calculateActiveDropRegions();r.easing=!1;(i||!i&&n.inArray("rest",r.options.callIfNotStarted)>-1)&&r.options.rest.call(r,t,r);r.options.revert&&r.options.revertAfter==="ease"&&r.options.shouldEase&&r.options.revertIf&&r.options.revertIf.call(r)&&r.revert();r.removeActiveClass()},this.options.cssEaseDuration)};r.prototype.normalizeEvent=function(n){return n.pep={},this.isTouch(n)?(n.pep.x=n.originalEvent.touches[0].pageX,n.pep.y=n.originalEvent.touches[0].pageY,n.pep.type=n.type):(this.isPointerEventCompatible()||!this.isTouch(n))&&(n.pageX?(n.pep.x=n.pageX,n.pep.y=n.pageY):(n.pep.x=n.originalEvent.pageX,n.pep.y=n.originalEvent.pageY),n.pep.type=n.type),n};r.prototype.resetVelocityQueue=function(){this.velocityQueue=new Array(5)};r.prototype.moveTo=function(n,t,i){this.log({type:"delta",x:n,y:t});i?this.$el.animate({top:t,left:n},0,"easeOutQuad",{queue:!1}):this.$el.stop(!0,!1).css({top:t,left:n})};r.prototype.moveToUsingTransforms=function(n,t){var i=this.matrixToArray(this.matrixString());this.cssX||(this.cssX=this.xTranslation(i));this.cssY||(this.cssY=this.yTranslation(i));this.cssX=this.cssX+n;this.cssY=this.cssY+t;this.log({type:"delta",x:n,y:t});i[4]=this.cssX;i[5]=this.cssY;this.translation=this.arrayToMatrix(i);this.transform(this.translation)};r.prototype.transform=function(n){this.$el.css({"-webkit-transform":n,"-moz-transform":n,"-ms-transform":n,"-o-transform":n,transform:n})};r.prototype.xTranslation=function(n){return n=n||this.matrixToArray(this.matrixString()),parseInt(n[4],10)};r.prototype.yTranslation=function(n){return n=n||this.matrixToArray(this.matrixString()),parseInt(n[5],10)};r.prototype.matrixString=function(){var t=function(n){return!(!n||n==="none"||n.indexOf("matrix")<0)},n="matrix(1, 0, 0, 1, 0, 0)";return t(this.$el.css("-webkit-transform"))&&(n=this.$el.css("-webkit-transform")),t(this.$el.css("-moz-transform"))&&(n=this.$el.css("-moz-transform")),t(this.$el.css("-ms-transform"))&&(n=this.$el.css("-ms-transform")),t(this.$el.css("-o-transform"))&&(n=this.$el.css("-o-transform")),t(this.$el.css("transform"))&&(n=this.$el.css("transform")),n};r.prototype.matrixToArray=function(n){return n.split("(")[1].split(")")[0].split(",")};r.prototype.arrayToMatrix=function(n){return"matrix("+n.join(",")+")"};r.prototype.addToLIFO=function(n){var t=this.velocityQueue;t=t.slice(1,t.length);t.push(n);this.velocityQueue=t};r.prototype.velocity=function(){for(var t=0,i=0,n=0;n<this.velocityQueue.length-1;n++)this.velocityQueue[n]&&(t+=this.velocityQueue[n+1].x-this.velocityQueue[n].x,i+=this.velocityQueue[n+1].y-this.velocityQueue[n].y,this.dt=this.velocityQueue[n+1].time-this.velocityQueue[n].time);return{x:t*this.options.velocityMultiplier,y:i*this.options.velocityMultiplier}};r.prototype.revert=function(){this.shouldUseCSSTranslation()&&this.moveToUsingTransforms(-this.xTranslation(),-this.yTranslation());this.moveTo(this.initialPosition.left,this.initialPosition.top)};r.prototype.requestAnimationFrame=function(n){return t.requestAnimationFrame&&t.requestAnimationFrame(n)||t.webkitRequestAnimationFrame&&t.webkitRequestAnimationFrame(n)||t.mozRequestAnimationFrame&&t.mozRequestAnimationFrame(n)||t.oRequestAnimationFrame&&t.mozRequestAnimationFrame(n)||t.msRequestAnimationFrame&&t.msRequestAnimationFrame(n)||t.setTimeout(n,1e3/60)};r.prototype.positionParent=function(){this.options.constrainTo&&!this.parentPositioned&&(this.parentPositioned=!0,this.options.constrainTo==="parent"?this.$container.css({position:"relative"}):this.options.constrainTo==="window"&&this.$container.get(0).nodeName!=="#document"&&this.$container.css("position")!=="static"&&this.$container.css({position:"static"}))};r.prototype.placeObject=function(){this.objectPlaced||(this.objectPlaced=!0,this.offset=this.options.constrainTo==="parent"||this.hasNonBodyRelative()?this.$el.position():this.$el.offset(),parseInt(this.$el.css("left"),10)&&(this.offset.left=this.$el.css("left")),typeof this.options.startPos.left=="number"&&(this.offset.left=this.options.startPos.left),parseInt(this.$el.css("top"),10)&&(this.offset.top=this.$el.css("top")),typeof this.options.startPos.top=="number"&&(this.offset.top=this.options.startPos.top),this.options.removeMargins&&this.$el.css({margin:0}),this.$el.css({position:"absolute",top:this.offset.top,left:this.offset.left}))};r.prototype.hasNonBodyRelative=function(){return this.$el.parents().filter(function(){var t=n(this);return t.is("body")||t.css("position")==="relative"}).length>1};r.prototype.setScale=function(n){this.scale=n};r.prototype.setMultiplier=function(n){this.options.multiplier=n};r.prototype.removeCSSEasing=function(){this.cssAnimationsSupported()&&this.$el.css(this.getCSSEaseHash(!0))};r.prototype.disableSelect=function(){this.$el.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"})};r.prototype.removeActiveClass=function(){this.$el.removeClass([this.options.activeClass,"pep-ease"].join(" "))};r.prototype.handleConstraint=function(t,r,u){var c=this.$el.position(),f,e,o,s,h;return this.pos.x=c.left,this.pos.y=c.top,f={x:!1,y:!1},this.log({type:"pos-coords",x:this.pos.x,y:this.pos.y}),n.isArray(this.options.constrainTo)?(this.options.constrainTo[3]!==i&&this.options.constrainTo[1]!==i&&(o=this.options.constrainTo[1]===!1?Infinity:this.options.constrainTo[1],s=this.options.constrainTo[3]===!1?-Infinity:this.options.constrainTo[3]),this.options.constrainTo[0]!==!1&&this.options.constrainTo[2]!==!1&&(e=this.options.constrainTo[2]===!1?Infinity:this.options.constrainTo[2],h=this.options.constrainTo[0]===!1?-Infinity:this.options.constrainTo[0]),this.pos.x+t<s&&(f.x=s),this.pos.y+r<h&&(f.y=h)):typeof this.options.constrainTo=="string"&&(s=0,h=0,o=this.$container.width()-this.$el.outerWidth(),e=this.$container.height()-this.$el.outerHeight(),this.pos.x+t<0&&(f.x=0),this.pos.y+r<0&&(f.y=0)),this.pos.x+t>o&&(f.x=o),this.pos.y+r>e&&(f.y=e),this.shouldUseCSSTranslation()&&u&&(f.x===s&&this.xTranslation()&&(f.x=s-this.xTranslation()),f.x===o&&this.xTranslation()&&(f.x=o-this.xTranslation()),f.y===h&&this.yTranslation()&&(f.y=h-this.yTranslation()),f.y===e&&this.yTranslation()&&(f.y=e-this.yTranslation())),f};r.prototype.getCSSEaseHash=function(n){typeof n=="undefined"&&(n=!1);var t;if(n)t="";else{if(this.CSSEaseHash)return this.CSSEaseHash;t=["all",this.options.cssEaseDuration+"ms",this.options.cssEaseString].join(" ")}return{"-webkit-transition":t,"-moz-transition":t,"-ms-transition":t,"-o-transition":t,transition:t}};r.prototype.calculateActiveDropRegions=function(){var t=this;this.activeDropRegions.length=0;n.each(n(this.options.droppable),function(i,r){var u=n(r);t.isOverlapping(u,t.$el)?(u.addClass(t.options.droppableActiveClass),t.activeDropRegions.push(u)):u.removeClass(t.options.droppableActiveClass)})};r.prototype.isOverlapping=function(n,t){if(this.options.overlapFunction)return this.options.overlapFunction(n,t);var i=n[0].getBoundingClientRect(),r=t[0].getBoundingClientRect();return!(i.right<r.left||i.left>r.right||i.bottom<r.top||i.top>r.bottom)};r.prototype.isTouch=function(n){return n.type.search("touch")>-1};r.prototype.isPointerEventCompatible=function(){return"MSPointerEvent"in t};r.prototype.applyMSDefaults=function(){this.$el.css({"-ms-touch-action":"none","touch-action":"none","-ms-scroll-chaining":"none","-ms-scroll-limit":"0 0 0 0"})};r.prototype.isValidMoveEvent=function(n){return!this.isTouch(n)||this.isTouch(n)&&n.originalEvent&&n.originalEvent.touches&&n.originalEvent.touches.length===1};r.prototype.shouldUseCSSTranslation=function(){if(this.options.forceNonCSS3Movement)return!1;if(typeof this.useCSSTranslation!="undefined")return this.useCSSTranslation;var n=!1;return n=this.options.useCSSTranslation&&(typeof Modernizr=="undefined"||Modernizr.csstransforms)?!0:!1,this.useCSSTranslation=n,n};r.prototype.cssAnimationsSupported=function(){var t;if(typeof this.cssAnimationsSupport!="undefined")return this.cssAnimationsSupport;if(typeof Modernizr!="undefined"&&Modernizr.cssanimations)return this.cssAnimationsSupport=!0,!0;var n=!1,f=document.createElement("div"),e="animation",o="",r="Webkit Moz O ms Khtml".split(" "),u="";if(f.style.animationName&&(n=!0),n===!1)for(t=0;t<r.length;t++)if(f.style[r[t]+"AnimationName"]!==i){u=r[t];e=u+"Animation";o="-"+u.toLowerCase()+"-";n=!0;break}return this.cssAnimationsSupport=n,n};r.prototype.hardwareAccelerate=function(){this.$el.css({"-webkit-perspective":1e3,perspective:1e3,"-webkit-backface-visibility":"hidden","backface-visibility":"hidden"})};r.prototype.getMovementValues=function(){return{ev:this.ev,pos:this.pos,velocity:this.velocity()}};r.prototype.buildDebugDiv=function(){var t,i;n("#pep-debug").length===0&&(t=n("<div><\/div>"),t.attr("id","pep-debug").append("<div style='font-weight:bold; background: red; color: white;'>DEBUG MODE<\/div>").append("<div id='pep-debug-event'>no event<\/div>").append("<div id='pep-debug-ev-coords'>event coords: <span class='pep-x'>-<\/span>, <span class='pep-y'>-<\/span><\/div>").append("<div id='pep-debug-pos-coords'>position coords: <span class='pep-x'>-<\/span>, <span class='pep-y'>-<\/span><\/div>").append("<div id='pep-debug-velocity'>velocity: <span class='pep-x'>-<\/span>, <span class='pep-y'>-<\/span><\/div>").append("<div id='pep-debug-delta'>&Delta; movement: <span class='pep-x'>-<\/span>, <span class='pep-y'>-<\/span><\/div>").css({position:"fixed",bottom:5,right:5,zIndex:99999,textAlign:"right",fontFamily:"Arial, sans",fontSize:10,border:"1px solid #DDD",padding:"3px",background:"white",color:"#333"}));i=this;setTimeout(function(){i.debugElements={$event:n("#pep-debug-event"),$velocityX:n("#pep-debug-velocity .pep-x"),$velocityY:n("#pep-debug-velocity .pep-y"),$dX:n("#pep-debug-delta .pep-x"),$dY:n("#pep-debug-delta .pep-y"),$evCoordsX:n("#pep-debug-ev-coords .pep-x"),$evCoordsY:n("#pep-debug-ev-coords .pep-y"),$posCoordsX:n("#pep-debug-pos-coords .pep-x"),$posCoordsY:n("#pep-debug-pos-coords .pep-y")}},0);n("body").append(t)};r.prototype.log=function(n){if(this.options.debug)switch(n.type){case"event":this.debugElements.$event.text(n.event);break;case"pos-coords":this.debugElements.$posCoordsX.text(n.x);this.debugElements.$posCoordsY.text(n.y);break;case"event-coords":this.debugElements.$evCoordsX.text(n.x);this.debugElements.$evCoordsY.text(n.y);break;case"delta":this.debugElements.$dX.text(n.x);this.debugElements.$dY.text(n.y);break;case"velocity":var t=this.velocity();this.debugElements.$velocityX.text(Math.round(t.x));this.debugElements.$velocityY.text(Math.round(t.y))}};r.prototype.toggle=function(n){this.disabled=typeof n=="undefined"?!this.disabled:!n};n.extend(n.easing,{easeOutQuad:function(n,t,i,r,u){return-r*(t/=u)*(t-2)+i},easeOutCirc:function(n,t,i,r,u){return r*Math.sqrt(1-(t=t/u-1)*t)+i},easeOutExpo:function(n,t,i,r,u){return t===u?i+r:r*(-Math.pow(2,-10*t/u)+1)+i}});n.fn[u]=function(t){return this.each(function(){if(!n.data(this,"plugin_"+u)){var i=new r(this,t);n.data(this,"plugin_"+u,i);n.pep.peps.push(i)}})};n.pep={};n.pep.peps=[];n.pep.toggleAll=function(t){n.each(this.peps,function(n,i){i.toggle(t)})};n.pep.unbind=function(n){var t=n.data("plugin_"+u);typeof t!="undefined"&&(t.toggle(!1),t.unsubscribe(),n.removeData("plugin_"+u))}}(jQuery,window),function(n,t){"use strict";typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?module.exports=t():n.viewportUnitsBuggyfillHacks=t()}(this,function(){"use strict";function o(n,t,r,u){var o=r==="content"&&u.indexOf("viewport-units-buggyfill")>-1,e;o&&(e=u.replace(f,""),e.split(";").forEach(function(r){var e=r.split(":"),u,f,o;e.length===2&&(u=e[0].trim(),u!=="viewport-units-buggyfill")&&(f=e[1].trim(),n.push([t,u,f]),i.test(f)&&(o=f.replace(i,"-webkit-calc("),n.push([t,u,o])))}))}var t,i=/calc\(/g,f=/[\"\']/g,n=!1,e=!1,r=!0,u=!0;/*@cc_on@if(9<=@_jscript_version&&@_jscript_version<=10)n=!0;u=!1;r=!1;@end@if(@_jscript_version<9)e=!0;@end@*/return{required:function(t){return t.isMobileSafari||n},initialize:function(n){t=n;var i=document.createElement("div");i.style.width="1vmax";r=i.style.width!=="";(t.isMobileSafari||t.isBadStockAndroid)&&(u=!1)},initializeEvents:function(t,i,r){t.force||n&&!t._listeningToResize&&(window.addEventListener("resize",r,!0),t._listeningToResize=!0)},findDeclarations:function(n,t,i,r){i!==null&&o(n,t,i,r)},overwriteDeclaration:function(t,i,r){return n&&i==="filter"&&(r=r.replace(/px/g,"")),r}}}),function(n,t){"use strict";typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?module.exports=t():n.viewportUnitsBuggyfill=t()}(this,function(){"use strict";function k(n,t){var i;return function(){var r=this,u=arguments,f=function(){n.apply(r,u)};clearTimeout(i);i=setTimeout(f,t)}}function d(){try{return window.self!==window.top}catch(n){return!0}}function g(t){if(!s){if(t===!0&&(t={force:!0}),n=t||{},n.isMobileSafari=a,n.isBadStockAndroid=v,h||!n.force&&!a&&!e&&!v&&!l&&(!n.hacks||!n.hacks.required(n)))return window.console&&h&&console.info("viewport-units-buggyfill requires a proper CSSOM and basic viewport unit support, which are not available in IE8 and below"),{init:function(){}};n.hacks&&n.hacks.initialize(n);s=!0;r=document.createElement("style");r.id="patched-viewport";document.head.appendChild(r);ut(function(){var t=k(o,n.refreshDebounceWait||100);window.addEventListener("orientationchange",t,!0);window.addEventListener("pageshow",t,!0);(n.force||e||d())&&(window.addEventListener("resize",t,!0),n._listeningToResize=!0);n.hacks&&n.hacks.initializeEvents(n,o,t);o()})}}function nt(){r.textContent=w();r.parentNode.appendChild(r)}function o(){s&&(y(),setTimeout(function(){nt()},1))}function y(){return t=[],f.call(document.styleSheets,function(n){n.ownerNode.id!=="patched-viewport"&&n.cssRules&&n.ownerNode.getAttribute("data-viewport-units-buggyfill")!=="ignore"&&(n.media&&n.media.mediaText&&window.matchMedia&&!window.matchMedia(n.media.mediaText).matches||f.call(n.cssRules,p))}),t}function p(i){if(i.type===7){var r;try{r=i.cssText}catch(e){return}u.lastIndex=0;u.test(r)&&(t.push([i,null,r]),n.hacks&&n.hacks.findDeclarations(t,i,null,r));return}if(!i.style){if(!i.cssRules)return;f.call(i.cssRules,function(n){p(n)});return}f.call(i.style,function(r){var f=i.style.getPropertyValue(r);i.style.getPropertyPriority(r)&&(f+=" !important");u.lastIndex=0;u.test(f)&&(t.push([i,r,f]),n.hacks&&n.hacks.findDeclarations(t,i,r,f))})}function w(){c=rt();var r=[],n=[],i,u;return t.forEach(function(t){var f=tt.apply(null,t),e=f.selector.length?f.selector.join(" {\n")+" {\n":"",o=new Array(f.selector.length+1).join("\n}");if(!e||e!==i){n.length&&(r.push(i+n.join("\n")+u),n.length=0);e?(i=e,u=o,n.push(f.content)):(r.push(f.content),i=null,u=null);return}e&&!i&&(i=e,u=o);n.push(f.content)}),n.length&&r.push(i+n.join("\n")+u),l&&r.push("* { content: normal !important; }"),r.join("\n\n")}function tt(t,i,r){var f,o=[],e;for(f=r.replace(u,it),n.hacks&&(f=n.hacks.overwriteDeclaration(t,i,f)),i&&(o.push(t.selectorText),f=i+": "+f+";"),e=t.parentRule;e;)o.unshift("@media "+e.media.mediaText),e=e.parentRule;return{selector:o,content:f}}function it(n,t,i){var r=c[i],u=parseFloat(t)/100;return u*r+"px"}function rt(){var n=window.innerHeight,t=window.innerWidth;return{vh:n,vw:t,vmax:Math.max(t,n),vmin:Math.min(t,n)}}function ut(n){var t=0,i=function(){t--;t||n()};f.call(document.styleSheets,function(n){n.href&&b(n.href)!==b(location.href)&&(t++,ft(n.ownerNode,i))});t||n()}function b(n){return n.slice(0,n.indexOf("/",n.indexOf("://")+3))}function ft(n,t){et(n.href,function(){var i=document.createElement("style");i.media=n.media;i.setAttribute("data-href",n.href);i.textContent=this.responseText;n.parentNode.replaceChild(i,n);t()},t)}function et(n,t,i){var r=new XMLHttpRequest;if("withCredentials"in r)r.open("GET",n,!0);else if(typeof XDomainRequest!="undefined")r=new XDomainRequest,r.open("GET",n);else throw new Error("cross-domain XHR not supported");return r.onload=t,r.onerror=i,r.send(),r}var s=!1,n,i=window.navigator.userAgent,u=/([+-]?[0-9.]+)(vh|vw|vmin|vmax)/g,f=[].forEach,c,t,r,e=!1,h=!1,l=i.indexOf("Opera Mini")>-1,a=/(iPhone|iPod|iPad).+AppleWebKit/i.test(i)&&function(){var n=i.match(/OS (\d)/);return n&&n.length>1&&parseInt(n[1])<8}(),v=function(){var r=i.indexOf(" Android ")>-1,n,t;return r?(n=i.indexOf("Version/")>-1,!n)?!1:(t=parseFloat((i.match("Android ([0-9.]+)")||[])[1]),t<=4.4):!1}();/*@if(9<=@_jscript_version&&@_jscript_version<=10)e=!0;@end@if(@_jscript_version<9)h=!0;@end@*/return e||(e=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)),{version:"0.5.2",findProperties:y,getCss:w,init:g,refresh:o}});var MediaPlayer=function(n){function u(n,i){var r=Math.round(i.pos.x/(i.$container.width()-i.$el.width())*100);t.setPercent(r)}function r(){var n=buzz.toPercent(t.getTime(),t.getDuration(),2),r=(i.find(".timeline").width()-i.find(".playhead").width())*n/100;i.find(".playhead").css({left:r});i.find(".statusMessage").text("")}var t=new buzz.sound(n.src),i;t.getNetworkStateCode()==3&&console.log("Audio file not found.");i=n.interface;i.find(".playhead").pep({axis:"x",activeClass:"dragging",shouldEase:!1,useCSSTranslation:!1,constrainTo:"parent",stop:u});i.find(".playbutton").on("click",function(){t.togglePlay();t.isPaused()?i.removeClass("playing"):i.addClass("playing")});return t.bind("timeupdate",function(){i.find(".playhead").hasClass("dragging")||r()}),t.bind("error",function(){var n=t.getErrorMessage();console.log(t.getNetworkStateMessage());i.find(".statusMessage").text("Sorry, an error occurred")}),{buzz:t,updatePlayhead:r}};(function(n){"use strict";var i=n(document),t;i.ready(function(){var i=n(".post-head").data("color");typeof i!="undefined"&&n(".nav-main, .nav-mobile").addClass("post-color-"+i);n('.nav a[href*="'+location.pathname.split("/")[1]+'"]').addClass("active");n("body").on("click",".nav-button",function(){n("html").hasClass("nav-open")?t():n('html:not(".nav-open")').addClass("nav-open")});n(".menu-button, .nav-cover, .nav-close").on("click",function(t){t.preventDefault();n("body").toggleClass("nav-opened nav-closed")});n("body.error404").keypress(function(){return window.location="/",!1});n("body.error404").on("click touchstart",function(){return window.location="/",!1});n.key("alt+r",function(){return window.location="/",!1});n.key("alt+s",function(){return window.location="/shows",!1});n.key("alt+a",function(){return window.location="/home/about",!1});n.key("alt+c",function(){return window.location="/home/contact",!1});n.key("alt+u",function(){return window.location="/home/subscribe",!1})});t=function(){n("html.nav-open").addClass("nav-closing").removeClass("nav-open");setTimeout(function(){n("html").removeClass("nav-closing")},500)};n.fn.arctic_scroll=function(t){var r={elem:n(this),speed:500},i=n.extend(r,t);i.elem.click(function(t){t.preventDefault();var r=n(this),f=n("html, body"),e=r.attr("data-offset")?r.attr("data-offset"):!1,o=r.attr("data-position")?r.attr("data-position"):!1,u;e?(u=parseInt(e),f.stop(!0,!1).animate({scrollTop:n(this.hash).offset().top+u},i.speed)):o?(u=parseInt(o),f.stop(!0,!1).animate({scrollTop:u},i.speed)):f.stop(!0,!1).animate({scrollTop:n(this.hash).offset().top},i.speed)})}})(jQuery)