a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
":g;for(t.innerHTML=p+Y,d=t.getElementsByTagName("*"),j=d.length,v=[],f=0;j>f;f++)v[f]=d[f];if(k||D)for(f=0;j>f;f++)y=v[f],_=y.parentNode===t,(_||D||A&&!R)&&(T=y.offsetTop,k&&_&&T!==M&&"BR"!==y.nodeName&&(l=[],k.push(l),M=T),D&&(y._x=y.offsetLeft,y._y=T,y._w=y.offsetWidth,y._h=y.offsetHeight),k&&(R!==_&&A||(l.push(y),y._x-=I),_&&f&&(v[f-1]._wordEnd=!0)));for(f=0;j>f;f++)y=v[f],_=y.parentNode===t,"BR"!==y.nodeName?(D&&(b=y.style,R||_||(y._x+=y.parentNode._x,y._y+=y.parentNode._y),b.left=y._x+"px",b.top=y._y+"px",b.position="absolute",b.display="block",b.width=y._w+1+"px",b.height=y._h+"px"),R?_?s.push(y):A&&i.push(y):_?(t.removeChild(y),v.splice(f--,1),j--):!_&&A&&(T=!k&&!D&&y.nextSibling,t.appendChild(y),T||t.appendChild(n.createTextNode(" ")),i.push(y))):k||D?(t.removeChild(y),v.splice(f--,1),j--):R||t.appendChild(y);if(k){for(D&&(w=n.createElement("div"),t.appendChild(w),x=w.offsetWidth+"px",T=w.offsetParent===t?0:t.offsetLeft,t.removeChild(w)),b=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(P=!D||!R&&!A,f=0;k.length>f;f++){for(l=k[f],w=n.createElement("div"),w.style.cssText="display:block;text-align:"+X+";position:"+(D?"absolute;":"relative;"),G&&(w.className=G+(Q?f+1:"")),o.push(w),j=l.length,d=0;j>d;d++)"BR"!==l[d].nodeName&&(y=l[d],w.appendChild(y),P&&(y._wordEnd||R)&&w.appendChild(n.createTextNode(" ")),D&&(0===d&&(w.style.top=y._y+"px",w.style.left=I+T+"px"),y.style.top="0px",T&&(y.style.left=y._x-T+"px")));R||A||(w.innerHTML=r(w).split(String.fromCharCode(160)).join(" ")),D&&(w.style.width=x,w.style.height=y._h+"px"),t.appendChild(w)}t.style.cssText=b}D&&(z>t.clientHeight&&(t.style.height=z-F+"px",z>t.clientHeight&&(t.style.height=z+E+"px")),B>t.clientWidth&&(t.style.width=B-U+"px",B>t.clientWidth&&(t.style.width=B+N+"px")))},v=d.prototype;v.split=function(t){this.isSplit&&this.revert(),this.vars=t||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var e=0;this.elements.length>e;e++)this._originals[e]=this.elements[e].innerHTML,g(this.elements[e],this.vars,this.chars,this.words,this.lines);return this.isSplit=!0,this},v.revert=function(){if(!this._originals)throw"revert() call wasn't scoped properly.";for(var t=this._originals.length;--t>-1;)this.elements[t].innerHTML=this._originals[t];return this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},d.selector=t.$||t.jQuery||function(e){return t.$?(d.selector=t.$,t.$(e)):n?n.getElementById("#"===e.charAt(0)?e.substr(1):e):e}})(window||{});
/*!
* Draggable
* VERSION: 0.9.6
* DATE: 2013-11-20
* UPDATES AND DOCS AT: http://www.greensock.com
*
* Requires TweenLite and CSSPlugin version 1.11.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://www.greensock.com/club/).
*
* @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
* This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";window._gsDefine("utils.Draggable",["events.EventDispatcher","TweenLite"],function(t,e){var i,s,r,n,a={css:{}},o={css:{}},h={css:{}},l={css:{}},u={},_=document,c=_.documentElement||{},p=[],f=function(){return!1},m=180/Math.PI,d=_.all&&!_.addEventListener,g=[],v={},y=0,T=/^(?:a|input|textarea|button|select)$/i,w=0,x=function(){for(var t=g.length;--t>-1;)g[t]()},b=function(t){g.push(t),1===g.length&&e.ticker.addEventListener("tick",x)},P=function(t){for(var i=g.length;--i>-1;)g[i]===t&&g.splice(i,1);e.to(S,0,{overwrite:"all",delay:15,onComplete:S})},S=function(){g.length||e.ticker.removeEventListener("tick",x)},C=function(t,e){var i;for(i in e)void 0===t[i]&&(t[i]=e[i]);return t},k=function(t,e){return t=t||window.event,u.pageX=t.clientX+_.body.scrollLeft+c.scrollLeft,u.pageY=t.clientY+_.body.scrollTop+c.scrollTop,e&&(t.returnValue=!1),u},R=function(t){return t?("string"==typeof t&&(t=e.selector(t)),t.length&&t!==window&&t[0]&&t[0].style&&!t.nodeType&&(t=t[0]),t===window||t.nodeType&&t.style?t:null):t},A=function(t,e){var s,r,n,a=t.style;if(void 0===a[e]){for(n=["O","Moz","ms","Ms","Webkit"],r=5,s=e.charAt(0).toUpperCase()+e.substr(1);--r>-1&&void 0===a[n[r]+s];);if(0>r)return"";i=3===r?"ms":n[r],e=i+s}return e},D=function(t,e,i){var s=t.style;void 0===s[e]&&(e=A(t,e)),null==i?s.removeProperty?s.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):s.removeAttribute(e):void 0!==s[e]&&(s[e]=i)},O=_.defaultView?_.defaultView.getComputedStyle:f,M=function(t,e,i){var s,r=(t._gsTransform||{})[e];return r||0===r?r:(t.style[e]?r=t.style[e]:(s=O(t))?(t=s.getPropertyValue(e.replace(/([A-Z])/g,"-$1").toLowerCase()),r=t||s.length?t:s[e]):t.currentStyle&&(r=t.currentStyle[e]),i?r:parseFloat(r)||0)},L=function(t,e,i){var s=t.vars,r=s[i],n=t._listeners[e];"function"==typeof r&&r.apply(s[i+"Scope"]||t,s[i+"Params"]||[t.pointerEvent]),n&&t.dispatchEvent(e)},E={x:0,y:0},I=function(t,e){var i,s,r,n,a,o,h,l,u=R(t);if(!u)return l=t.min||t.minX||t.minRotation||0,h=t.min||t.minY||0,void 0!==t.left?t:{left:l,top:h,width:(t.max||t.maxX||t.maxRotation||0)-l,height:(t.max||t.maxY||0)-h};if(i=null!=u.pageYOffset?u.pageYOffset:null!=_.scrollTop?_.scrollTop:_.body.scrollTop||c.scrollTop||0,s=null!=u.pageXOffset?u.pageXOffset:null!=_.scrollLeft?_.scrollLeft:_.body.scrollLeft||c.scrollLeft||0,u===window)return{top:i,left:s,width:c.clientWidth||u.innerWidth||_.body.clientWidth||0,height:u.innerHeight-20e;e++)if(i=t[e],B(i))for(s=i.length,s=0;i.length>s;s++)r.push(i[s]);else r.push(i);return r},j="ontouchstart"in c&&"orientation"in window,q=function(t){for(var e=t.split(","),i=(void 0!==N.onpointerdown?"pointerdown,pointermove,pointerup,pointercancel":void 0!==N.onmspointerdown?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":t).split(","),s={},r=7;--r>-1;)s[e[r]]=i[r],s[i[r]]=e[r];return s}("touchstart,touchmove,touchend,touchcancel"),V=function(t,e,i){t.addEventListener?t.addEventListener(q[e]||e,i,!1):t.attachEvent&&t.attachEvent("on"+e,i)},W=function(t,e,i){t.removeEventListener?t.removeEventListener(q[e]||e,i):t.detachEvent&&t.detachEvent("on"+e,i)},H=function(t){s=t.touches&&t.touches.length>w,W(t.target,"touchend",H)},Q=function(t){s=t.touches&&t.touches.length>w,V(t.target,"touchend",H)},G=999999999999999,$=function(t,e,i,s,r,n){var a,o,h,l={};if(e)if(1!==r&&e instanceof Array)for(l.end=a=[],h=e.length,o=0;h>o;o++)a[o]=e[o]*r;else l.end="function"==typeof e?function(i){return e.call(t,i)*r}:e;return(i||0===i)&&(l.max=i),(s||0===s)&&(l.min=s),n&&(l.velocity=0),l},Z=function(t){var e;return t&&t.getAttribute&&"BODY"!==t.nodeName?"true"===(e=t.getAttribute("data-clickable"))||"false"!==e&&(t.onclick||T.test(t.nodeName+""))?!0:Z(t.parentNode):!1},K=function(){var t,e=_.createElement("div"),i=_.createElement("div"),s=i.style,r=_.body||N;return s.display="inline-block",s.position="relative",e.style.cssText=i.innerHTML="width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden",e.appendChild(i),r.appendChild(e),n=i.offsetHeight+18>e.scrollHeight,s.width="100%",X||(s.paddingRight="500px",t=e.scrollLeft=e.scrollWidth-e.clientWidth,s.left="-90px",t=t!==e.scrollLeft),r.removeChild(e),t}(),J=function(t,i){t=R(t),i=i||{};var s,r,a,o,h,l,u=_.createElement("div"),c=u.style,p=t.firstChild,f=0,m=0,g=t.scrollTop,v=t.scrollLeft,y=0,T=0,w=0;U&&i.force3D!==!1?(h="translate3d(",l="px,0px)"):X&&(h="translate(",l="px)"),this.scrollTop=function(t,e){return arguments.length?(this.top(-t,e),void 0):-this.top()},this.scrollLeft=function(t,e){return arguments.length?(this.left(-t,e),void 0):-this.left()},this.left=function(s,r){if(!arguments.length)return-(t.scrollLeft+m);var n=t.scrollLeft-v,a=m;return(n>2||-2>n)&&!r?(v=t.scrollLeft,e.killTweensOf(this,!0,{left:1,scrollLeft:1}),this.left(-v),i.onKill&&i.onKill(),void 0):(s=-s,0>s?(m=0|s-.5,s=0):s>T?(m=0|s-T,s=T):m=0,(m||a)&&(h?this._suspendTransforms||(c[X]=h+-m+"px,"+-f+l):c.left=-m+"px",K&&m+y>=0&&(c.paddingRight=m+y+"px")),t.scrollLeft=0|s,v=t.scrollLeft,void 0)},this.top=function(s,r){if(!arguments.length)return-(t.scrollTop+f);var n=t.scrollTop-g,a=f;return(n>2||-2>n)&&!r?(g=t.scrollTop,e.killTweensOf(this,!0,{top:1,scrollTop:1}),this.top(-g),i.onKill&&i.onKill(),void 0):(s=-s,0>s?(f=0|s-.5,s=0):s>w?(f=0|s-w,s=w):f=0,(f||a)&&(h?this._suspendTransforms||(c[X]=h+-m+"px,"+-f+l):c.top=-f+"px"),t.scrollTop=0|s,g=t.scrollTop,void 0)},this.maxScrollTop=function(){return w},this.maxScrollLeft=function(){return T},this.disable=function(){for(p=u.firstChild;p;)o=p.nextSibling,t.appendChild(p),p=o;t.removeChild(u)},this.enable=function(){if(p=t.firstChild,p!==u){for(;p;)o=p.nextSibling,u.appendChild(p),p=o;t.appendChild(u),this.calibrate()}},this.calibrate=function(e){var i,o,h=t.clientWidth===s;g=t.scrollTop,v=t.scrollLeft,(!h||t.clientHeight!==r||u.offsetHeight!==a||e)&&((f||m)&&(i=this.left(),o=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),(!h||e)&&(c.display="block",c.width="auto",c.paddingRight="0px",y=Math.max(0,t.scrollWidth-t.clientWidth),y&&(y+=M(t,"paddingLeft")+(n?M(t,"paddingRight"):0))),c.display="inline-block",c.position="relative",c.overflow="visible",c.width="100%",c.paddingRight=y+"px",n&&(c.paddingBottom=M(t,"paddingBottom",!0)),d&&(c.zoom="1"),s=t.clientWidth,r=t.clientHeight,T=t.scrollWidth-s,w=t.scrollHeight-r,a=u.offsetHeight,(i||o)&&(this.left(i),this.top(o)))},this.content=u,this.element=t,this._suspendTransforms=!1,this.enable()},te=function(i,n){t.call(this,i),i=R(i),r||(r=(window.GreenSockGlobals||window).com.greensock.plugins.ThrowPropsPlugin),this.vars=n=n||{},this.target=i,this.x=this.y=this.rotation=0,this.dragResistance=parseFloat(n.dragResistance)||0,this.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,this.lockAxis=n.lockAxis;var u,c,g,T,x,S,A,O,E,N,F,X,U,B,z,H,K,ee,ie,se,re,ne,ae,oe=(n.type||(d?"top,left":"x,y")).toLowerCase(),he=-1!==oe.indexOf("x")||-1!==oe.indexOf("y"),le=-1!==oe.indexOf("rotation"),ue=he?"x":"left",_e=he?"y":"top",ce=-1!==oe.indexOf("x")||-1!==oe.indexOf("left")||"scroll"===oe,pe=-1!==oe.indexOf("y")||-1!==oe.indexOf("top")||"scroll"===oe,fe=this,me=R(n.trigger||n.handle||i),de={},ge=function(t){if(K){var s=fe.x,r=fe.y,n=1e-6;n>s&&s>-n&&(s=0),n>r&&r>-n&&(r=0),le?(U.rotation=fe.rotation=fe.x,e.set(i,X)):u?(pe&&u.top(r),ce&&u.left(s)):he?(pe&&(U.y=r),ce&&(U.x=s),e.set(i,X)):(pe&&(i.style.top=r+"px"),ce&&(i.style.left=s+"px")),A&&!t&&L(fe,"drag","onDrag")}K=!1},ve=function(t,e){var s;he?(fe.y=i._gsTransform.y,fe.x=i._gsTransform.x):le?fe.x=fe.rotation=i._gsTransform.rotation:u?(fe.y=u.top(),fe.x=u.left()):(fe.y=parseInt(i.style.top,10)||0,fe.x=parseInt(i.style.left,10)||0),!ie&&!se||e||(ie&&(s=ie(fe.x),s!==fe.x&&(fe.x=s,le&&(fe.rotation=s),K=!0)),se&&(s=se(fe.y),s!==fe.y&&(fe.y=s,K=!0)),K&&ge(!0)),n.onThrowUpdate&&!t&&n.onThrowUpdate.apply(n.onThrowUpdateScope||fe,n.onThrowUpdateParams||p)},ye=function(){var t,e,s,r;S=!1,u?(u.calibrate(),fe.minX=E=-u.maxScrollLeft(),fe.minY=F=-u.maxScrollTop(),fe.maxX=O=fe.maxY=N=0,S=!0):n.bounds&&(t=I(n.bounds),le?(fe.minX=E=t.left,fe.maxX=O=t.left+t.width,fe.minY=F=fe.maxY=N=0):void 0!==n.bounds.maxX||void 0!==n.bounds.maxY?(t=n.bounds,fe.minX=E=t.minX,fe.minY=F=t.minY,fe.maxX=O=t.maxX,fe.maxY=N=t.maxY):(e=I(i),fe.minX=E=(he?0:M(i,"left"))+t.left-e.left,fe.minY=F=(he?0:M(i,"top"))+t.top-e.top,fe.maxX=O=E+(t.width-e.width),fe.maxY=N=F+(t.height-e.height)),E>O&&(fe.minX=O,fe.maxX=O=E,E=fe.minX),F>N&&(fe.minY=N,fe.maxY=N=F,F=fe.minY),le&&(fe.minRotation=E,fe.maxRotation=O),S=!0),n.liveSnap&&(s=n.liveSnap===!0?n.snap||{}:n.liveSnap,r=s instanceof Array||"function"==typeof s,le?(ie=be(r?s:s.rotation,E,O,1),se=null):(ie=be(r?s:s.x||s.left||s.scrollLeft,E,O,u?-1:1),se=be(r?s:s.y||s.top||s.scrollTop,F,N,u?-1:1)))},Te=function(t,e){var s,a,o;t&&r?(t===!0&&(s=n.snap||{},a=s instanceof Array||"function"==typeof s,t={resistance:(n.throwResistance||n.resistance||1e3)/(le?10:1)},le?t.rotation=$(fe,a?s:s.rotation,O,E,1,e):(ce&&(t[ue]=$(fe,a?s:s.x||s.left||s.scrollLeft,O,E,u?-1:1,e||fe.lockAxis&&"x"===ae)),pe&&(t[_e]=$(fe,a?s:s.y||s.top||s.scrollTop,N,F,u?-1:1,e||fe.lockAxis&&"y"===ae)))),fe.tween=o=r.to(u||i,{throwProps:t,ease:n.ease||Power3.easeOut,onComplete:n.onThrowComplete,onCompleteParams:n.onThrowCompleteParams,onCompleteScope:n.onThrowCompleteScope||fe,onUpdate:n.fastMode?n.onThrowUpdate:ve,onUpdateParams:n.onThrowUpdateParams,onUpdateScope:n.onThrowUpdateScope||fe},isNaN(n.maxDuration)?2:n.maxDuration,isNaN(n.minDuration)?.5:n.minDuration,isNaN(n.overshootTolerance)?1-fe.edgeResistance+.2:n.overshootTolerance),n.fastMode||(u&&(u._suspendTransforms=!0),o.seek(o.duration()),ve(!0,!0),fe.endX=fe.x,fe.endY=fe.y,le&&(fe.endRotation=fe.x),o.play(0),ve(!0,!0),u&&(u._suspendTransforms=!1))):S&&fe.applyBounds()},we=function(){var t=1-fe.edgeResistance;u?(ye(),x=u.top(),T=u.left()):(xe()?(ve(!0,!0),ye()):fe.applyBounds(),le?(H=Y(i),ve(!0,!0),T=fe.x,x=fe.y=Math.atan2(H.top-g,c-H.left)*m):(x=M(i,_e),T=M(i,ue))),S&&t&&(T>O?T=O+(T-O)/t:E>T&&(T=E-(E-T)/t),le||(x>N?x=N+(x-N)/t:F>x&&(x=F-(F-x)/t)))},xe=function(){return fe.tween&&fe.tween.isActive()},be=function(t,e,i,s){return"function"==typeof t?function(r){var n=fe.isDragging?1-fe.edgeResistance:1;return t.call(fe,r>i?i+(r-i)*n:e>r?e+(r-e)*n:r)*s}:t instanceof Array?function(s){for(var r,n,a=t.length,o=0,h=G;--a>-1;)r=t[a],n=r-s,0>n&&(n=-n),h>n&&r>=e&&i>=r&&(o=a,h=n);return t[o]}:isNaN(t)?function(t){return t}:function(){return t*s}},Pe=function(t){if(!fe.isDragging&&t){if(fe.pointerEvent=t,q[t.type]?(ne=-1!==t.type.indexOf("touch")?me:_,V(ne,"touchend",Ce),V(ne,"touchmove",Se),V(ne,"touchcancel",Ce),V(_,"touchstart",Q)):(ne=null,V(_,"mousemove",Se),V(_,"mouseup",Ce)),re=Z(t.target)&&!n.dragClickables)return V(t.target,"change",Ce),void 0;d?t=k(t,!0):t.touches&&t.touches.length>w+1||(t.preventDefault(),t.preventManipulation&&t.preventManipulation()),t.changedTouches?(t=B=t.changedTouches[0],z=t.identifier):t.pointerId?z=t.pointerId:B=null,w++,b(ge),fe.tween&&fe.tween.kill(),e.killTweensOf(u||i,!0,de),g=fe.pointerY=t.pageY,c=fe.pointerX=t.pageX,we(),fe.tween=ae=null,le||u||n.zIndexBoost===!1||(i.style.zIndex=te.zIndex++),fe.isDragging=!0,A=!(!n.onDrag&&!fe._listeners.drag),K=!1,le||D(me,"cursor",n.cursor||"move"),L(fe,"dragstart","onDragStart")}},Se=function(t){if(!s&&fe.isDragging){d?t=k(t,!0):(t.preventDefault(),t.preventManipulation&&t.preventManipulation()),fe.pointerEvent=t;var e,i,r,n,a,o,h=t.changedTouches,l=1-fe.dragResistance,u=1-fe.edgeResistance;if(h){if(t=h[0],t!==B&&t.identifier!==z){for(a=h.length;--a>-1&&(t=h[a]).identifier!==z;);if(0>a)return}}else if(t.pointerId&&z&&t.pointerId!==z)return;fe.pointerX=t.pageX,fe.pointerY=t.pageY,K=!0,le?(n=Math.atan2(H.top-t.pageY,t.pageX-H.left)*m,o=fe.y-n,fe.y=n,o>180?x-=360:-180>o&&(x+=360),r=T+(x-n)*l):(i=t.pageY-g,e=t.pageX-c,2>i&&i>-2&&(i=0),2>e&&e>-2&&(e=0),fe.lockAxis&&(e||i)&&("y"===ae||!ae&&Math.abs(e)>Math.abs(i)&&ce?(i=0,ae="y"):pe&&(e=0,ae="x")),r=T+e*l,n=x+i*l),ie||se?(ie&&(r=ie(r)),se&&(n=se(n))):S&&(r>O?r=O+(r-O)*u:E>r&&(r=E+(r-E)*u),le||(n>N?n=N+(n-N)*u:F>n&&(n=F+(n-F)*u))),fe.x!==r||fe.y!==n&&!le?(fe.x=fe.endX=r,le?fe.endRotation=r:fe.y=fe.endY=n):K=!1}},Ce=function(t,e){if(!t||!z||e||!t.pointerId||t.pointerId===z){var i,s,r,a,o=t;if(ne?(W(ne,"touchend",Ce),W(ne,"touchmove",Se),W(ne,"touchcancel",Ce),W(_,"touchstart",Q)):(W(_,"mouseup",Ce),W(_,"mousemove",Se)),K=!1,re)return t&&W(t.target,"change",Ce),L(fe,"click","onClick"),re=!1,void 0;if(P(ge),le||D(me,"cursor",n.cursor||"move"),fe.isDragging=!1,w--,t){if(d&&(t=k(t,!1)),i=t.changedTouches,i&&(t=i[0],t!==B&&t.identifier!==z)){for(a=i.length;--a>-1&&(t=i[a]).identifier!==z;);if(0>a)return}fe.pointerEvent=o,fe.pointerX=t.pageX,fe.pointerY=t.pageY,r=t.pageY-g,s=t.pageX-c}return o&&2>s&&s>-2&&2>r&&r>-2?L(fe,"click","onClick"):(Te(n.throwProps),d||!o||!n.dragClickables&&Z(o.target)||(o.preventDefault(),o.preventManipulation&&o.preventManipulation())),L(fe,"dragend","onDragEnd"),!0}};this.startDrag=Pe,this.endDrag=function(t){Ce(t,!0)},this.applyBounds=function(t){var e,i;return t&&n.bounds!==t?(n.bounds=t,fe.update(!0)):(ve(!0),ye(),S&&(e=fe.x,i=fe.y,S&&(e>O?e=O:E>e&&(e=E),i>N?i=N:F>i&&(i=F)),(fe.x!==e||fe.y!==i)&&(fe.x=fe.endX=e,le?fe.endRotation=e:fe.y=fe.endY=i,K=!0,ge())),fe)},this.update=function(t){var e=fe.x,i=fe.y;return t?fe.applyBounds():ve(!0),fe.isDragging&&(e!==fe.x||i!==fe.y&&!le)&&we(),fe},this.enable=function(){var t;return V(me,"mousedown",Pe),V(me,"touchstart",Pe),le||D(me,"cursor",n.cursor||"move"),me.ondragstart=me.onselectstart=f,D(me,"userSelect","none"),D(me,"touchCallout","none"),D(me,"touchAction","none"),r&&r.track(u||i,he?"x,y":le?"rotation":"top,left"),u&&u.enable(),i._gsDragID=t="d"+y++,v[t]=this,u&&(u.element._gsDragID=t),e.set(i,{x:"+=0"}),this.update(),fe},this.disable=function(){var t=this.isDragging;return le||D(me,"cursor",null),e.killTweensOf(u||i,!0,de),me.ondragstart=me.onselectstart=null,D(me,"userSelect","text"),D(me,"touchCallout","default"),D(me,"MSTouchAction","auto"),W(me,"mousedown",Pe),W(me,"touchstart",Pe),ne&&(W(ne,"touchcancel",Ce),W(ne,"touchend",Ce),W(ne,"touchmove",Se)),W(_,"mouseup",Ce),W(_,"mousemove",Se),r&&r.untrack(u||i,he?"x,y":le?"rotation":"top,left"),u&&u.disable(),P(ge),delete v[i._gsDragID],this.isDragging=re=!1,t&&L(this,"dragend","onDragEnd"),fe},-1!==oe.indexOf("scroll")&&(u=this.scrollProxy=new J(i,C({onKill:function(){fe.isDragging&&Ce(null)}},n)),i.style.overflowY=pe&&!j?"auto":"hidden",i.style.overflowX=ce&&!j?"auto":"hidden",i=u.content),n.force3D!==!1&&e.set(i,{force3D:!0}),le?de.rotation=1:(ce&&(de[ue]=1),pe&&(de[_e]=1)),le?(X=l,U=X.css,X.overwrite=!1):he&&(X=ce&&pe?a:ce?o:h,U=X.css,X.overwrite=!1),ee=te.get(this.target),ee&&ee.disable(),this.isDragging=!1,this.enable()},ee=te.prototype=new t;return ee.constructor=te,ee.pointerX=ee.pointerY=0,te.version="0.9.6",te.zIndex=1e3,V(_,"touchcancel",function(){}),te.create=function(t,i){"string"==typeof t&&(t=e.selector(t));for(var s=B(t)?z(t):[t],r=s.length;--r>-1;)s[r]=new te(s[r],i);return s},te.get=function(t){return v[(R(t)||{})._gsDragID]},te},!0)}),window._gsDefine&&window._gsQueue.pop()();
/*!
* ScrambleTextPlugin
* VERSION: 0.2.0
* DATE: 2013-03-25
* UPDATES AND DOCS AT: http://www.greensock.com
*
* @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
* ScrambleTextPlugin is a Club GreenSock membership benefit; You must have a valid membership to use
* this code without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.
* This work is subject to the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";var t=function(e){var i=e.nodeType,s="";if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)s+=t(e)}else if(3===i||4===i)return e.nodeValue;return s},e=function(t,e){for(var i=e.length,s="";--t>-1;)s+=e[0|Math.random()*i];return s},i=function(t){this.chars=t.split(""),this.sets=[],this.length=50;var i;for(i=0;20>i;i++)this.sets[i]=e(80,this.chars);this.grow=function(t){for(i=0;20>i;i++)this.sets[i]+=e(t-this.length,this.chars);this.length=t}},s="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=s.toLowerCase(),n={upperCase:new i(s),lowerCase:new i(r),upperAndLowerCase:new i(s+r)},a=window._gsDefine.plugin({propName:"scrambleText",API:2,overwriteProps:["scrambleText","text"],init:function(e,s,r){if(!("innerHTML"in e))return!1;this._target=e,"object"!=typeof s&&(s={text:s});var a,o,l,h;return this._delimiter=a=s.delimiter||"",this._original=t(e).replace(/\s+/g," ").split(" ").join("").split(a),this._text=(s.text||s.value||"").replace(/\s+/g," ").split(a),this._hasClass=!1,"string"==typeof s.newClass&&(this._newClass=s.newClass,this._hasClass=!0),"string"==typeof s.oldClass&&(this._oldClass=s.oldClass,this._hasClass=!0),o=this._text.length-this._original.length,this._length=this._original.join(a).length,this._lengthDif=this._text.join(a).length-this._length,this._fillChar=s.fillChar||s.chars&&-1!==s.chars.indexOf(" ")?" ":"",this._charSet=h=n[s.chars||"upperCase"]||new i(s.chars),this._speed=.016/(s.speed||1),this._prevScrambleTime=0,this._setIndex=0|20*Math.random(),l=this._length+Math.max(this._lengthDif,0),l>h.length&&h.grow(l),this._chars=h.sets[this._setIndex],this._revealDelay=s.revealDelay||0,this._tweenLength=s.tweenLength!==!1,this._tween=r,!0},set:function(t){var e,i,s,r,n,a,o=this._text.length,l=this._delimiter,h=this._tween._time,u=h-this._prevScrambleTime;this._revealDelay&&(this._tween.vars.runBackwards&&(h=this._tween._duration-h),t=0===h?0:this._revealDelay>h?1e-6:h===this._tween._duration?1:this._tween._ease.getRatio((h-this._revealDelay)/(this._tween._duration-this._revealDelay))),0>t?t=0:t>1&&(t=1),e=0|t*o+.5,i=this._text.slice(0,e).join(l),s=this._original.slice(e).join(l),t&&((u>this._speed||-this._speed>u)&&(this._setIndex=(this._setIndex+(0|19*Math.random()))%20,this._chars=this._charSet.sets[this._setIndex],this._prevScrambleTime+=u),s=this._chars.substr(i.length,0|this._length+(this._tweenLength?1-(t=1-t)*t*t*t:1)*this._lengthDif-i.length+.5)),this._hasClass?(r=this._newClass&&0!==e,n=this._oldClass&&e!==o,a=(r?"":"")+i+(r?"":"")+(n?"":"")+l+s+(n?"":"")):a=i+l+s,this._target.innerHTML=" "===this._fillChar&&-1!==a.indexOf(" ")?a.split(" ").join(" "):a}}),o=a.prototype;o._newClass=o._oldClass="";for(o in n)n[o.toLowerCase()]=n[o],n[o.toUpperCase()]=n[o]}),window._gsDefine&&window._gsQueue.pop()();
/*!
* Physics2DPlugin
* VERSION: 0.1.1
* DATE: 2013-03-27
* UPDATES AND DOCS AT: http://www.greensock.com
*
* @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
* Physics2DPlugin is a Club GreenSock membership benefit; You must have a valid membership to use
* this code without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.
* This work is subject to the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";var t=Math.PI/180,e=function(t,e,i,r,s){this.p=e,this.f="function"==typeof t[e],this.start=this.value=this.f?t[e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3)]():parseFloat(t[e]),this.velocity=i||0,this.v=this.velocity/s,r||0===r?(this.acceleration=r,this.a=this.acceleration/(s*s)):this.acceleration=this.a=0},i=Math.random(),r=window._gsDefine.globals.com.greensock.core.Animation._rootFramesTimeline,s=window._gsDefine.plugin({propName:"physics2D",API:2,init:function(i,s,n){this._target=i,this._tween=n,this._runBackwards=n.vars.runBackwards===!0,this._step=0;for(var a,o=n._timeline,l=Number(s.angle)||0,h=Number(s.velocity)||0,u=Number(s.acceleration)||0,_=s.xProp||"x",p=s.yProp||"y",f=s.accelerationAngle||0===s.accelerationAngle?Number(s.accelerationAngle):l;o._timeline;)o=o._timeline;return this._stepsPerTimeUnit=a=o===r?1:30,s.gravity&&(u=Number(s.gravity),f=90),l*=t,f*=t,this._friction=1-Number(s.friction||0),this._overwriteProps.push(_),this._overwriteProps.push(p),this._x=new e(i,_,Math.cos(l)*h,Math.cos(f)*u,a),this._y=new e(i,p,Math.sin(l)*h,Math.sin(f)*u,a),this._skipX=this._skipY=!1,!0},set:function(){var t,e,i,r,s,n,a=this._tween._time,o=this._x,l=this._y;if(this._runBackwards===!0&&(a=this._tween._duration-a),1===this._friction)i=.5*a*a,t=o.start+(o.velocity*a+o.acceleration*i),e=l.start+(l.velocity*a+l.acceleration*i);else{if(a*=this._stepsPerTimeUnit,r=n=(0|a)-this._step,s=a%1,n>=0)for(;--n>-1;)o.v+=o.a,l.v+=l.a,o.v*=this._friction,l.v*=this._friction,o.value+=o.v,l.value+=l.v;else for(n=-n;--n>-1;)o.value-=o.v,l.value-=l.v,o.v/=this._friction,l.v/=this._friction,o.v-=o.a,l.v-=l.a;t=o.value+o.v*s,e=l.value+l.v*s,this._step+=r}this._skipX||(o.r&&(t=0|t+(0>t?-.5:.5)),o.f?this._target[o.p](t):this._target[o.p]=t),this._skipY||(l.r&&(e=0|e+(0>e?-.5:.5)),l.f?this._target[l.p](e):this._target[l.p]=e)}}),n=s.prototype;n._kill=function(t){return null!=t[this._x.p]&&(this._skipX=!0),null!=t[this._y.p]&&(this._skipY=!0),this._super._kill(t)},n._roundProps=function(t,e){(t.physics2D||t[this._x.p])&&(this._x.r=e),(t.physics2D||t[this._y.p])&&(this._y.r=e)},s._autoCSS=!0,s._cssRegister=function(){var t=window._gsDefine.globals.CSSPlugin;if(t){var e=t._internals,r=e._parseToProxy,n=e._setPluginRatio,a=e.CSSPropTween;e._registerComplexSpecialProp("physics2D",{parser:function(t,e,o,l,h,u){u=new s;var _,p=e.xProp||"x",f=e.yProp||"y",c={};return c[p]=c[f]=i++,_=r(t,c,l,h,u),h=new a(t,"physics2D",0,0,_.pt,2),h.data=_,h.plugin=u,h.setRatio=n,u._onInitTween(_.proxy,e,l._tween),h}})}}}),window._gsDefine&&window._gsQueue.pop()();
/*!
* PhysicsPropsPlugin
* VERSION: 0.1.0
* DATE: 2013-03-27
* UPDATES AND DOCS AT: http://www.greensock.com
*
* @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
* PhysicsPropsPlugin is a Club GreenSock membership benefit; You must have a valid membership to use
* this code without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.
* This work is subject to the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";var t=function(t,e,i,s,r,n){this.p=e,this.f="function"==typeof t[e],this.start=this.value=this.f?t[e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3)]():parseFloat(t[e]),this.velocity=i||0,this.v=this.velocity/n,s||0==s?(this.acceleration=s,this.a=this.acceleration/(n*n)):this.acceleration=this.a=0,this.friction=1-(r||0)},e=Math.random(),i=window._gsDefine.globals.com.greensock.core.Animation._rootFramesTimeline,s=window._gsDefine.plugin({propName:"physicsProps",API:2,init:function(e,s,r){this._target=e,this._tween=r,this._runBackwards=r.vars.runBackwards===!0,this._step=0;for(var n,a,o=r._timeline,l=0;o._timeline;)o=o._timeline;this._stepsPerTimeUnit=o===i?1:30,this._props=[];for(n in s)a=s[n],(a.velocity||a.acceleration)&&(this._props[l++]=new t(e,n,a.velocity,a.acceleration,a.friction,this._stepsPerTimeUnit),this._overwriteProps[l]=n,a.friction&&(this._hasFriction=!0));return!0},set:function(){var t,e,i,s,r,n,a=this._props.length,o=this._tween._time,l=this._target;if(this._runBackwards&&(o=this._tween._duration-o),this._hasFriction){if(o*=this._stepsPerTimeUnit,i=(0|o)-this._step,s=o%1,i>=0)for(;--a>-1;){for(t=this._props[a],r=i;--r>-1;)t.v+=t.a,t.v*=t.friction,t.value+=t.v;e=t.value+t.v*s,t.r&&(e=0|e+(0>e?-.5:.5)),t.f?l[t.p](e):l[t.p]=e}else for(;--a>-1;){for(t=this._props[a],r=-i;--r>-1;)t.value-=t.v,t.v/=t.friction,t.v-=t.a;e=t.value+t.v*s,t.r&&(e=0|e+(0>e?-.5:.5)),t.f?l[t.p](e):l[t.p]=e}this._step+=i}else for(n=.5*o*o;--a>-1;)t=this._props[a],e=t.start+(t.velocity*o+t.acceleration*n),t.r&&(e=0|e+(0>e?-.5:.5)),t.f?l[t.p](e):l[t.p]=e}}),r=s.prototype;r._kill=function(t){for(var e=this._props.length;--e>-1;)this._props[e].p in t&&this._props.splice(e,1);return this._super._kill(t)},r._roundProps=function(t,e){for(var i=this._props.length;--i>-1;)("physicsProps"in t||this._props[i].p in t)&&(this._props[i].r=e)},s._autoCSS=!0,s._cssRegister=function(){var t=window._gsDefine.globals.CSSPlugin;if(t){var i=t._internals,r=i._parseToProxy,n=i._setPluginRatio,a=i.CSSPropTween;i._registerComplexSpecialProp("physicsProps",{parser:function(t,i,o,l,h,u){u=new s;var _,p,f={};i.scale&&(i.scaleX=i.scaleY=i.scale,delete i.scale);for(_ in i)f[_]=e++;return p=r(t,f,l,h,u),h=new a(t,"physicsProps",0,0,p.pt,2),h.data=p,h.plugin=u,h.setRatio=n,u._onInitTween(p.proxy,i,l._tween),h}})}}}),window._gsDefine&&window._gsQueue.pop()();
/*!
* ScrollToPlugin
* VERSION: beta 1.7.1
* DATE: 2013-10-23
* UPDATES AND DOCS AT: http://www.greensock.com
*
* @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
* This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
**/
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";var t=document.documentElement,e=window,i=function(i,s){var r="x"===s?"Width":"Height",n="scroll"+r,a="client"+r,o=document.body;return i===e||i===t||i===o?Math.max(t[n],o[n])-(e["inner"+r]||Math.max(t[a],o[a])):i[n]-i["offset"+r]},s=window._gsDefine.plugin({propName:"scrollTo",API:2,init:function(t,s,r){return this._wdw=t===e,this._target=t,this._tween=r,"object"!=typeof s&&(s={y:s}),this._autoKill=s.autoKill!==!1,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=s.x?this._addTween(this,"x",this.x,"max"===s.x?i(t,"x"):s.x,"scrollTo_x",!0):this.skipX=!0,null!=s.y?this._addTween(this,"y",this.y,"max"===s.y?i(t,"y"):s.y,"scrollTo_y",!0):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var i=this._wdw||!this.skipX?this.getX():this.xPrev,s=this._wdw||!this.skipY?this.getY():this.yPrev,r=s-this.yPrev,n=i-this.xPrev;this._autoKill&&(!this.skipX&&(n>7||-7>n)&&(this.skipX=!0),!this.skipY&&(r>7||-7>r)&&(this.skipY=!0),this.skipX&&this.skipY&&this._tween.kill()),this._wdw?e.scrollTo(this.skipX?i:this.x,this.skipY?s:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),r=s.prototype;s.max=i,r.getX=function(){return this._wdw?null!=e.pageXOffset?e.pageXOffset:null!=t.scrollLeft?t.scrollLeft:document.body.scrollLeft:this._target.scrollLeft},r.getY=function(){return this._wdw?null!=e.pageYOffset?e.pageYOffset:null!=t.scrollTop?t.scrollTop:document.body.scrollTop:this._target.scrollTop},r._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),window._gsDefine&&window._gsQueue.pop()();
/*!
* TextPlugin
* VERSION: 0.5.0
* DATE: 2013-07-10
* UPDATES AND DOCS AT: http://www.greensock.com
*
* @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
* This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";var t=function(e){var i=e.nodeType,s="";if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)s+=t(e)}else if(3===i||4===i)return e.nodeValue;return s},e=window._gsDefine.plugin({propName:"text",API:2,init:function(e,i,s){var r,n;if(!("innerHTML"in e))return!1;if(this._target=e,"object"!=typeof i&&(i={value:i}),void 0===i.value)return this._text=this._original=[""],!0;for(this._delimiter=i.delimiter||"",this._original=t(e).replace(/\s+/g," ").split(this._delimiter),this._text=i.value.replace(/\s+/g," ").split(this._delimiter),this._runBackwards=s.vars.runBackwards===!0,this._runBackwards&&(r=this._original,this._original=this._text,this._text=r),"string"==typeof i.newClass&&(this._newClass=i.newClass,this._hasClass=!0),"string"==typeof i.oldClass&&(this._oldClass=i.oldClass,this._hasClass=!0),r=this._original.length-this._text.length,n=0>r?this._original:this._text,this._fillChar=i.fillChar||(i.padSpace?" ":""),0>r&&(r=-r);--r>-1;)n.push(this._fillChar);return!0},set:function(t){t>1?t=1:0>t&&(t=0),this._runBackwards&&(t=1-t);var e,i,s,r=this._text.length,n=0|t*r+.5;this._hasClass?(e=this._newClass&&0!==n,i=this._oldClass&&n!==r,s=(e?"":"")+this._text.slice(0,n).join(this._delimiter)+(e?"":"")+(i?"":"")+this._delimiter+this._original.slice(n).join(this._delimiter)+(i?"":"")):s=this._text.slice(0,n).join(this._delimiter)+this._delimiter+this._original.slice(n).join(this._delimiter),this._target.innerHTML=" "===this._fillChar&&-1!==s.indexOf(" ")?s.split(" ").join(" "):s}}),i=e.prototype;i._newClass=i._oldClass=i._delimiter=""}),window._gsDefine&&window._gsQueue.pop()();
/*!
* ThrowPropsPlugin
* VERSION: 0.9.0
* DATE: 2013-10-21
* JavaScript (also available in ActionScript 3 and 2)
* UPDATES AND DOCS AT: http://www.greensock.com
*
* @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
* ThrowPropsPlugin is a Club GreenSock membership benefit; You must have a valid membership to use
* this code without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.
* This work is subject to the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";window._gsDefine("plugins.ThrowPropsPlugin",["plugins.TweenPlugin","TweenLite","easing.Ease","utils.VelocityTracker"],function(t,e,i,s){var r,n,a,o,l=function(){t.call(this,"throwProps"),this._overwriteProps.length=0},h=999999999999999,u={x:1,y:1,z:2,scale:1,scaleX:1,scaleY:1,rotation:1,rotationZ:1,rotationX:2,rotationY:2,skewX:1,skewY:1},_=function(t,e,i,s){for(var r,n,a=e.length,o=0,l=h;--a>-1;)r=e[a],n=r-t,0>n&&(n=-n),l>n&&r>=s&&i>=r&&(o=a,l=n);return e[o]},p=function(t,e,i,s){if("auto"===t.end)return t;i=isNaN(i)?h:i,s=isNaN(s)?-h:s;var r="function"==typeof t.end?t.end(e):t.end instanceof Array?_(e,t.end,i,s):Number(t.end);return r>i?r=i:s>r&&(r=s),{max:r,min:r}},c=l.calculateChange=function(t,s,r,n){null==n&&(n=.05);var a=s instanceof i?s:s?new i(s):e.defaultEase;return r*n*t/a.getRatio(n)},f=l.calculateDuration=function(t,s,r,n,a){a=a||.05;var o=n instanceof i?n:n?new i(n):e.defaultEase;return Math.abs((s-t)*o.getRatio(a)/r/a)},d=l.calculateTweenDuration=function(t,r,n,a,o){if("string"==typeof t&&(t=e.selector(t)),!t)return 0;null==n&&(n=10),null==a&&(a=.2),null==o&&(o=1),t.length&&(t=t[0]||t);var h,u,_,d,m,g,v,y,w,x,T=0,b=9999999999,P=r.throwProps||r,k=r.ease instanceof i?r.ease:r.ease?new i(r.ease):e.defaultEase,S=isNaN(P.checkpoint)?.05:Number(P.checkpoint),C=isNaN(P.resistance)?l.defaultResistance:Number(P.resistance);for(h in P)"resistance"!==h&&"checkpoint"!==h&&(u=P[h],"object"!=typeof u&&(w=w||s.getByTarget(t),w&&w.isTrackingProp(h)?u="number"==typeof u?{velocity:u}:{velocity:w.getVelocity(h)}:(d=Number(u)||0,_=d*C>0?d/C:d/-C)),"object"==typeof u&&(void 0!==u.velocity&&"number"==typeof u.velocity?d=Number(u.velocity)||0:(w=w||s.getByTarget(t),d=w&&w.isTrackingProp(h)?w.getVelocity(h):0),m=isNaN(u.resistance)?C:Number(u.resistance),_=d*m>0?d/m:d/-m,g="function"==typeof t[h]?t[h.indexOf("set")||"function"!=typeof t["get"+h.substr(3)]?h:"get"+h.substr(3)]():t[h]||0,v=g+c(d,k,_,S),void 0!==u.end&&(u=p(u,v,u.max,u.min)),void 0!==u.max&&v>Number(u.max)?(x=u.unitFactor||1,y=g>u.max&&u.min!==u.max||d*x>-15&&45>d*x?a+.1*(n-a):f(g,u.max,d,k,S),b>y+o&&(b=y+o)):void 0!==u.min&&Number(u.min)>v&&(x=u.unitFactor||1,y=u.min>g&&u.min!==u.max||d*x>-45&&15>d*x?a+.1*(n-a):f(g,u.min,d,k,S),b>y+o&&(b=y+o)),y>T&&(T=y)),_>T&&(T=_));return T>b&&(T=b),T>n?n:a>T?a:T},m=l.prototype=new t("throwProps");return m.constructor=l,l.version="0.9.0",l.API=2,l._autoCSS=!0,l.defaultResistance=100,l.track=function(t,e,i){return s.track(t,e,i)},l.untrack=function(t,e){s.untrack(t,e)},l.isTracking=function(t,e){return s.isTracking(t,e)},l.getVelocity=function(t,e){var i=s.getByTarget(t);return i?i.getVelocity(e):0/0},l._cssRegister=function(){var t=(window.GreenSockGlobals||window).com.greensock.plugins.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,a=e._setPluginRatio,o=e.CSSPropTween;e._registerComplexSpecialProp("throwProps",{parser:function(t,e,h,_,p,c){c=new l;var f,d,m,g,v,y={},w={},x={},T={},b={};n={};for(m in e)"resistance"!==m&&(d=e[m],"object"==typeof d?(void 0!==d.velocity&&"number"==typeof d.velocity?y[m]=Number(d.velocity)||0:(v=v||s.getByTarget(t),y[m]=v&&v.isTrackingProp(m)?v.getVelocity(m):0),void 0!==d.end&&(T[m]=d.end),void 0!==d.min&&(w[m]=d.min),void 0!==d.max&&(x[m]=d.max),void 0!==d.resistance&&(f=!0,b[m]=d.resistance)):"number"==typeof d?y[m]=d:(v=v||s.getByTarget(t),y[m]=v&&v.isTrackingProp(m)?v.getVelocity(m):d||0),u[m]&&_._enableTransforms(2===u[m]));g=i(t,y,_,p,c),r=g.proxy,y=g.end;for(m in r)n[m]={velocity:y[m],min:w[m],max:x[m],end:T[m],resistance:b[m]};return null!=e.resistance&&(n.resistance=e.resistance),p=new o(t,"throwProps",0,0,g.pt,2),p.plugin=c,p.setRatio=a,p.data=g,c._onInitTween(r,n,_._tween),p}})}},l.to=function(t,i,s,l,h){i.throwProps||(i={throwProps:i});var u=new e(t,1,i);return u.render(0,!0,!0),u.vars.css?(u.duration(d(r,{throwProps:n,ease:i.ease},s,l,h)),u._delay&&!u.vars.immediateRender?u.invalidate():a._onInitTween(r,o,u),u):(u.kill(),new e(t,d(t,i,s,l,h),i))},m._onInitTween=function(t,e,i){this.target=t,this._props=[],a=this,o=e;var r,n,l,h,u,_,f,d,m,g=i._ease,v=isNaN(e.checkpoint)?.05:Number(e.checkpoint),y=i._duration,w=0;for(r in e)if("resistance"!==r&&"checkpoint"!==r){if(n=e[r],"number"==typeof n)u=Number(n)||0;else if("object"!=typeof n||isNaN(n.velocity)){if(m=m||s.getByTarget(t),!m||!m.isTrackingProp(r))throw"ERROR: No velocity was defined in the throwProps tween of "+t+" property: "+r;u=m.getVelocity(r)}else u=Number(n.velocity);_=c(u,g,y,v),d=0,h="function"==typeof t[r],l=h?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():t[r],"object"==typeof n&&(f=l+_,void 0!==n.end&&(n=p(n,f,n.max,n.min)),void 0!==n.max&&f>Number(n.max)?d=n.max-l-_:void 0!==n.min&&Number(n.min)>f&&(d=n.min-l-_)),this._props[w++]={p:r,s:l,c1:_,c2:d,f:h,r:!1},this._overwriteProps[w]=r}return!0},m._kill=function(e){for(var i=this._props.length;--i>-1;)null!=e[this._props[i].p]&&this._props.splice(i,1);return t.prototype._kill.call(this,e)},m._roundProps=function(t,e){for(var i=this._props,s=i.length;--s>-1;)(t[i[s]]||t.throwProps)&&(i[s].r=e)},m.setRatio=function(t){for(var e,i,s=this._props.length;--s>-1;)e=this._props[s],i=e.s+e.c1*t+e.c2*t*t,e.r&&(i=0|i+(i>0?.5:-.5)),e.f?this.target[e.p](i):this.target[e.p]=i},t.activate([l]),l},!0),window._gsDefine("utils.VelocityTracker",["TweenLite"],function(t){var e,i,s,r,n=/([A-Z])/g,a={},o={x:1,y:1,z:2,scale:1,scaleX:1,scaleY:1,rotation:1,rotationZ:1,rotationX:2,rotationY:2,skewX:1,skewY:1},l=document.defaultView?document.defaultView.getComputedStyle:function(){},h=function(t,e,i){var s=(t._gsTransform||a)[e];return s||0===s?s:(t.style[e]?s=t.style[e]:(i=i||l(t,null))?(t=i.getPropertyValue(e.replace(n,"-$1").toLowerCase()),s=t||i.length?t:i[e]):t.currentStyle&&(i=t.currentStyle,s=i[e]),parseFloat(s)||0)},u=t.ticker,_=function(t,e,i){this.p=t,this.f=e,this.v1=this.v2=0,this.t1=this.t2=u.time,this.css=!1,this.type="",this._prev=null,i&&(this._next=i,i._prev=this)},p=function(){var t,i,n=e,a=u.time;if(a-s>=.03)for(r=s,s=a;n;){for(i=n._firstVP;i;)t=i.css?h(n.target,i.p):i.f?n.target[i.p]():n.target[i.p],(t!==i.v1||a-i.t1>.15)&&(i.v2=i.v1,i.v1=t,i.t2=i.t1,i.t1=a),i=i._next;n=n._next}},c=function(t){this._lookup={},this.target=t,this.elem=t.style&&t.nodeType?!0:!1,i||(u.addEventListener("tick",p,null,!1,-100),s=r=u.time,i=!0),e&&(this._next=e,e._prev=this),e=this},f=c.getByTarget=function(t){for(var i=e;i;){if(i.target===t)return i;i=i._next}},d=c.prototype;return d.addProp=function(e,i){if(!this._lookup[e]){var s=this.target,r="function"==typeof s[e],n=r?this._altProp(e):e,a=this._firstVP;this._firstVP=this._lookup[e]=this._lookup[n]=a=new _(n!==e&&0===e.indexOf("set")?n:e,r,a),a.css=this.elem&&(void 0!==this.target.style[a.p]||o[a.p]),a.css&&o[a.p]&&!s._gsTransform&&t.set(s,{x:"+=0"}),a.type=i||a.css&&0===e.indexOf("rotation")?"deg":"",a.v1=a.v2=a.css?h(s,a.p):r?s[a.p]():s[a.p]}},d.removeProp=function(t){var e=this._lookup[t];e&&(e._prev?e._prev._next=e._next:e===this._firstVP&&(this._firstVP=e._next),e._next&&(e._next._prev=e._prev),this._lookup[t]=0,e.f&&(this._lookup[this._altProp(t)]=0))},d.isTrackingProp=function(t){return this._lookup[t]instanceof _},d.getVelocity=function(t){var e,i,s,r=this._lookup[t],n=this.target;if(!r)throw"The velocity of "+t+" is not being tracked.";return e=r.css?h(n,r.p):r.f?n[r.p]():n[r.p],i=e-r.v2,("rad"===r.type||"deg"===r.type)&&(s="rad"===r.type?2*Math.PI:360,i%=s,i!==i%(s/2)&&(i=0>i?i+s:i-s)),i/(u.time-r.t2)},d._altProp=function(t){var e=t.substr(0,3),i=("get"===e?"set":"set"===e?"get":e)+t.substr(3);return"function"==typeof this.target[i]?i:t},c.getByTarget=function(t){for(var i=e;i;){if(i.target===t)return i;i=i._next}},c.track=function(t,e,i){var s=f(t),r=e.split(","),n=r.length;for(i=(i||"").split(","),s||(s=new c(t));--n>-1;)s.addProp(r[n],i[n]||i[0]);return s},c.untrack=function(t,i){var s=f(t),r=(i||"").split(","),n=r.length;if(s){for(;--n>-1;)s.removeProp(r[n]);s._firstVP&&i||(s._prev?s._prev._next=s._next:s===e&&(e=s._next),s._next&&(s._next._prev=s._prev))}},c.isTracking=function(t,e){var i=f(t);return i?!e&&i._firstVP?!0:i.isTrackingProp(e):!1},c},!0)}),window._gsDefine&&window._gsQueue.pop()();
/*!
* jQuery-GSAP-plugin
* VERSION: 0.1.6
* DATE: 2013-02-13
* JavaScript
* UPDATES AND DOCS AT: http://www.greensock.com/jquery-gsap-plugin/
*
* Requires TweenLite version 1.8.0 or higher and CSSPlugin. For staggerTo(), staggerFrom(), and staggerFromTo(), it also
* requires TimelineLite. If TweenMax or TimelineMax is loaded, they will be preferred over TweenLite and TimelineLite internally
* so that you get the most features possible (like repeat, yoyo, repeatDelay, etc.)
*
* @license Copyright (c) 2013, GreenSock. All rights reserved.
* This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(function(a){"use strict";var e,f,g,b=a.fn.animate,c=a.fn.stop,d=!0,h=function(a,b){"function"==typeof a&&this.each(a),b()},i=function(a,b,c,d,e){e="function"==typeof e?e:null,b="function"==typeof b?b:null,(b||e)&&(d[a]=e?h:c.each,d[a+"Scope"]=c,d[a+"Params"]=e?[b,e]:[b])},j={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},k=function(a,b){for(var c in j)j[c]&&void 0!==a[c]&&(b[c]=a[c])},l=function(a){return function(b){return a.getRatio(b)}},m={},n=function(){var c,d,h,b=window.GreenSockGlobals||window;if(e=b.TweenMax||b.TweenLite,e&&(c=(e.version+".0.0").split("."),d=!(Number(c[0])>0&&Number(c[1])>7),b=b.com.greensock,f=b.plugins.CSSPlugin,m=b.easing.Ease.map||{}),!e||!f||d)return e=null,!g&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(d?" Version "+c.join(".")+" is too old.":"")),g=!0),void 0;if(a.easing){for(h in m)a.easing[h]=l(m[h]);n=!1}};a.fn.animate=function(c,g,h,j){if(c=c||{},n&&(n(),!e||!f))return b.call(this,c,g,h,j);if(!d||c.skipGSAP===!0||"object"==typeof g&&"function"==typeof g.step||null!=c.scrollTop||null!=c.scrollLeft)return b.call(this,c,g,h,j);var r,s,t,u,l=a.speed(g,h,j),o={ease:m[l.easing]||(l.easing===!1?m.linear:m.swing)},p=this,q="object"==typeof g?g.specialEasing:null;for(s in c){if(r=c[s],r instanceof Array&&m[r[1]]&&(q=q||{},q[s]=r[1],r=r[0]),"toggle"===r||"hide"===r||"show"===r)return b.call(this,c,g,h,j);o[-1===s.indexOf("-")?s:a.camelCase(s)]=r}if(q){u=[];for(s in q)r=u[u.length]={},k(o,r),r.ease=m[q[s]]||o.ease,-1!==s.indexOf("-")&&(s=a.camelCase(s)),r[s]=o[s];0===u.length&&(u=null)}return t=function(b){if(u)for(var c=u.length;--c>-1;)e.to(p,a.fx.off?0:l.duration/1e3,u[c]);i("onComplete",l.old,p,o,b),e.to(p,a.fx.off?0:l.duration/1e3,o)},l.queue!==!1?p.queue(l.queue,t):t(),p},a.fn.stop=function(a,b){if(c.call(this,a,b),e){if(b)for(var g,d=e.getTweensOf(this),f=d.length;--f>-1;)g=d[f].totalTime()/d[f].totalDuration(),g>0&&1>g&&d[f].seek(d[f].totalDuration());e.killTweensOf(this)}return this},a.gsap={enabled:function(a){d=a},version:"0.1.6"}})(jQuery);
/*!
* jQuery Mouse Wheel Plugin
* Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.1.1
*
* Requires: 1.2.2+
*/
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else{factory(jQuery)}}(function($){var toFix=['wheel','mousewheel','DOMMouseScroll'];var toBind='onwheel'in document||document.documentMode>=9?['wheel']:['mousewheel','DomMouseScroll','MozMousePixelScroll'];var lowestDelta,lowestDeltaXY;if($.event.fixHooks){for(var i=toFix.length;i;){$.event.fixHooks[toFix[--i]]=$.event.mouseHooks}}$.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var i=toBind.length;i;){this.addEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=handler}},teardown:function(){if(this.removeEventListener){for(var i=toBind.length;i;){this.removeEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=null}}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}});function handler(event){var orgEvent=event||window.event,args=[].slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0,absDeltaXY=0,fn;event=$.event.fix(orgEvent);event.type="mousewheel";if(orgEvent.wheelDelta){delta=orgEvent.wheelDelta}if(orgEvent.detail){delta=orgEvent.detail*-1}if(orgEvent.deltaY){deltaY=orgEvent.deltaY*-1;delta=deltaY}if(orgEvent.deltaX){deltaX=orgEvent.deltaX;delta=deltaX*-1}if(orgEvent.wheelDeltaY!==undefined){deltaY=orgEvent.wheelDeltaY}if(orgEvent.wheelDeltaX!==undefined){deltaX=orgEvent.wheelDeltaX*-1}absDelta=Math.abs(delta);if(!lowestDelta||absDelta0?'floor':'ceil';delta=Math[fn](delta/lowestDelta);deltaX=Math[fn](deltaX/lowestDeltaXY);deltaY=Math[fn](deltaY/lowestDeltaXY);args.unshift(event,delta,deltaX,deltaY);return($.event.dispatch||$.event.handle).apply(this,args)}}));
/*! jQuery plugin for Hammer.JS - v1.0.0 - 2014-01-02
* http://eightmedia.github.com/hammer.js
*
* Copyright (c) 2014 Jorik Tangelder ;
* Licensed under the MIT license */
!function(a,b){"use strict";function c(){d.READY||(d.event.determineEventTypes(),d.utils.each(d.gestures,function(a){d.detection.register(a)}),d.event.onTouch(d.DOCUMENT,d.EVENT_MOVE,d.detection.detect),d.event.onTouch(d.DOCUMENT,d.EVENT_END,d.detection.detect),d.READY=!0)}var d=function(a,b){return new d.Instance(a,b||{})};d.defaults={stop_browser_behavior:{userSelect:"none",touchAction:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},d.HAS_POINTEREVENTS=a.navigator.pointerEnabled||a.navigator.msPointerEnabled,d.HAS_TOUCHEVENTS="ontouchstart"in a,d.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,d.NO_MOUSEEVENTS=d.HAS_TOUCHEVENTS&&a.navigator.userAgent.match(d.MOBILE_REGEX),d.EVENT_TYPES={},d.DIRECTION_DOWN="down",d.DIRECTION_LEFT="left",d.DIRECTION_UP="up",d.DIRECTION_RIGHT="right",d.POINTER_MOUSE="mouse",d.POINTER_TOUCH="touch",d.POINTER_PEN="pen",d.EVENT_START="start",d.EVENT_MOVE="move",d.EVENT_END="end",d.DOCUMENT=a.document,d.plugins=d.plugins||{},d.gestures=d.gestures||{},d.READY=!1,d.utils={extend:function(a,c,d){for(var e in c)a[e]!==b&&d||(a[e]=c[e]);return a},each:function(a,c,d){var e,f;if("forEach"in a)a.forEach(c,d);else if(a.length!==b){for(e=0,f=a.length;f>e;e++)if(c.call(d,a[e],e,a)===!1)return}else for(e in a)if(a.hasOwnProperty(e)&&c.call(d,a[e],e,a)===!1)return},hasParent:function(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1},getCenter:function(a){var b=[],c=[];return d.utils.each(a,function(a){b.push("undefined"!=typeof a.clientX?a.clientX:a.pageX),c.push("undefined"!=typeof a.clientY?a.clientY:a.pageY)}),{pageX:(Math.min.apply(Math,b)+Math.max.apply(Math,b))/2,pageY:(Math.min.apply(Math,c)+Math.max.apply(Math,c))/2}},getVelocity:function(a,b,c){return{x:Math.abs(b/a)||0,y:Math.abs(c/a)||0}},getAngle:function(a,b){var c=b.pageY-a.pageY,d=b.pageX-a.pageX;return 180*Math.atan2(c,d)/Math.PI},getDirection:function(a,b){var c=Math.abs(a.pageX-b.pageX),e=Math.abs(a.pageY-b.pageY);return c>=e?a.pageX-b.pageX>0?d.DIRECTION_LEFT:d.DIRECTION_RIGHT:a.pageY-b.pageY>0?d.DIRECTION_UP:d.DIRECTION_DOWN},getDistance:function(a,b){var c=b.pageX-a.pageX,d=b.pageY-a.pageY;return Math.sqrt(c*c+d*d)},getScale:function(a,b){return a.length>=2&&b.length>=2?this.getDistance(b[0],b[1])/this.getDistance(a[0],a[1]):1},getRotation:function(a,b){return a.length>=2&&b.length>=2?this.getAngle(b[1],b[0])-this.getAngle(a[1],a[0]):0},isVertical:function(a){return a==d.DIRECTION_UP||a==d.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(a,b){b&&a&&a.style&&(d.utils.each(["webkit","khtml","moz","Moz","ms","o",""],function(c){d.utils.each(b,function(b){c&&(b=c+b.substring(0,1).toUpperCase()+b.substring(1)),b in a.style&&(a.style[b]=b)})}),"none"==b.userSelect&&(a.onselectstart=function(){return!1}),"none"==b.userDrag&&(a.ondragstart=function(){return!1}))}},d.Instance=function(a,b){var e=this;return c(),this.element=a,this.enabled=!0,this.options=d.utils.extend(d.utils.extend({},d.defaults),b||{}),this.options.stop_browser_behavior&&d.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),d.event.onTouch(a,d.EVENT_START,function(a){e.enabled&&d.detection.startDetect(e,a)}),this},d.Instance.prototype={on:function(a,b){var c=a.split(" ");return d.utils.each(c,function(a){this.element.addEventListener(a,b,!1)},this),this},off:function(a,b){var c=a.split(" ");return d.utils.each(c,function(a){this.element.removeEventListener(a,b,!1)},this),this},trigger:function(a,b){b||(b={});var c=d.DOCUMENT.createEvent("Event");c.initEvent(a,!0,!0),c.gesture=b;var e=this.element;return d.utils.hasParent(b.target,e)&&(e=b.target),e.dispatchEvent(c),this},enable:function(a){return this.enabled=a,this}};var e=null,f=!1,g=!1;d.event={bindDom:function(a,b,c){var e=b.split(" ");d.utils.each(e,function(b){a.addEventListener(b,c,!1)})},onTouch:function(a,b,c){var h=this;this.bindDom(a,d.EVENT_TYPES[b],function(i){var j=i.type.toLowerCase();if(!j.match(/mouse/)||!g){j.match(/touch/)||j.match(/pointerdown/)||j.match(/mouse/)&&1===i.which?f=!0:j.match(/mouse/)&&!i.which&&(f=!1),j.match(/touch|pointer/)&&(g=!0);var k=0;f&&(d.HAS_POINTEREVENTS&&b!=d.EVENT_END?k=d.PointerEvent.updatePointer(b,i):j.match(/touch/)?k=i.touches.length:g||(k=j.match(/up/)?0:1),k>0&&b==d.EVENT_END?b=d.EVENT_MOVE:k||(b=d.EVENT_END),(k||null===e)&&(e=i),c.call(d.detection,h.collectEventData(a,b,h.getTouchList(e,b),i)),d.HAS_POINTEREVENTS&&b==d.EVENT_END&&(k=d.PointerEvent.updatePointer(b,i))),k||(e=null,f=!1,g=!1,d.PointerEvent.reset())}})},determineEventTypes:function(){var a;a=d.HAS_POINTEREVENTS?d.PointerEvent.getEvents():d.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],d.EVENT_TYPES[d.EVENT_START]=a[0],d.EVENT_TYPES[d.EVENT_MOVE]=a[1],d.EVENT_TYPES[d.EVENT_END]=a[2]},getTouchList:function(a){return d.HAS_POINTEREVENTS?d.PointerEvent.getTouchList():a.touches?a.touches:(a.identifier=1,[a])},collectEventData:function(a,b,c,e){var f=d.POINTER_TOUCH;return(e.type.match(/mouse/)||d.PointerEvent.matchType(d.POINTER_MOUSE,e))&&(f=d.POINTER_MOUSE),{center:d.utils.getCenter(c),timeStamp:(new Date).getTime(),target:e.target,touches:c,eventType:b,pointerType:f,srcEvent:e,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault&&this.srcEvent.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return d.detection.stopDetect()}}}},d.PointerEvent={pointers:{},getTouchList:function(){var a=this,b=[];return d.utils.each(a.pointers,function(a){b.push(a)}),b},updatePointer:function(a,b){return a==d.EVENT_END?this.pointers={}:(b.identifier=b.pointerId,this.pointers[b.pointerId]=b),Object.keys(this.pointers).length},matchType:function(a,b){if(!b.pointerType)return!1;var c=b.pointerType,e={};return e[d.POINTER_MOUSE]=c===b.MSPOINTER_TYPE_MOUSE||c===d.POINTER_MOUSE,e[d.POINTER_TOUCH]=c===b.MSPOINTER_TYPE_TOUCH||c===d.POINTER_TOUCH,e[d.POINTER_PEN]=c===b.MSPOINTER_TYPE_PEN||c===d.POINTER_PEN,e[a]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},d.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(a,b){this.current||(this.stopped=!1,this.current={inst:a,startEvent:d.utils.extend({},b),lastEvent:!1,name:""},this.detect(b))},detect:function(a){if(this.current&&!this.stopped){a=this.extendEventData(a);var b=this.current.inst.options;return d.utils.each(this.gestures,function(c){return this.stopped||b[c.name]===!1||c.handler.call(c,a,this.current.inst)!==!1?void 0:(this.stopDetect(),!1)},this),this.current&&(this.current.lastEvent=a),a.eventType==d.EVENT_END&&!a.touches.length-1&&this.stopDetect(),a}},stopDetect:function(){this.previous=d.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(a){var b=this.current.startEvent;!b||a.touches.length==b.touches.length&&a.touches!==b.touches||(b.touches=[],d.utils.each(a.touches,function(a){b.touches.push(d.utils.extend({},a))}));var c,e,f=a.timeStamp-b.timeStamp,g=a.center.pageX-b.center.pageX,h=a.center.pageY-b.center.pageY,i=d.utils.getVelocity(f,g,h);return"end"===a.eventType?(c=this.current.lastEvent&&this.current.lastEvent.interimAngle,e=this.current.lastEvent&&this.current.lastEvent.interimDirection):(c=this.current.lastEvent&&d.utils.getAngle(this.current.lastEvent.center,a.center),e=this.current.lastEvent&&d.utils.getDirection(this.current.lastEvent.center,a.center)),d.utils.extend(a,{deltaTime:f,deltaX:g,deltaY:h,velocityX:i.x,velocityY:i.y,distance:d.utils.getDistance(b.center,a.center),angle:d.utils.getAngle(b.center,a.center),interimAngle:c,direction:d.utils.getDirection(b.center,a.center),interimDirection:e,scale:d.utils.getScale(b.touches,a.touches),rotation:d.utils.getRotation(b.touches,a.touches),startEvent:b}),a},register:function(a){var c=a.defaults||{};return c[a.name]===b&&(c[a.name]=!0),d.utils.extend(d.defaults,c,!0),a.index=a.index||1e3,this.gestures.push(a),this.gestures.sort(function(a,b){return a.indexb.index?1:0}),this.gestures}},d.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(a,b){if(d.detection.current.name!=this.name&&this.triggered)return b.trigger(this.name+"end",a),this.triggered=!1,void 0;if(!(b.options.drag_max_touches>0&&a.touches.length>b.options.drag_max_touches))switch(a.eventType){case d.EVENT_START:this.triggered=!1;break;case d.EVENT_MOVE:if(a.distance0)){var c=Math.abs(b.options.drag_min_distance/a.distance);d.detection.current.startEvent.center.pageX+=a.deltaX*c,d.detection.current.startEvent.center.pageY+=a.deltaY*c,a=d.detection.extendEventData(a)}(d.detection.current.lastEvent.drag_locked_to_axis||b.options.drag_lock_to_axis&&b.options.drag_lock_min_distance<=a.distance)&&(a.drag_locked_to_axis=!0);var e=d.detection.current.lastEvent.direction;a.drag_locked_to_axis&&e!==a.direction&&(a.direction=d.utils.isVertical(e)?a.deltaY<0?d.DIRECTION_UP:d.DIRECTION_DOWN:a.deltaX<0?d.DIRECTION_LEFT:d.DIRECTION_RIGHT),this.triggered||(b.trigger(this.name+"start",a),this.triggered=!0),b.trigger(this.name,a),b.trigger(this.name+a.direction,a),(b.options.drag_block_vertical&&d.utils.isVertical(a.direction)||b.options.drag_block_horizontal&&!d.utils.isVertical(a.direction))&&a.preventDefault();break;case d.EVENT_END:this.triggered&&b.trigger(this.name+"end",a),this.triggered=!1}}},d.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(a,b){switch(a.eventType){case d.EVENT_START:clearTimeout(this.timer),d.detection.current.name=this.name,this.timer=setTimeout(function(){"hold"==d.detection.current.name&&b.trigger("hold",a)},b.options.hold_timeout);break;case d.EVENT_MOVE:a.distance>b.options.hold_threshold&&clearTimeout(this.timer);break;case d.EVENT_END:clearTimeout(this.timer)}}},d.gestures.Release={name:"release",index:1/0,handler:function(a,b){a.eventType==d.EVENT_END&&b.trigger(this.name,a)}},d.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_min_touches:1,swipe_max_touches:1,swipe_velocity:.7},handler:function(a,b){if(a.eventType==d.EVENT_END){if(b.options.swipe_max_touches>0&&a.touches.lengthb.options.swipe_max_touches)return;(a.velocityX>b.options.swipe_velocity||a.velocityY>b.options.swipe_velocity)&&(b.trigger(this.name,a),b.trigger(this.name+a.direction,a))}}},d.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(a,b){if(a.eventType==d.EVENT_END&&"touchcancel"!=a.srcEvent.type){var c=d.detection.previous,e=!1;if(a.deltaTime>b.options.tap_max_touchtime||a.distance>b.options.tap_max_distance)return;c&&"tap"==c.name&&a.timeStamp-c.lastEvent.timeStampb.options.transform_min_rotation&&b.trigger("rotate",a),c>b.options.transform_min_scale&&(b.trigger("pinch",a),b.trigger("pinch"+(a.scale<1?"in":"out"),a));break;case d.EVENT_END:this.triggered&&b.trigger(this.name+"end",a),this.triggered=!1}}},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return d}):"object"==typeof module&&"object"==typeof module.exports?module.exports=d:a.Hammer=d}(this),function(a,b){"use strict";function c(a,c){a.event.bindDom=function(a,d,e){c(a).on(d,function(a){var c=a.originalEvent||a;c.pageX===b&&(c.pageX=a.pageX,c.pageY=a.pageY),c.target||(c.target=a.target),c.which===b&&(c.which=c.button),c.preventDefault||(c.preventDefault=a.preventDefault),c.stopPropagation||(c.stopPropagation=a.stopPropagation),e.call(this,c)})},a.Instance.prototype.on=function(a,b){return c(this.element).on(a,b)},a.Instance.prototype.off=function(a,b){return c(this.element).off(a,b)},a.Instance.prototype.trigger=function(a,b){var d=c(this.element);return d.has(b.target).length&&(d=c(b.target)),d.trigger({type:a,gesture:b})},c.fn.hammer=function(b){return this.each(function(){var d=c(this),e=d.data("hammer");e?e&&b&&a.utils.extend(e.options,b):d.data("hammer",new a(this,b||{}))})}}"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(["hammer","jquery"],c):c(a.Hammer,a.jQuery||a.Zepto)}(this);