//Copyright (c) 2011. Adobe Systems Incorporated.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//   * Redistributions of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//   * Redistributions in binary form must reproduce the above copyright notice,
//     this list of conditions and the following disclaimer in the documentation
//     and/or other materials provided with the distribution.
//   * Neither the name of Adobe Systems Incorporated nor the names of its
//     contributors may be used to endorse or promote products derived from this
//     software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// AdobePatentID="B1316"
// AdobePatentID="B1317"
// AdobePatentID="B1318"
//
// edge.0.0.1.min.js - version 0.1.1
 
(function(f){if(typeof f.Edge==="undefined")f.Edge={};var e=f.Edge;e.version="0.1.3";e.cloneJSONObject=function(n){var k,c;if(f.isArray(n)){k=[];var i,l=n.length;for(i=0;i<l;i++)c=n[i],k[i]=typeof c==="object"?e.cloneJSONObject(c):c}else for(i in k={},n)i!="prototype"&&(c=n[i],k[i]=typeof c==="object"?e.cloneJSONObject(c):c);return k};e.Notifier=function(){this.observers=[];this.notificationLevel=this.suppressNotifications=0};f.extend(e.Notifier.prototype,{addObserver:function(e){if(e){for(var f=
this.observers.length,c=0;c<f;c++)if(this.observers[c].observer==e)return;this.observers[f]={observer:e}}},removeObserver:function(e){if(e)for(var f=0;f<this.observers.length;f++)if(this.observers[f].observer==e)if(this.notificationLevel===0){this.observers.splice(f,1);break}else this.observers[f].deleted=!0},notifyObservers:function(e,f){if(e&&!this.suppressNotifications){f||(f={});f.methodName=e;this.notificationLevel++;var c;for(c=0;c<this.observers.length;c++){var i=this.observers[c];if(i=i&&
!i.deleted?i.observer:void 0)if(typeof i=="function")i(e,this,f);else if(i[e])i[e](this,f)}this.notificationLevel--;if(this.notificationLevel===0)for(c=this.observers.length-1;c>=0;c--)this.observers[c].deleted&&this.observers.splice(c,1)}},enableNotifications:function(){if(--this.suppressNotifications<0)this.suppressNotifications=0,e.Debug.reportError("Unbalanced enableNotifications() call!\n")},disableNotifications:function(){++this.suppressNotifications}});e.trimString=function(e){return e.replace(/^\s+|\s+$/g,
"")}})(jQuery);(function(f,e){function n(){e.Notifier.call(this);this.animationID="animID-"+n.nextID++}function k(a,b,m){e.Animation.call(this);if(typeof a=="function")this.handler=a;else if(typeof a=="string")this.eventType=a;this.handlerContext=m;this.data=b;this.isTrigger=!0}function c(a,b,m,j){e.Notifier.call(this);this.animation=a;this.position=0;this.duration=-1;this.easing=typeof j=="function"?j:j&&f.easing[j]?j:c.defaultEasing;if(b!==void 0)this.position=b;if(m!==void 0)this.duration=m;this.timeline=null;
this.dScale=1;this.dDuration=0;this.done=!1}function i(a){this.parameters={};a&&f.extend(this,a)}function l(a){e.Animation.call(this);f.extend(this,e.Timeline.config);f.extend(this,a);this.startPosition=this.timerStart=this.timer=0;this.currentPosition=-1;this.playing=!1;this.duration=0;this.interval=1E3/this.fps;this.objects=[]}var h={};n.nextID=1;f.extend(n.prototype,e.Notifier.prototype,{constructor:n,_setup:function(){},_update:function(){},getDuration:function(){return 0}});f.extend(k.prototype,
n.prototype,{constructor:k,_update:function(a){if(!this.fired)this.fired=!0,this.handler?this.handler.call(this.handlerContext,a,this.data):this.eventType&&this.timeline&&this.timeline.notifyObservers(this.eventType,{elapsed:a,data:this.data})},setup:function(a,b){this.fired=b.startingFromCurrent?b.playDirection!="reverse"?a.currentPosition>=b.position:a.currentPosition<=b.position:b.playDirection!="reverse"?a.currentPosition>b.position:a.currentPosition<b.position;this.timeline=a}});c.defaultEasing=
"linear";f.extend(c.prototype,e.Notifier.prototype,{constructor:c,_setup:function(a,b){this.timeline=a;var m=this.duration,j=null;this.animation&&this.animation.getDuration&&(j=this.animation.getDuration());this.dScale=m!=-1&&m!==0?j/m:1;this.dDuration=m!=-1?m:j;this.done=!1;if(this.animation&&this.animation.setup)b.position=this.position,this.animation.setup(a,b)},_update:function(a,b){if(!this.done){var m=a,j=this.dDuration;if(this.animation){var c;j===0?c=m>=0?1:0:(m>=j&&(m=j),m<=0&&(m=0),c=f.easing[this.easing](m/
j,m,0,1,j));this.animation.update(m*this.dScale,c,b)}(b.playDirection=="reverse"?m<=0:m>=j)&&this.complete()}},complete:function(){this.done=!0;this.timeline&&this.timeline._updateComplete(this)},getPosition:function(){return this.position},setPosition:function(a){this.position=a},getDuration:function(){return this.duration!=-1?this.duration:this.animation&&this.animation.getDuration?this.animation.getDuration():0},setDuration:function(a){this.duration=a>=0?a:-1}});l.config={dropFrames:!0,fps:60};
var q=[];l.tick=function(){var a=q.slice(0);q=[];for(var b=a.length,c=(new Date).getTime(),j=0;j<b;j++)a[j].call(null,c)};f.extend(l.prototype,n.prototype,{constructor:l,play:function(a){this.notifyObservers("play");this.sort();this.playing=!0;if(this.context)this.context.playDirection=void 0;var b=this.getContext(a);b.timeline=this;a!==void 0&&typeof a.startPos==="number"&&this.currentPosition!=a.startPos?this.currentPosition=a.startPos:b.startingFromCurrent=!0;this._setup(this,b);this.timerStart=
(new Date).getTime();this.startPosition=this.currentPosition;var c=this,j;j=b.externalClock?function(a){c._handleTimer(b,j,a)}:function(){c._handleTimer(b,j)};b.firstUpdate=!0;this._handleTimer(b,j);b.firstUpdate=!1},stop:function(a){a&&a.dontNotify||this.notifyObservers("stop");this.timer&&clearTimeout(this.timer);this.timerStart=this.timer=0;this.playing=!1},seek:function(a,b){this.notifyObservers("seek");this.sort();this.stop();var c=this.currentPosition;if(typeof a==="number")this.currentPosition=
a;var j=this.getContext(b);j.timeline=this;if(c==this.currentPosition)j.startingFromCurrent=!0;this._setup(this,j);j.firstUpdate=!0;this._updateSeek(this.currentPosition,1,j,c);j.firstUpdate=!1},add:function(a,b,m,j){this.objects.push(new c(a,b,m,j));this.sorted=!1},sort:function(){if(!this.sorted)this.objects.sort(function(a,b){return a.position-b.position}),this.sorted=!0},getDuration:function(){for(var a=0,b=this.objects,c=this.objects.length,j=Math.max,i=0;i<c;i++)var e=b[i],a=j(a,e.position+
e.getDuration());return a},getCurrentPosition:function(){return this.currentPosition},getContext:function(a){this.context?f.extend(this.context,a):this.context=new i(a);return this.context},_update:function(a,b,c){this.sort();this.currentContext=c;this.notifyObservers("preUpdate",{elapsed:a,easingConst:b});var j=this.objects,i=this.triggers,e=j.length,f=i.length,l=c.playDirection!="reverse";this.currentDirection=l?"forward":"reverse";for(var h=!1,q=!0,n=0;n<f;n++){var k=i[l?n:f-n-1];if(k.animation.isTrigger&&
(!c.startingFromCurrent||!c.firstUpdate)&&!k.animation.fired&&(l?a>=k.position:a<=k.position+k.duration)){for(var r=this.currentPosition=k.position,w=this._getState(),h=0;h<e;h++){var p=j[l?h:e-h-1];!p.animation.isTrigger&&(l?r>=p.position:r<=p.position+p.duration)&&p._update(r-p.position,c)}h=!0;k.animation._update(r,c);if(!this._equalState(w)){q=!1;console.log("Timeline aborted");break}}}if(!h)for(h=0;h<e;h++)p=j[l?h:e-h-1],!p.animation.isTrigger&&(l?a>=p.position:a<=p.position+p.duration)&&p._update(a-
p.position,c);this.notifyObservers("postUpdate",{elapsed:a,easingConst:b,context:c});this.notifyObservers("update",{elapsed:a,easingConst:b});this.currentContext=null;return q},_getState:function(){return{pos:this.currentPosition,dir:this.context.playDirection,playing:this.playing}},_equalState:function(a){return a.pos==this.currentPosition&&a.dir==this.context.playDirection&&!a.playing==!this.playing},_handleTimer:function(a,b,c){c=c||(new Date).getTime();c-=this.timerStart;var j=a.playDirection==
"reverse",j=this.startPosition+(j?-c:c);if(this.playing){this.currentPosition=j=Math.max(0,Math.min(j,this.duration));var e=this._update(j,1,a),j=a.playDirection=="reverse";if(!j?this.currentPosition<this.duration:this.currentPosition>0){if(e&&this.playing)a.externalClock?q.push(b):this.timer=setTimeout(b,this.interval)}else this.stop(),this.notifyObservers("complete",{elapsed:c})}},_setup:function(a,b){e.Animation.prototype._setup.call(this,a);this.triggers=[];for(var c=this.objects,j=this.objects.length,
i=0;i<j;i++){var f=c[i];f._done=!1;f._setup(this,b);f.animation.isTrigger&&this.triggers.push(f)}this.duration=this.getDuration()},_updateComplete:function(a){a._done=!0}});l.prototype._updateSeek=l.prototype._update;e.Animation=n;e.TimelineObject=c;e.Timeline=l;e.Timeline.createTimeline=function(a){return new e.Timeline(a)};e.Timeline.createTween=function(a){var b=h[a];if(b)return b.func.apply(b.context,Array.prototype.slice.call(arguments,1));return null};e.Timeline.addTweenType=function(a,b,c){h[a]=
{func:b,context:c}};e.Timeline.createTrigger=function(a,b){return new k(a,b,arguments[arguments.length-1])};e.Timeline.createTimelineFromData=function(a){for(var b=jQuery.Edge.Timeline.createTimeline(),c=a.length,j=0;j<c;j++){var i=a[j],f=null;i.timeline?f=e.Timeline.createTimelineFromData(i.timeline):i.tween?f=e.Timeline.createTween.apply(null,i.tween):i.trigger&&(f=i.trigger.slice(0,2),f.push(this),f=e.Timeline.createTrigger.apply(null,f));f&&b.add(f,i.position,i.duration,i.easing)}return b}})(jQuery,
jQuery.Edge);(function(f,e){function n(c,i,l,h,q){e.Animation.call(this);this.name="prop tween";this.sourceElements=this.elements=i;this.deferElementResolution=!0;this.tweenType=k[c];this.updateTriggered=!1;this.property=l;this.fromValue=void 0;this.toValue=h;this.duration=1E3;this.fromValues=this.tokens=this.valueTemplate=null;q&&f.extend(this,q);this.deferElementResolution=this.deferElementResolution||typeof i=="string"&&i.search(/\$\{[^\{\}]+\}/)!=-1;if(!this.deferElementResolution)this.elements=this.resolveElementSelector(i);
var q=this.toValues=[],a=this.parseValue(h);f.isArray(h)||(h=[h]);if(!a||a.length===0)a=h;i=a.length;for(c=0;c<i;c++){var l=a[c],b={};typeof l=="string"?(b.value=parseFloat(l.replace(/[a-zA-Z%]+$/,"")),b.unit=l.replace(/^-?[0-9]*(\.[0-9]+)?/,"")):(typeof l=="number"&&(l=parseFloat(l)),b.value=l,b.unit="");q.push(b)}h.length>1&&!this.valueTemplate&&alert("Multiple values specified for attribute tween, but no template was provided!");h.length>1&&(!this.fromValue||!f.isArray(this.fromValue))&&alert("Multiple values specified for attribute tween, but no from values specified!");
if(this.fromValue){h=this.fromValues=[];if((c=this.parseValue(this.fromValue))&&c.length>0)this.fromValue=c;else if(!f.isArray(this.fromValue))this.fromValue=[this.fromValue];i=this.fromValue.length;for(c=0;c<i;c++)l=this.fromValue[c],typeof l=="string"?h[c]=parseFloat(l.replace(/[a-zA-Z%]+$/,"")):(typeof l=="number"&&(l=parseFloat(l)),h[c]=l);this.toValues.length!=this.fromValues.length&&alert("Number of 'from' and 'to' values does not match for "+this.tweenType+" tween.")}if(this.filter){if(!f.isArray(this.filter))this.filter=
[this.filter];h=this.filter;i=h.length;for(c=0;c<i;c++)typeof h[c]=="string"&&(h[c]=Math[h[c]]),typeof h[c]!="function"&&(h[c]=null)}if(this.valueTemplate)this.tokens=this.parseTemplate(this.valueTemplate)}var k={style:0,attribute:1,property:2};n.Token=function(c,i){this.value=c;this.isPlaceholder=i};n.substituteParameters=function(c,i){for(var f=c;i&&typeof f=="string"&&f.search(/\$\{/)!=-1;){var h=f.search(/\$\{/),k=f.search(/\}/);(h=f.slice(h+2,k))||alert("Invalid parameter name: "+h);typeof h==
"string"&&(h=e.trimString(h),h=h.replace(/[\"\']/g,""));f=typeof i[h]=="undefined"?void 0:f.replace(/\$\{[^\}]*\}/,i[h])}return f};f.extend(n.prototype,e.Animation.prototype,{constructor:n,setup:function(){this.updateTriggered=!1},update:function(c,i,f){var e=this.getElementSet(f);if(!this.updateTriggered)this.updateTriggered=!0,this.setupForAnimation(f);var k=this,a=this.tweenType,b=this.property,m;e.each(function(){var j=k.getPropertyTweenData(this,a,b);if(j.animationID==k.animationID){var f=j.fromValues,
e=j.toValues,j=j.tokens,h=k.filter,l=f.length,n=[];for(m=0;m<l;m++){var v=f[m],s=e[m];v+=(s.value-v)*i;h&&h[m]&&(v=h[m](v));n.push(v+s.unit)}f="";f=k.formatValue(n);if(!(f.length>0))if(j){f=j.length;e=[];for(m=0;m<f;m++)h=j[m],h.isPlaceholder?e.push(n[h.value]):e.push(h.value);f=e.join("")}else f=n.join("");k.setValue.call(this,a,b,f);k.notifyObservers("onUpdate",{elapsed:c,easingConst:i,property:b,value:f,element:this})}})},setValue:function(c,i,e){switch(c){case 0:f(this).css(i,e);break;case 1:this.setAttribute(i,
e);break;case 2:this[i]=e}},getDuration:function(){return this.duration},resolveElementSelector:function(c){c=n.substituteParameters(this.elements,c.parameters);if(!c)c=this.elements;return f(c)},getElementSet:function(c){var f=this.animationID;if(!c.animData)c.animData={};var e=c.animData[f];e||(e=c.animData[f]=this.deferElementResolution?this.resolveElementSelector(c):this.elements);return e},getValue:function(c,e){var l;switch(e){case 0:l=f(this).css(c);break;case 1:l=this.getAttribute(c);break;
case 2:l=this[c]+""}return l},setupForAnimation:function(c){var f=this,e=this.tweenType,h=this.property;this.getElementSet(c).each(function(){var c=f.getPropertyTweenData(this,e,h);c.animationID=f.animationID;c.toValues=f.toValues;c.tokens=f.tokens;if(f.fromValues)c.fromValues=f.fromValues;else{var a=f.getValue.call(this,h,e);a===void 0&&(a="0");var b=f.parseValue(a);if(b&&b.length>0)for(var c=c.fromValues=[],a=b.length,m=0;m<a;m++){var j=b[m];c[m]=typeof j=="string"?parseFloat(j.replace(/[a-zA-Z%]+$/,
"")):j}else c.fromValues=[parseFloat(a.replace(/[a-zA-Z%]+$/,""))]}})},parseTemplate:function(c){for(var f=c.length,e=[],h=0,k=/@@[0-9]+@@/g,a=null;h<f&&(a=k.exec(c));)a.index!=h&&e.push(new n.Token(c.substring(h,a.index),!1)),e.push(new n.Token(parseInt(a[0].replace(/@@/g,""),10),!0)),h=k.lastIndex;h<f&&e.push(new n.Token(c.substring(h,f),!1));return e},parseValue:function(){return[]},formatValue:function(){return""},getPropertyTweenData:function(c,e,l){var h=f.data(c,"tweenData");h||(h={},f.data(c,
"tweenData",h));(c=h[e])||(c=h[e]={});(e=c[l])||(e=c[l]={animationID:-1});return e}});e.PropertyTween=n;e.Timeline.addTweenType("style",function(c,f,e,h){return new n("style",c,f,e,h)});e.Timeline.addTweenType("attribute",function(c,f,e,h){return new n("attribute",c,f,e,h)});e.Timeline.addTweenType("property",function(c,f,e,h){return new n("property",c,f,e,h)})})(jQuery,jQuery.Edge);(function(f,e,n){function k(p,a,b,d,g){e.PropertyTween.call(this,p,a,b,d,g);this.name="transformTween"}var c,i,l=Math.asin,h=Math.sin,q=Math.cos,a=Math.tan,b=Math.atan2,m=Math.PI/180,j=180/Math.PI;k.removeData=function(p){var a=f.data(p,k.dataName);a&&(a.timeline&&c.unRegister(a.timeline,a.id),$ele.removeData(p,k.dataName))};var t=function(p){var a=0;typeof p=="string"?a=parseFloat(p.replace(/[a-zA-Z%]+$/,"")):typeof p=="number"&&(a=p);return a};k.applyTransform=function(p,a,b,d){var p=f(p),g="webkitAppearance"in
document.documentElement.style,c=!0;d&&(c=!d.dontForceZ);if(g){d="translate("+a.translateX+","+a.translateY+")";g=t(a.translateZ);if(g!==0||c)d+=" translateZ("+a.translateZ+")";d+=" rotate("+a.rotateZ+") ";g=t(a.rotateY);g!==0&&(d+=" rotateY("+a.rotateY+")");g=t(a.rotateX);g!==0&&(d+=" rotateX("+a.rotateX+")");d+=" skew("+a.skewX+","+a.skewY+") scale("+a.scaleX+","+a.scaleY+") ";g=t(a.scaleZ);g!=1&&(d+=" scaleZ("+a.scaleZ+")");a="-webkit-transform";p.css(a,d);b&&b.observers.length&&b.notifyObservers("onUpdate",
{elapsed:0,easingConst:0,property:a,value:d,element:p[0]})}else b=t(a.rotateY),d=t(a.rotateX),b=a.scaleX*q(m*b),c=a.scaleY*q(m*d),d="translate("+a.translateX+","+a.translateY+")",d+=" rotate("+a.rotateZ+")",d+=" skew("+a.skewX+", "+a.skewY+")",d+=" scale("+b+","+c+")",p.css("-moz-transform",d),p.css("-o-transform",d),p.css("-ms-transform",d),p.css("msTransform",d)};var u=function(a){if(a!==0&&Math.abs(a)<1.0E-6)return a.toFixed(6);return a.toString()};k.dataName="EdgeTransformData";var A=1;f.extend(k.prototype,
n.prototype,{constructor:k,setup:function(){this.updateTriggered=!1},setValue:function(a,o,b){f.data(this,k.dataName)[o]=b},getValue:function(){f.data(this,k.dataName)},setupForAnimation:function(a){var o=this;this.getElementSet(a).each(function(){var a=f.data(this,k.dataName);a||(a=o.buildTransformData(this),f.data(this,k.dataName,a))});n.prototype.setupForAnimation.call(this,a)},update:function(a,o,b){n.prototype.update.call(this,a,o,b);var d=this,g=this.property,e=this.tweenType;this.getElementSet(b).each(function(){if(d.getPropertyTweenData(this,
e,g).animationID==d.animationID){var a=f.data(this,k.dataName);a.timeline=b.timeline;a.tween=d;c.Register(b.timeline,a.id,a)}})},buildTransformData:function(a){var o=e.parseCanonicalTransform(a);if(o===null){var o={},b=e.getTransformProps(a);o.translateX="0px";o.translateY="0px";o.translateZ="0px";o.scaleX=1;o.scaleY=1;o.scaleZ=1;o.rotateX="0deg";o.rotateY="0deg";o.rotateZ="0deg";o.skewXZ=0;o.skewXY=0;o.skewYZ=0;o.skewX="0deg";o.skewY="0deg";o.matrix&&delete o.matrix;if(b)o.translateX=u(b.translation[0])+
"px",o.translateY=u(b.translation[1])+"px",o.translateZ=u(b.translation[2])+"px",o.scaleX=u(b.scale[0]),o.scaleY=u(b.scale[1]),o.scaleZ=u(b.scale[2]),o.rotateX=u(b.rotation[0]*j)+"deg",o.rotateY=u(b.rotation[1]*j)+"deg",o.rotateZ=u(b.rotation[2]*j)+"deg",o.skewXY=b.skew[0],o.skewXZ=b.skew[1],o.skewYZ=b.skew[2],o.skewX=u(Math.atan(b.skew[0])*j)+"deg"}o===null&&(o={});o.id="transform_"+A++;o.element=a;o.onFinalUpdate=c.prototype._applyTransform;return o}});var y={translate3d:0,translate:0,translateX:0,
translateY:0,translateZ:0,rotate:1,rotateZ:1,rotateX:1,rotateY:1,rotate3d:1,skew:2,skewX:2,skewY:2,scale3d:3,scale:3,scaleX:3,scaleY:3,scaleZ:3,perspective:4};e.getTransformProps=function(a,b){var c=typeof b=="string"?b:e.getTransform(a),d="webkitAppearance"in document.documentElement.style;if(c&&c!="none"&&d)d=new e.CSSMatrix,d.setMatrixValue(c),c=i.fromCSSMatrix(d);else if(c&&c!="none")c=i.fromCSSMatrixString(c);else return;return e.decomposeTransform(c)};e.getTransform=function(a){var b="webkitAppearance"in
document.documentElement.style,a=f(a),c=a[0].style,d;if(b)(d=a.get(0).style.webkitTransform)||(d=a.css("-webkit-transform"));if(d)return d;(d=a.get(0).style.msTransform)||(d=a.css("-ms-transform"));d||(d=a.css("msTransform"));if(!d)d=c.MozTransform;d||(d=c["-moz-transform"]);d||(d=a.css("-moz-transform"));if(!d)d=c.oTransform;d||(d=a.css("-o-transform"));if(!d)d=c.transform;d||(d=a.css("transform"));return d||""};e.parseCanonicalTransform=function(a,b){var c=(typeof b=="string"?b:e.getTransform(a)).match(/(\w+\s*\([^\)]*\))/g);
if(!c)return null;var d={},g={translateX:"0px",translateY:"0px",translateZ:"0px",scaleX:1,scaleY:1,scaleZ:1,rotateX:"0deg",rotateY:"0deg",rotateZ:"0deg",skewXZ:0,skewXY:0,skewYZ:0,skewX:"0deg",skewY:"0deg"},f;for(f=0;f<c.length;f++){var j=c[f].match(/\w+/);if(d[j[0]]||y[j[0]]<0)return null;var h=c[f].match(/\([^\)]*\)/),h=h[0].replace(/[\(\)]/g,""),h=h.split(",");switch(j[0]){case "matrix":return null;case "translate3d":g.translateX=h[0];g.translateY=h.length>1?h[1]:"0px";g.translateZ=h.length>2?
h[2]:"0px";d.translate3d=d.translate=d.translateX=d.translateY=d.translateZ=!0;break;case "translate":g.translateX=h[0];g.translateY=h.length>1?h[1]:"0px";d.translate3d=d.translate=d.translateX=d.translateY=!0;break;case "translateX":g.translateX=h[0];d.translate3d=d.translate=d.translateX=!0;break;case "translateY":g.translateY=h[0];d.translate3d=d.translate=d.translateY=!0;break;case "translateZ":g.translateZ=h[0];d.translate3d=d.translateZ=!0;break;case "rotate3d":return d.rotate3d=d.rotate=d.rotateX=
d.rotateY=d.rotateZ=!0,null;case "rotateX":g.rotateX=h[0];d.rotate3d=d.rotateX=!0;break;case "rotateY":g.rotateY=h[0];d.rotate3d=d.rotateY=!0;break;case "rotateZ":case "rotate":g.rotateZ=h[0];d.rotate3d=d.rotate=d.rotateZ=!0;break;case "skew":g.skewX=h[0];g.skewY=h.length>1?h[1]:"0px";d.skew=d.skewX=d.skewY=!0;break;case "skewX":g.skewX=h[0];d.skew=d.skewX=!0;break;case "skewY":g.skewY=h[0];d.skew=d.skewY=!0;break;case "scale3d":g.scaleX=h[0];g.scaleY=h.length>1?h[1]:"0px";g.scaleZ=h.length>2?h[2]:
"0px";d.scale3d=d.scale=d.scaleX=d.scaleY=d.scaleZ=!0;break;case "scale":g.scaleX=h[0];g.scaleY=h.length>1?h[1]:"0px";d.scale=d.scaleX=d.scaleY=!0;break;case "scaleX":g.scaleX=h[0];d.scale3d=d.scale=d.scaleX=!0;break;case "scaleY":g.scaleY=h[0];d.scale3d=d.scale=d.scaleY=!0;break;case "scaleZ":g.scaleZ=h[0];d.scale3d=d.scaleZ=!0;break;case "perspective":d.perspective=!0}}return g};e.TransformTween=k;c=function(a){this.handlers={};this.timeline=a};c.Register=function(a,b,f){var d=a.updateFinalizer;
if(typeof d=="undefined")d=new c(a),a.updateFinalizer=d,a.addObserver(d);d.handlers[b]=f};c.unRegister=function(a,b){var c=a.updateFinalizer;typeof c!="undefined"&&delete c.handlers[b]};f.extend(c.prototype,{_finalizeUpdate:function(a,b){var c={elapsed:a,context:b},d;for(d in this.handlers)if(this.handlers.hasOwnProperty(d)){var g=this.handlers[d];if(g.onFinalUpdate)g.onFinalUpdate(c)}},postUpdate:function(a,b){this._finalizeUpdate(b.elapsed,b.context)},complete:function(){this.timeline&&this.timeline.removeObserver(this);
this.timeline.updateFinalizer=void 0},_applyTransform:function(a){var b=f.data(this.element,k.dataName);b&&a&&k.applyTransform(this.element,b,b.tween,a.context)}});k.UpdateFinalizer=c;if(typeof CSSMatrix=="undefined")if(typeof WebKitCSSMatrix!="undefined")e.CSSMatrix=WebKitCSSMatrix;else{if(typeof MozCSSMatrix!="undefined")e.CSSMatrix=MozCSSMatrix}else e.CSSMatrix=CSSMatrix;var z=function(a,b){for(var c=0,d=a.length,g=0;g<d;g++)c+=a[g]*b[g];return c},v=function(a){for(var b=0,c=a.length,d=0;d<c;d++)b+=
a[d]*a[d];return Math.sqrt(b)},s=function(a){var b=a.length,c=v(a),d=Array(b);c===0&&(c=1);for(var g=0;g<b;g++)d[g]=a[g]/c;return d},x=function(a,b,c,d){var g=Array(3);g[0]=c*a[0]+d*b[0];g[1]=c*a[1]+d*b[1];g[2]=c*a[2]+d*b[2];return g};i=function(a){var b,c;if(a)for(b=0;b<4;b++){this[b]=Array(4);for(c=0;c<4;c++)this[b][c]=a[b][c]}else for(b=0;b<4;b++){this[b]=Array(4);for(c=0;c<4;c++)this[b][c]=0;this[b][b]=1}this.size=4};i.fromCSSMatrix=function(a){var b=new i;b[0][0]=a.m11;b[0][1]=a.m12;b[0][2]=
a.m13;b[0][3]=a.m14;b[1][0]=a.m21;b[1][1]=a.m22;b[1][2]=a.m23;b[1][3]=a.m24;b[2][0]=a.m31;b[2][1]=a.m32;b[2][2]=a.m33;b[2][3]=a.m34;b[3][0]=a.m41;b[3][1]=a.m42;b[3][2]=a.m43;b[3][3]=a.m44;return b};var r=function(a){var b={};b.num=parseFloat(a);b.units=a.match(/\w+$/);if(typeof b.unit=="array")b.units=b.units[0];return b},w=function(a){a=a.toLowerCase();if(typeof a!="string")return 0;a=r(a);a.units=="deg"&&(a.num*=m);return a.num};i.fromCSSMatrixString=function(a){var b=new i,a=a.match(/(\w+\s*\([^\)]*\))/g);
if(typeof a=="undefined"||a===null)return b;var c;for(c=0;c<a.length;c++){var d=a[c].match(/\w+/),g=a[c].match(/\([^\)]*\)/),g=g[0].replace(/[\(\)]/g,""),g=g.split(","),f,e;switch(d[0]){case "matrix":d=new i;g.length==6&&(d[0][0]=parseFloat(g[0]),d[0][1]=parseFloat(g[1]),d[1][0]=parseFloat(g[2]),d[1][1]=parseFloat(g[3]),d[3][0]=parseFloat(g[4]),d[3][1]=parseFloat(g[5]),b.preMultiplyBy(d));break;case "translate3d":d=r(g[0]).num;f=g.length>1?r(g[1]).num:0;e=g.length>2?r(g[2]).num:0;b.translate3d(d,
f,e);break;case "translate":d=r(g[0]).num;f=g.length>1?r(g[1]).num:0;b.translate3d(d,f,0);break;case "translateX":g=r(g[0]).num;b.translate3d(g,0,0);break;case "translateY":g=r(g[0]).num;b.translate3d(0,g,0);break;case "translateZ":g=r(g[0]).num;b.translate3d(0,0,g);break;case "rotate3d":if(g.length>=3)d=r(g[0]).num,f=r(g[1]).num,e=r(g[2]).num,g=w(g[3]),b.rotate3d(d,f,e,g,!0);break;case "rotateX":g=w(g[0]);b.rotateX(g);break;case "rotateY":g=w(g[0]);b.rotateY(g);break;case "rotateZ":case "rotate":g=
w(g[0]);b.rotateZ(g);break;case "skew":d=w(g[0]);g=w(g[1]);b.skew(d,g);break;case "skewX":g=w(g[0]);b.skew(g,0);break;case "skewY":g=w(g[0]);b.skew(0,g);break;case "scale3d":d=parseFloat(g[0]);f=g.length>1?parseFloat(g[1]):1;g=g.length>2?parseFloat(g[2]):1;b.scale(d,f,g);break;case "scale":d=parseFloat(g[0]);f=g.length>1?parseFloat(g[1]):1;b.scale(d,f,1);break;case "scaleX":g=parseFloat(g[0]);b.scale(g,1,1);break;case "scaleY":g=parseFloat(g[0]);b.scale(1,g,1);break;case "scaleZ":g=parseFloat(g[0]);
b.scale(1,1,g);break;case "perspective":g=parseFloat(g[0]),b.perspective(g)}}return b};f.extend(i.prototype,{identity:function(){for(var a=0;a<4;a++){this[a]=Array(4);for(var b=0;b<4;b++)this[a][b]=0;this[a][a]=1}return this},determinant:function(){var a=this[0][0],b=this[0][1],c=this[0][2],d=this[0][3],g=this[1][0],f=this[1][1],e=this[1][2],j=this[1][3],h=this[2][0],C=this[2][1],i=this[2][2],m=this[2][3],k=this[3][0],l=this[3][1],n=this[3][2],t=this[3][3];return d*e*C*k-c*j*C*k-d*f*i*k+b*j*i*k+c*
f*m*k-b*e*m*k-d*e*h*l+c*j*h*l+d*g*i*l-a*j*i*l-c*g*m*l+a*e*m*l+d*f*h*n-b*j*h*n-d*g*C*n+a*j*C*n+b*g*m*n-a*f*m*n-c*f*h*t+b*e*h*t+c*g*C*t-a*e*C*t-b*g*i*t+a*f*i*t},normalizeTransform:function(){if(this[3][3]===0)return!1;for(var a=0;a<4;a++)for(var b=0;b<4;b++)this[a][b]/=this[3][3];return!0},transpose:function(){for(var a=new i,b=0;b<4;b++)for(var c=0;c<4;c++)a[b][c]=this[c][b];return a},toCSSMatrix:function(){var a=new e.CSSMatrix;a.m11=this[0][0];a.m12=this[0][1];a.m13=this[0][2];a.m14=this[0][3];a.m21=
this[1][0];a.m22=this[1][1];a.m23=this[1][2];a.m24=this[1][3];a.m31=this[2][0];a.m32=this[2][1];a.m33=this[2][2];a.m34=this[2][3];a.m41=this[3][0];a.m42=this[3][1];a.m43=this[3][2];a.m44=this[3][3];return a},_inverse:function(){return this},inverse:function(){if(e.CSSMatrix!==void 0){var a=this.toCSSMatrix().inverse();return i.fromCSSMatrix(a)}return this._inverse()},rotate3d:function(a,b,c,d,g){var f=new e.Matrix4x4;g||(d*=m);d&&(g=Math.sqrt(a*a+b*b+c*c),g!==0&&(a/=g,b/=g,c/=g,g=h(d),d=q(d),f[0][0]=
1+(1-d)*(a*a-1),f[1][0]=-c*g+(1-d)*a*b,f[2][0]=b*g+(1-d)*a*c,f[3][0]=0,f[0][1]=c*g+(1-d)*a*b,f[1][1]=1+(1-d)*(b*b-1),f[2][1]=-a*g+(1-d)*b*c,f[3][1]=0,f[0][2]=-b*g+(1-d)*a*c,f[1][2]=a*g+(1-d)*b*c,f[2][2]=1+(1-d)*(c*c-1),f[3][2]=0,f[0][3]=0,f[1][3]=0,f[2][3]=0,f[3][3]=1));return this.preMultiplyBy(f)},rotateX:function(a){return this.rotate3d(1,0,0,a)},rotateY:function(a){return this.rotate3d(0,1,0,a)},rotateZ:function(a){return this.rotate3d(0,0,1,a)},translate3d:function(a,b,c){var d=new e.Matrix4x4;
d[3][0]+=a;d[3][1]+=b;d[3][2]+=c;return this.preMultiplyBy(d)},scale:function(a,b,c){if(a!=1||b!=1||c!=1){var d=new e.Matrix4x4;d[0][0]=a;d[1][1]=b;d[2][2]=c;return this.preMultiplyBy(d)}return this},skew:function(b,c,f){f||(b*=m,c*=m);b!==0&&(f=new e.Matrix4x4,f[1][0]=a(b),this.preMultiplyBy(f));c!==0&&(b=new e.Matrix4x4,b[0][1]=a(c),this.preMultiplyBy(b));return this},perspective:function(a){if(a!==0){var b=new e.Matrix4x4;b[2][3]=1/a;this.preMultiplyBy(b)}return this},skewByFactors:function(a,
b,c){a=new e.Matrix4x4;a[2][1]=c;this.preMultiplyBy(a);a.identity();a[2][0]=c;this.preMultiplyBy(a);a.identity();a[1][0]=c;this.preMultiplyBy(a);return this},applyPerspective:function(a,b,c,d){var f=new e.Matrix4x4;f[0][3]=a;f[1][3]=b;f[2][3]=c;f[3][3]=d;this.preMultiplyBy(f);return this},preMultiplyBy:function(a){var b=a[0][0],c=a[0][1],d=a[0][2],f=a[0][3],e=a[1][0],j=a[1][1],h=a[1][2],i=a[1][3],m=a[2][0],k=a[2][1],l=a[2][2],n=a[2][3],t=a[3][0],q=a[3][1],u=a[3][2],a=a[3][3],r=this[0][0],s=this[0][1],
A=this[0][2],v=this[0][3],w=this[1][0],x=this[1][1],y=this[1][2],z=this[1][3],F=this[2][0],G=this[2][1],H=this[2][2],I=this[2][3],J=this[3][0],K=this[3][1],L=this[3][2],M=this[3][3];this[0][0]=b*r+c*w+d*F+f*J;this[0][1]=b*s+c*x+d*G+f*K;this[0][2]=b*A+c*y+d*H+f*L;this[0][3]=b*v+c*z+d*I+f*M;this[1][0]=e*r+j*w+h*F+i*J;this[1][1]=e*s+j*x+h*G+i*K;this[1][2]=e*A+j*y+h*H+i*L;this[1][3]=e*v+j*z+h*I+i*M;this[2][0]=m*r+k*w+l*F+n*J;this[2][1]=m*s+k*x+l*G+n*K;this[2][2]=m*A+k*y+l*H+n*L;this[2][3]=m*v+k*z+l*I+
n*M;this[3][0]=t*r+q*w+u*F+a*J;this[3][1]=t*s+q*x+u*G+a*K;this[3][2]=t*A+q*y+u*H+a*L;this[3][3]=t*v+q*z+u*I+a*M;return this}});e.Matrix4x4=i;e.decomposeTransform=function(a){var c={},f=new i(a);if(!f.normalizeTransform())return null;c=new i(a);for(a=0;a<3;a++)c[a][3]=0;c[3][3]=1;if(c.determinant(c)===0)return window.edge_authoring_mode&&alert("Bad perspective matrix"),null;var d=Array(4),a=Array(4);if(f[0][3]!==0||f[1][3]!==0||f[2][3]!==0){d[0]=f[0][3];d[1]=f[1][3];d[2]=f[2][3];d[3]=f[3][3];a=c.inverse();
if(!a)return!1;a=a.transpose().rightMultiply(d);f[0][3]=f[1][3]=f[2][3]=0;f[3][3]=1}else a[0]=a[1]=a[2]=0,a[3]=1;c=Array(3);c[0]=f[3][0];f[3][0]=0;c[1]=f[3][1];f[3][1]=0;c[2]=f[3][2];f[3][2]=0;d=Array(3);d[0]=Array(3);d[1]=Array(3);d[2]=Array(3);for(var g=0;g<3;g++)d[g][0]=f[g][0],d[g][1]=f[g][1],d[g][2]=f[g][2];f=Array(3);f[0]=v(d[0]);d[0]=s(d[0]);g=Array(3);g[0]=z(d[0],d[1]);d[1]=x(d[1],d[0],1,-g[0]);f[1]=v(d[1]);d[1]=s(d[1]);f[1]!==0&&(g[0]/=f[1]);g[1]=z(d[0],d[2]);d[2]=x(d[2],d[0],1,-g[1]);g[2]=
z(d[1],d[2]);d[2]=x(d[2],d[1],1,-g[2]);f[2]=v(d[2]);f[2]!==0&&(d[2]=s(d[2]));f[2]!==0&&(g[1]/=f[2],g[2]/=f[2]);var e;e=d[1];var j=d[2],h=Array(3);e.length!=3||j.length!=3?e=null:(h[0]=e[1]*j[2]-e[2]*j[1],h[1]=e[2]*j[0]-e[0]*j[2],h[2]=e[0]*j[1]-e[1]*j[0],e=h);if(z(d[0],e)<0)for(e=0;e<3;e++)f[e]*=-1,d[e][0]*=-1,d[e][1]*=-1,d[e][2]*=-1;e=Array(3);e[1]=l(-d[0][2]);q(e[1])!==0?(e[0]=b(d[1][2],d[2][2]),e[2]=b(d[0][1],d[0][0])):(e[0]=b(-d[2][0],d[1][1]),e[2]=0);return c={translation:c,rotation:e,scale:f,
skew:g,perspective:a}};e.Timeline.addTweenType("transform",function(a,b,c,d){return new k("transform",a,b,c,d)})})(jQuery,jQuery.Edge,jQuery.Edge.PropertyTween);(function(f,e,n){function k(a,b,c,f,h){e.PropertyTween.call(this,a,b,c,f,h);this.name="colorTween"}f.extend(k.prototype,n.prototype,{constructor:k,getValue:function(a){return f(this).css(a)},setValue:function(a,b,c){f(this).css(b,c)},parseValue:function(a){var b=e.parseColorValue(a);if(b&&b.colorFunction&&b.values){var a=b.values,b=b.colorFunction,c=/hsl/gi;if(b.match(/rgb/gi))if(this.animationColorSpace&&this.animationColorSpace=="HSL")b={r:a[0],g:a[1],b:a[2]},(b=e.rgbToHSL(b))?a.length>3?(a=a[3],
a=[b.h,b.s,b.l,a]):a=[b.h,b.s,b.l]:a=[];else if(this.animationColorSpace){if(this.animationColorSpace!="RGB")return a}else this.animationColorSpace="RGB";else if(b.match(c))if(this.animationColorSpace&&this.animationColorSpace=="RGB")b={h:a[0],s:a[1],l:a[2]},(b=e.hslToRGB(b))?a.length>3?(a=a[3],a=[b.r,b.g,b.b,a]):a=[b.r,b.g,b.b]:a=[];else if(this.animationColorSpace){if(this.animationColorSpace!="HSL")return a}else this.animationColorSpace="HSL";a.length==3&&(a[3]=1);return a}},formatValue:function(a){if(a){var b;
this.animationColorSpace=="HSL"?(b="hsl",a=a.length==4?b+"a("+a[0]+","+a[1]+"%,"+a[2]+"%,"+a[3]+")":b+"("+a[0]+","+a[1]+"%,"+a[2]+"%)"):(b="rgb",a=a.length==4?b+"a("+a[0]+"%,"+a[1]+"%,"+a[2]+"%,"+a[3]+")":b+"("+a[0]+"%,"+a[1]+"%,"+a[2]+"%)");return a}}});e.ColorTween=k;e.parseColorValue=function(a){if(a){var b=[],c,e,h=/^\s*#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])\s*$/;(e=/^\s*#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})\s*$/.exec(a))?(b=[parseInt(e[1],16)/255*100,parseInt(e[2],16)/255*100,parseInt(e[3],
16)/255*100],c="rgb"):(e=h.exec(a))?(b=[parseInt(e[1]+e[1],16)/255*100,parseInt(e[2]+e[2],16)/255*100,parseInt(e[3]+e[3],16)/255*100],c="rgb"):a=="transparent"&&(b=[0,0,0,0],c="rgb");c||(c=a.match(/\w+/),f.isArray(c)?c=c[0]:c||(c=""),(e=a.match(/\([^\)]*\)/))&&e.length>0&&(e=e[0].replace(/[\(\)]/g,"")));a=/rgb/gi;h=/hsl/gi;if(b.length===0)if(c.match(a))if((h=/^\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*(?:,\s*([0-9](?:\.[0-9]+)?)\s*)?$/.exec(e))&&h.length>=4){for(a=0;a<3;a++)b[a]=h[a+
1]/255*100;h.length>4&&(h[4]||(h[4]=1),b[3]=h[4])}else{if((e=/^\s*([0-9]{1,3}(?:\.[0-9]+)?)\s*%\s*,\s*([0-9]{1,3}(?:\.[0-9]+)?)\s*%\s*,\s*([0-9]{1,3}(?:\.[0-9]+)?)\s*%\s*(?:,\s*([0-9](?:\.[0-9]+)?)\s*)?$/.exec(e))&&e.length>=4){if(e.length>=5)e.length=5,e[4]||(e[4]=1);for(a=0;a<e.length-1;a++)b[a]=e[a+1]}}else if(c.match(h)&&(e=/^\s*([0-9]{1,3}(?:\.[0-9]+)?)\s*,\s*([0-9]{1,3}(?:\.[0-9]+)?)\s*%\s*,\s*([0-9]{1,3}(?:\.[0-9]+)?)\s*%\s*(?:,\s*([0-9](?:\.[0-9]+)?)\s*)?$/.exec(e))&&e.length>=4){if(e.length>=
5)e.length=5,e[4]||(e[4]=1);for(a=0;a<e.length-1;a++)b[a]=e[a+1]}if(b)for(a=0;a<b.length;a++)b[a]=Math.round(b[a]*1E4)/1E4;return{colorFunction:c,values:b}}};var c=1/3,i=1/6,l=2/3,h=function(a){return a<0?a+1:a>1?a-1:a},q=function(a,b,c,f){return f<i?a+c*f:f<0.5?b:f<l?a+c*(l-f):a};e.hslToRGB=function(a){if(a===null||a.s<0||a.s>100||a.l<0||a.l>100)return null;for(;a.h>360;)a.h-=360;for(;a.h<0;)a.h=360+a.h;var b={},f=a.h/360,e=a.s/100,a=a.l/100;if(e===0)b.r=b.g=b.b=1;else{var e=a<=0.5?a*(1+e):a+e-a*
e,a=2*a-e,i=h(f+c),k=h(f),f=h(f-c),l=(e-a)*6;b.r=q(a,e,l,i);b.g=q(a,e,l,k);b.b=q(a,e,l,f)}b.r=Math.min(b.r*100,100);b.g=Math.min(b.g*100,100);b.b=Math.min(b.b*100,100);b.r=Math.round(b.r*1E4)/1E4;b.g=Math.round(b.g*1E4)/1E4;b.b=Math.round(b.b*1E4)/1E4;return b};e.rgbToHSL=function(a){if(a===null||a.r<0||a.r>100||a.g<0||a.g>100||a.b<0||a.b>100)return null;var b={h:0,s:0,l:0},c=a.r/100,f=a.g/100,a=a.b/100,e=Math.max(c,f,a),h=Math.min(c,f,a);b.l=(e+h)/2;if(e==h||b.l<=0)return b;var i=e-h;b.s=b.l<=0.5?
i/(e+h):i/(2-e-h);b.h=e==a?4+(c-f)/i:e==f?2+(a-c)/i:(f-a)/i;b.h*=60;if(b.h>360)b.h-=360;else if(b.h<0)b.h=360+b.h;b.s=Math.min(b.s*100,100);b.l=Math.min(b.l*100,100);b.h=Math.round(b.h*1E4)/1E4;b.s=Math.round(b.s*1E4)/1E4;b.l=Math.round(b.l*1E4)/1E4;return b};e.Timeline.addTweenType("color",function(a,b,c,f){return new k("color",a,b,c,f)})})(jQuery,jQuery.Edge,jQuery.Edge.PropertyTween);(function(f,e,n,k){function c(a){for(;a&&typeof a.originalEvent!=="undefined";)a=a.originalEvent;return a}function i(a){for(var b={},c,d;a;){c=f.data(a,y);for(d in c)if(c[d])b[d]=b.hasVirtualBinding=!0;a=a.parentNode}return b}function l(){x&&(clearTimeout(x),x=0);x=setTimeout(function(){B=x=0;o.length=0;N=!1;d=!0},f.vmouse.resetTimerDuration)}function h(a,b,d){var e,g;if(!(g=d&&d[a])){if(d=!d)a:{for(d=b.target;d;){if((g=f.data(d,y))&&(!a||g[a]))break a;d=d.parentNode}d=null}g=d}if(g){e=b;var d=e.type,
h,i;e=f.Event(e);e.type=a;g=e.originalEvent;h=f.event.props;if(g)for(i=h.length;i;)a=h[--i],e[a]=g[a];if(d.search(/mouse(down|up)|click/)>-1&&!e.which)e.which=1;if(d.search(/^touch/)!==-1&&(a=c(g),d=a.touches,a=a.changedTouches,d=d&&d.length?d[0]:a&&a.length?a[0]:k)){g=0;for(len=v.length;g<len;g++)a=v[g],e[a]=d[a]}f(b.target).trigger(e)}return e}function q(a){var b=f.data(a.target,z);if(!N&&(!B||B!==b))if(b=h("v"+a.type,a))b.isDefaultPrevented()&&a.preventDefault(),b.isPropagationStopped()&&a.stopPropagation(),
b.isImmediatePropagationStopped()&&a.stopImmediatePropagation()}function a(a){var b=c(a).touches,e;if(b&&b.length===1&&(e=a.target,b=i(e),b.hasVirtualBinding))B=O++,f.data(e,z,B),x&&(clearTimeout(x),x=0),p=d=!1,e=c(a).touches[0],r=e.pageX,w=e.pageY,h("vmouseover",a,b),h("vmousedown",a,b)}function b(a){d||(p||h("vmousecancel",a,i(a.target)),p=!0,l())}function m(a){if(!d){var b=c(a).touches[0],e=p,g=f.vmouse.moveDistanceThreshold;p=p||Math.abs(b.pageX-r)>g||Math.abs(b.pageY-w)>g;flags=i(a.target);p&&
!e&&h("vmousecancel",a,flags);h("vmousemove",a,flags);l()}}function j(a){if(!d){d=!0;var b=i(a.target),e;h("vmouseup",a,b);if(!p&&(e=h("vclick",a,b))&&e.isDefaultPrevented())e=c(a).changedTouches[0],o.push({touchID:B,x:e.clientX,y:e.clientY}),N=!0;h("vmouseout",a,b);p=!1;l()}}function t(a){var a=f.data(a,y),b;if(a)for(b in a)if(a[b])return!0;return!1}function u(){}function A(c){var d=c.substr(1);return{setup:function(){t(this)||f.data(this,y,{});f.data(this,y)[c]=!0;s[c]=(s[c]||0)+1;s[c]===1&&D.bind(d,
q);f(this).bind(d,u);if(g)s.touchstart=(s.touchstart||0)+1,s.touchstart===1&&D.bind("touchstart",a).bind("touchend",j).bind("touchmove",m).bind("scroll",b)},teardown:function(){--s[c];s[c]||D.unbind(d,q);g&&(--s.touchstart,s.touchstart||D.unbind("touchstart",a).unbind("touchmove",m).unbind("touchend",j).unbind("scroll",b));var e=f(this),h=f.data(this,y);h&&(h[c]=!1);e.unbind(d,u);t(this)||e.removeData(y)}}}var y="virtualMouseBindings",z="virtualTouchID",e="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),
v="clientX clientY pageX pageY screenX screenY".split(" "),s={},x=0,r=0,w=0,p=!1,o=[],N=!1,d=!1,g="addEventListener"in n,D=f(n),O=1,B=0;f.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var E=0;E<e.length;E++)f.event.special[e[E]]=A(e[E]);g&&n.addEventListener("click",function(a){var b=o.length,c=a.target,d,e,g,h,i;if(b){d=a.clientX;e=a.clientY;threshold=f.vmouse.clickDistanceThreshold;for(g=c;g;){for(h=0;h<b;h++)if(i=o[h],g===c&&Math.abs(i.x-d)<threshold&&
Math.abs(i.y-e)<threshold||f.data(g,z)===i.touchID){a.preventDefault();a.stopPropagation();return}g=g.parentNode}}},!0)})(jQuery,window,document);

