//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="B1318"
//
// edge.0.0.1.min.js - version 0.1.1
 
(function(m){if(typeof m.Edge==="undefined")m.Edge={};var d=m.Edge;d.version="0.1.2";d.cloneJSONObject=function(l){var k,c;if(m.isArray(l)){k=[];var i,g=l.length;for(i=0;i<g;i++)c=l[i],k[i]=typeof c==="object"?d.cloneJSONObject(c):c}else for(i in k={},l)i!="prototype"&&(c=l[i],k[i]=typeof c==="object"?d.cloneJSONObject(c):c);return k};d.Notifier=function(){this.observers=[];this.notificationLevel=this.suppressNotifications=0};m.extend(d.Notifier.prototype,{addObserver:function(d){if(d){for(var k=
this.observers.length,c=0;c<k;c++)if(this.observers[c].observer==d)return;this.observers[k]={observer:d}}},removeObserver:function(d){if(d)for(var k=0;k<this.observers.length;k++)if(this.observers[k].observer==d)if(this.notificationLevel===0){this.observers.splice(k,1);break}else this.observers[k].deleted=!0},notifyObservers:function(d,k){if(d&&!this.suppressNotifications){k||(k={});k.methodName=d;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(d,this,k);else if(i[d])i[d](this,k)}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,d.Debug.reportError("Unbalanced enableNotifications() call!\n")},disableNotifications:function(){++this.suppressNotifications}});d.trimString=function(d){return d.replace(/^\s+|\s+$/g,
"")}})(jQuery);(function(m,d){function l(){d.Notifier.call(this);this.animationID="animID-"+l.nextID++}function k(a,b,c){d.Animation.call(this);if(typeof a=="function")this.handler=a;else if(typeof a=="string")this.eventType=a;this.handlerContext=c;this.data=b;this.isTrigger=!0}function c(a,b,o,h){d.Notifier.call(this);this.animation=a;this.position=0;this.duration=-1;this.easing=typeof h=="function"?h:h&&m.easing[h]?h:c.defaultEasing;if(b!==void 0)this.position=b;if(o!==void 0)this.duration=o;this.timeline=null;
this.dScale=1;this.dDuration=0;this.done=!1}function i(a){this.parameters={};a&&m.extend(this,a)}function g(a){d.Animation.call(this);m.extend(this,d.Timeline.config);m.extend(this,a);this.duration=this.currentPosition=this.startPosition=this.timerStart=this.timer=0;this.interval=1E3/this.fps;this.objects=[]}var j={};l.nextID=1;m.extend(l.prototype,d.Notifier.prototype,{constructor:l,_setup:function(){},_update:function(){},getDuration:function(){return 0}});m.extend(k.prototype,l.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){this.timeline=a;this.fired=!1}});c.defaultEasing="linear";m.extend(c.prototype,d.Notifier.prototype,{constructor:c,_setup:function(a,b){this.timeline=a;var c=this.duration,h=null;this.animation&&this.animation.getDuration&&(h=this.animation.getDuration());this.dScale=
c!=-1&&c!==0?h/c:1;this.dDuration=c!=-1?c:h;this.done=!1;this.animation&&this.animation.setup&&this.animation.setup(a,b)},_update:function(a,b){if(!this.done){var c=a,h=this.dDuration;if(this.animation){var i;h===0?i=c>=0?1:0:(c>=h&&(c=h),c<=0&&(c=0),i=m.easing[this.easing](c/h,c,0,1,h));this.animation.update(c*this.dScale,i,b)}(b.playDirection=="reverse"?c<=0:c>=h)&&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}});g.config={dropFrames:!0,fps:60};var q=[];g.tick=function(){var a=q.slice(0);q=[];for(var b=a.length,c=0;c<b;c++)a[c].call()};m.extend(g.prototype,l.prototype,{constructor:g,play:function(a){this.notifyObservers("onPlay");var b=new i(a);b.timeline=this;this._setup(this,a);
this.timerStart=(new Date).getTime();this.startPosition=this.currentPosition;var c=this,h=function(){c._handleTimer(b,h)};this._handleTimer(b,h)},stop:function(){this.notifyObservers("onStop");this.timer&&clearTimeout(this.timer);this.timerStart=this.timer=0},seek:function(a,b){this.notifyObservers("onSeek");this.stop();var c=this.currentPosition;this.currentPosition=a;var h=new i(b);h.timeline=this;this._setup(this,b);this._updateSeek(this.currentPosition,1,h,c)},add:function(a,b,i,h){this.objects.push(new c(a,
b,i,h));this.objects.sort(function(a,b){return a.position-b.position})},getDuration:function(){for(var a=0,b=this.objects,c=this.objects.length,h=Math.max,i=0;i<c;i++)var d=b[i],a=h(a,d.position+d.getDuration());return a},currentPosition:function(){return this.currentPosition},_update:function(a,b,c){this.notifyObservers("onPreUpdate",{elapsed:a,easingConst:b});for(var h=this.objects,i=h.length,d=c.playDirection!="reverse",g=0;g<i;g++){var j=h[d?g:i-g-1];if(d?a>=j.position:a<=j.position+j.duration)j.animation.isTrigger?
j.animation._update(a-j.position,c):j._update(a-j.position,c)}this.notifyObservers("onUpdate",{elapsed:a,easingConst:b});this.notifyObservers("onPostUpdate",{elapsed:a,easingConst:b,context:c})},_handleTimer:function(a,b){var c=(new Date).getTime()-this.timerStart,h=a.playDirection=="reverse",i=this.startPosition+(h?-c:c);this.currentPosition=i=Math.max(0,Math.min(i,this.duration));this._update(i,1,a);(!h?i<this.duration:i>0)?a.externalClock?q.push(b):this.timer=setTimeout(b,this.interval):(this.stop(),
this.notifyObservers("onComplete",{elapsed:c}))},_setup:function(a,b){d.Animation.prototype._setup.call(this,a);for(var c=this.objects,h=this.objects.length,i=0;i<h;i++){var g=c[i];g._done=!1;g._setup(this,b)}this.duration=this.getDuration()},_updateComplete:function(a){a._done=!0}});g.prototype._updateSeek=g.prototype._update;d.Animation=l;d.TimelineObject=c;d.Timeline=g;d.Timeline.createTimeline=function(a){return new d.Timeline(a)};d.Timeline.createTween=function(a){var b=j[a];if(b)return b.func.apply(b.context,
Array.prototype.slice.call(arguments,1));return null};d.Timeline.addTweenType=function(a,b,c){j[a]={func:b,context:c}};d.Timeline.createTrigger=function(a,b){return new k(a,b,arguments[arguments.length-1])};d.Timeline.createTimelineFromData=function(a){for(var b=jQuery.Edge.Timeline.createTimeline(),c=a.length,h=0;h<c;h++){var i=a[h],g=null;i.timeline?g=d.Timeline.createTimelineFromData(i.timeline):i.tween?g=d.Timeline.createTween.apply(null,i.tween):i.trigger&&(g=i.trigger.slice(0,2),g.push(this),
g=d.Timeline.createTrigger.apply(null,g));g&&b.add(g,i.position,i.duration,i.easing)}return b}})(jQuery,jQuery.Edge);(function(m,d){function l(c,i,g,j,q){d.Animation.call(this);this.name="prop tween";this.sourceElements=this.elements=i;this.deferElementResolution=!0;this.tweenType=k[c];this.updateTriggered=!1;this.property=g;this.fromValue=void 0;this.toValue=j;this.duration=1E3;this.fromValues=this.tokens=this.valueTemplate=null;q&&$.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(j);$.isArray(j)||(j=[j]);if(!a||a.length===0)a=j;i=a.length;for(c=0;c<i;c++){var g=a[c],b={};typeof g=="string"?(b.value=parseFloat(g.replace(/[a-zA-Z%]+$/,"")),b.unit=g.replace(/^-?[0-9]*(\.[0-9]+)?/,"")):(typeof g=="number"&&(g=parseFloat(g)),b.value=g,b.unit="");q.push(b)}j.length>1&&!this.valueTemplate&&alert("Multiple values specified for attribute tween, but no template was provided!");j.length>1&&(!this.fromValue||!$.isArray(this.fromValue))&&alert("Multiple values specified for attribute tween, but no from values specified!");
if(this.fromValue){j=this.fromValues=[];if((c=this.parseValue(this.fromValue))&&c.length>0)this.fromValue=c;else if(!$.isArray(this.fromValue))this.fromValue=[this.fromValue];i=this.fromValue.length;for(c=0;c<i;c++)g=this.fromValue[c],typeof g=="string"?j[c]=parseFloat(g.replace(/[a-zA-Z%]+$/,"")):(typeof g=="number"&&(g=parseFloat(g)),j[c]=g);this.toValues.length!=this.fromValues.length&&alert("Number of 'from' and 'to' values does not match for "+this.tweenType+" tween.")}if(this.filter){if(!$.isArray(this.filter))this.filter=
[this.filter];j=this.filter;i=j.length;for(c=0;c<i;c++)typeof j[c]=="string"&&(j[c]=Math[j[c]]),typeof j[c]!="function"&&(j[c]=null)}if(this.valueTemplate)this.tokens=this.parseTemplate(this.valueTemplate)}var k={style:0,attribute:1,property:2};l.Token=function(c,i){this.value=c;this.isPlaceholder=i};l.substituteParameters=function(c,i){for(var g=c;i&&typeof g=="string"&&g.search(/\$\{/)!=-1;){var j=g.search(/\$\{/),k=g.search(/\}/);(j=g.slice(j+2,k))||alert("Invalid parameter name: "+j);typeof j==
"string"&&(j=d.trimString(j),j=j.replace(/[\"\']/g,""));g=g.replace(/\$\{[^\}]*\}/,i[j]);typeof g=="undefined"&&alert("Animation parameter ${"+j+"} is undefined!")}return g};$.extend(l.prototype,d.Animation.prototype,{constructor:l,setup:function(){this.updateTriggered=!1},update:function(c,i,d){var j=this.getElementSet(d);if(!this.updateTriggered)this.updateTriggered=!0,this.setupForAnimation(d);var k=this,a=this.tweenType,b=this.property,o;j.each(function(){var h=k.getPropertyTweenData(this,a,b);
if(h.animationID==k.animationID){var d=h.fromValues,g=h.toValues,h=h.tokens,j=k.filter,m=d.length,l=[];for(o=0;o<m;o++){var u=d[o],w=g[o];u+=(w.value-u)*i;j&&j[o]&&(u=j[o](u));l.push(u+w.unit)}d="";d=k.formatValue(l);if(!(d.length>0))if(h){d=h.length;g=[];for(o=0;o<d;o++)j=h[o],j.isPlaceholder?g.push(l[j.value]):g.push(j.value);d=g.join("")}else d=l.join("");k.setValue.call(this,a,b,d);k.notifyObservers("onUpdate",{elapsed:c,easingConst:i,property:b,value:d,element:this})}})},setValue:function(c,
i,d){switch(c){case 0:$(this).css(i,d);break;case 1:this.setAttribute(i,d);break;case 2:this[i]=d}},getDuration:function(){return this.duration},resolveElementSelector:function(c){c=l.substituteParameters(this.elements,c.parameters);if(!c)c=this.elements;return $(c)},getElementSet:function(c){var i=this.animationID;if(!c.animData)c.animData={};var d=c.animData[i];d||(d=c.animData[i]=this.deferElementResolution?this.resolveElementSelector(c):this.elements);return d},getValue:function(c,i){var d;switch(i){case 0:d=
$(this).css(c);break;case 1:d=this.getAttribute(c);break;case 2:d=this[c]+""}return d},setupForAnimation:function(c){var d=this,g=this.tweenType,j=this.property;this.getElementSet(c).each(function(){var c=d.getPropertyTweenData(this,g,j);c.animationID=d.animationID;c.toValues=d.toValues;c.tokens=d.tokens;if(d.fromValues)c.fromValues=d.fromValues;else{var a=d.getValue.call(this,j,g);a===void 0&&(a="0");var b=d.parseValue(a);if(b&&b.length>0)for(var c=c.fromValues=[],a=b.length,o=0;o<a;o++){var h=b[o];
c[o]=typeof h=="string"?parseFloat(h.replace(/[a-zA-Z%]+$/,"")):h}else c.fromValues=[parseFloat(a.replace(/[a-zA-Z%]+$/,""))]}})},parseTemplate:function(c){for(var d=c.length,g=[],j=0,k=/@@[0-9]+@@/g,a=null;j<d&&(a=k.exec(c));)a.index!=j&&g.push(new l.Token(c.substring(j,a.index),!1)),g.push(new l.Token(parseInt(a[0].replace(/@@/g,""),10),!0)),j=k.lastIndex;j<d&&g.push(new l.Token(c.substring(j,d),!1));return g},parseValue:function(){return[]},formatValue:function(){return""},getPropertyTweenData:function(c,
d,g){var j=$.data(c,"tweenData");j||(j={},$.data(c,"tweenData",j));(c=j[d])||(c=j[d]={});(d=c[g])||(d=c[g]={animationID:-1});return d}});d.PropertyTween=l;d.Timeline.addTweenType("style",function(c,d,g,j){return new l("style",c,d,g,j)});d.Timeline.addTweenType("attribute",function(c,d,g,j){return new l("attribute",c,d,g,j)});d.Timeline.addTweenType("property",function(c,d,g,j){return new l("property",c,d,g,j)})})(jQuery,jQuery.Edge);(function(m,d,l){function k(p,n,a,e,f){d.PropertyTween.call(this,p,n,a,e,f);this.name="transformTween"}var c,i,g=Math.asin,j=Math.sin,q=Math.cos,a=Math.tan,b=Math.atan2,o=Math.PI/180,h=180/Math.PI;k.removeData=function(p){var n=m.data(p,k.dataName);n&&(n.timeline&&c.unRegister(n.timeline,n.id),$ele.removeData(p,k.dataName))};var s=function(p){var n=0;typeof p=="string"?n=parseFloat(p.replace(/[a-zA-Z%]+$/,"")):typeof p=="number"&&(n=p);return n};k.applyTransform=function(p,n,a,e){var p=m(p),f="webkitAppearance"in
document.documentElement.style,b=!0;e&&(b=!e.dontForceZ);if(f){e="translate("+n.translateX+","+n.translateY+")";f=s(n.translateZ);if(f!==0||b)e+=" translateZ("+n.translateZ+")";e+=" rotate("+n.rotateZ+") ";f=s(n.rotateY);f!==0&&(e+=" rotateY("+n.rotateY+")");f=s(n.rotateX);f!==0&&(e+=" rotateX("+n.rotateX+")");e+=" skew("+n.skewX+","+n.skewY+") scale("+n.scaleX+","+n.scaleY+") ";f=s(n.scaleZ);f!=1&&(e+=" scaleZ("+n.scaleZ+")");n="-webkit-transform";p.css(n,e);a&&a.observers.length&&a.notifyObservers("onUpdate",
{elapsed:0,easingConst:0,property:n,value:e,element:p[0]})}else a=s(n.rotateY),e=s(n.rotateX),a=n.scaleX*q(o*a),b=n.scaleY*q(o*e),e="translate("+n.translateX+","+n.translateY+")",e+=" rotate("+n.rotateZ+")",e+=" skew("+n.skewX+", "+n.skewY+")",e+=" scale("+a+","+b+")",p.css("-moz-transform",e),p.css("-o-transform",e),p.css("-ms-transform",e),p.css("msTransform",e)};var r=function(p){if(p!==0&&Math.abs(p)<1.0E-6)return p.toFixed(6);return p.toString()};k.dataName="EdgeTransformData";var y=1;m.extend(k.prototype,
l.prototype,{constructor:k,setup:function(){this.updateTriggered=!1},setValue:function(p,n,a){m.data(this,k.dataName)[n]=a},getValue:function(){m.data(this,k.dataName)},setupForAnimation:function(p){var a=this;this.getElementSet(p).each(function(){var p=m.data(this,k.dataName);p||(p=a.buildTransformData(this),m.data(this,k.dataName,p))});l.prototype.setupForAnimation.call(this,p)},update:function(p,a,b){l.prototype.update.call(this,p,a,b);var e=this,f=this.property,d=this.tweenType;this.getElementSet(b).each(function(){if(e.getPropertyTweenData(this,
d,f).animationID==e.animationID){var p=m.data(this,k.dataName);p.timeline=b.timeline;p.tween=e;c.Register(b.timeline,p.id,p)}})},buildTransformData:function(p){var a=d.parseCanonicalTransform(p);if(a===null){var a={},b=d.getTransformProps(p);a.translateX="0px";a.translateY="0px";a.translateZ="0px";a.scaleX=1;a.scaleY=1;a.scaleZ=1;a.rotateX="0deg";a.rotateY="0deg";a.rotateZ="0deg";a.skewXZ=0;a.skewXY=0;a.skewYZ=0;a.skewX="0deg";a.skewY="0deg";a.matrix&&delete a.matrix;if(b)a.translateX=r(b.translation[0])+
"px",a.translateY=r(b.translation[1])+"px",a.translateZ=r(b.translation[2])+"px",a.scaleX=r(b.scale[0]),a.scaleY=r(b.scale[1]),a.scaleZ=r(b.scale[2]),a.rotateX=r(b.rotation[0]*h)+"deg",a.rotateY=r(b.rotation[1]*h)+"deg",a.rotateZ=r(b.rotation[2]*h)+"deg",a.skewXY=b.skew[0],a.skewXZ=b.skew[1],a.skewYZ=b.skew[2],a.skewX=r(Math.atan(b.skew[0])*h)+"deg"}a===null&&(a={});a.id="transform_"+y++;a.element=p;a.onFinalUpdate=c.prototype._applyTransform;return a}});var J={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};d.getTransformProps=function(a,n){var b=typeof n=="string"?n:d.getTransform(a),e="webkitAppearance"in document.documentElement.style;if(b&&b!="none"&&e)e=new d.CSSMatrix,e.setMatrixValue(b),b=i.fromCSSMatrix(e);else if(b&&b!="none")b=i.fromCSSMatrixString(b);else return;return d.decomposeTransform(b)};d.getTransform=function(a){var n="webkitAppearance"in
document.documentElement.style,a=m(a),b=a[0].style,e;if(n)(e=a.get(0).style.webkitTransform)||(e=a.css("-webkit-transform"));if(e)return e;(e=a.get(0).style.msTransform)||(e=a.css("-ms-transform"));e||(e=a.css("msTransform"));if(!e)e=b.MozTransform;e||(e=b["-moz-transform"]);e||(e=a.css("-moz-transform"));if(!e)e=b.oTransform;e||(e=a.css("-o-transform"));if(!e)e=b.transform;e||(e=a.css("transform"));return e||""};d.parseCanonicalTransform=function(a,b){var c=(typeof b=="string"?b:d.getTransform(a)).match(/(\w+\s*\([^\)]*\))/g);
if(!c)return null;var e={},f={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"},h;for(h=0;h<c.length;h++){var i=c[h].match(/\w+/);if(e[i[0]]||J[i[0]]<0)return null;var g=c[h].match(/\([^\)]*\)/),g=g[0].replace(/[\(\)]/g,""),g=g.split(",");switch(i[0]){case "matrix":return null;case "translate3d":f.translateX=g[0];f.translateY=g.length>1?g[1]:"0px";f.translateZ=g.length>2?
g[2]:"0px";e.translate3d=e.translate=e.translateX=e.translateY=e.translateZ=!0;break;case "translate":f.translateX=g[0];f.translateY=g.length>1?g[1]:"0px";e.translate3d=e.translate=e.translateX=e.translateY=!0;break;case "translateX":f.translateX=g[0];e.translate3d=e.translate=e.translateX=!0;break;case "translateY":f.translateY=g[0];e.translate3d=e.translate=e.translateY=!0;break;case "translateZ":f.translateZ=g[0];e.translate3d=e.translateZ=!0;break;case "rotate3d":return e.rotate3d=e.rotate=e.rotateX=
e.rotateY=e.rotateZ=!0,null;case "rotateX":f.rotateX=g[0];e.rotate3d=e.rotateX=!0;break;case "rotateY":f.rotateY=g[0];e.rotate3d=e.rotateY=!0;break;case "rotateZ":case "rotate":f.rotateZ=g[0];e.rotate3d=e.rotate=e.rotateZ=!0;break;case "skew":f.skewX=g[0];f.skewY=g.length>1?g[1]:"0px";e.skew=e.skewX=e.skewY=!0;break;case "skewX":f.skewX=g[0];e.skew=e.skewX=!0;break;case "skewY":f.skewY=g[0];e.skew=e.skewY=!0;break;case "scale3d":f.scaleX=g[0];f.scaleY=g.length>1?g[1]:"0px";f.scaleZ=g.length>2?g[2]:
"0px";e.scale3d=e.scale=e.scaleX=e.scaleY=e.scaleZ=!0;break;case "scale":f.scaleX=g[0];f.scaleY=g.length>1?g[1]:"0px";e.scale=e.scaleX=e.scaleY=!0;break;case "scaleX":f.scaleX=g[0];e.scale3d=e.scale=e.scaleX=!0;break;case "scaleY":f.scaleY=g[0];e.scale3d=e.scale=e.scaleY=!0;break;case "scaleZ":f.scaleZ=g[0];e.scale3d=e.scaleZ=!0;break;case "perspective":e.perspective=!0}}return f};d.TransformTween=k;c=function(a){this.handlers={};this.timeline=a};c.Register=function(a,b,d){var e=a.updateFinalizer;
if(typeof e=="undefined")e=new c(a),a.updateFinalizer=e,a.addObserver(e);e.handlers[b]=d};c.unRegister=function(a,b){var c=a.updateFinalizer;typeof c!="undefined"&&delete c.handlers[b]};m.extend(c.prototype,{_finalizeUpdate:function(a,b){var c={elapsed:a,context:b},e;for(e in this.handlers)if(this.handlers.hasOwnProperty(e)){var f=this.handlers[e];if(f.onFinalUpdate)f.onFinalUpdate(c)}},onUpdate:function(a,b){this._finalizeUpdate(b.elapsed,b.context)},onComplete:function(){this.timeline&&this.timeline.removeObserver(this);
this.timeline.updateFinalizer=void 0},_applyTransform:function(a){var b=m.data(this.element,k.dataName);k.applyTransform(this.element,b,b.tween,a.context)}});k.UpdateFinalizer=c;if(typeof CSSMatrix=="undefined")if(typeof WebKitCSSMatrix!="undefined")d.CSSMatrix=WebKitCSSMatrix;else{if(typeof MozCSSMatrix!="undefined")d.CSSMatrix=MozCSSMatrix}else d.CSSMatrix=CSSMatrix;var x=function(a,b){for(var c=0,e=a.length,f=0;f<e;f++)c+=a[f]*b[f];return c},u=function(a){for(var b=0,c=a.length,e=0;e<c;e++)b+=
a[e]*a[e];return Math.sqrt(b)},w=function(a){var b=a.length,c=u(a),e=Array(b);c===0&&(c=1);for(var f=0;f<b;f++)e[f]=a[f]/c;return e},I=function(a,b,c,e){var f=Array(3);f[0]=c*a[0]+e*b[0];f[1]=c*a[1]+e*b[1];f[2]=c*a[2]+e*b[2];return f};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 t=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},v=function(a){a=a.toLowerCase();if(typeof a!="string")return 0;a=t(a);a.units=="deg"&&(a.num*=o);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 e=a[c].match(/\w+/),f=a[c].match(/\([^\)]*\)/),f=f[0].replace(/[\(\)]/g,""),f=f.split(","),d,h;switch(e[0]){case "matrix":e=new i;f.length==6&&(e[0][0]=parseFloat(f[0]),e[0][1]=parseFloat(f[1]),e[1][0]=parseFloat(f[2]),e[1][1]=parseFloat(f[3]),e[3][0]=parseFloat(f[4]),e[3][1]=parseFloat(f[5]),b.preMultiplyBy(e));break;case "translate3d":e=t(f[0]).num;d=f.length>1?t(f[1]).num:0;h=f.length>2?t(f[2]).num:0;b.translate3d(e,
d,h);break;case "translate":e=t(f[0]).num;d=f.length>1?t(f[1]).num:0;b.translate3d(e,d,0);break;case "translateX":f=t(f[0]).num;b.translate3d(f,0,0);break;case "translateY":f=t(f[0]).num;b.translate3d(0,f,0);break;case "translateZ":f=t(f[0]).num;b.translate3d(0,0,f);break;case "rotate3d":if(f.length>=3)e=t(f[0]).num,d=t(f[1]).num,h=t(f[2]).num,f=v(f[3]),b.rotate3d(e,d,h,f,!0);break;case "rotateX":f=v(f[0]);b.rotateX(f);break;case "rotateY":f=v(f[0]);b.rotateY(f);break;case "rotateZ":case "rotate":f=
v(f[0]);b.rotateZ(f);break;case "skew":e=v(f[0]);f=v(f[1]);b.skew(e,f);break;case "skewX":f=v(f[0]);b.skew(f,0);break;case "skewY":f=v(f[0]);b.skew(0,f);break;case "scale3d":e=parseFloat(f[0]);d=f.length>1?parseFloat(f[1]):1;f=f.length>2?parseFloat(f[2]):1;b.scale(e,d,f);break;case "scale":e=parseFloat(f[0]);d=f.length>1?parseFloat(f[1]):1;b.scale(e,d,1);break;case "scaleX":f=parseFloat(f[0]);b.scale(f,1,1);break;case "scaleY":f=parseFloat(f[0]);b.scale(1,f,1);break;case "scaleZ":f=parseFloat(f[0]);
b.scale(1,1,f);break;case "perspective":f=parseFloat(f[0]),b.perspective(f)}}return b};m.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],e=this[0][3],f=this[1][0],d=this[1][1],h=this[1][2],g=this[1][3],i=this[2][0],j=this[2][1],o=this[2][2],k=this[2][3],l=this[3][0],m=this[3][1],s=this[3][2],r=this[3][3];return e*h*j*l-c*g*j*l-e*d*o*l+b*g*o*l+c*
d*k*l-b*h*k*l-e*h*i*m+c*g*i*m+e*f*o*m-a*g*o*m-c*f*k*m+a*h*k*m+e*d*i*s-b*g*i*s-e*f*j*s+a*g*j*s+b*f*k*s-a*d*k*s-c*d*i*r+b*h*i*r+c*f*j*r-a*h*j*r-b*f*o*r+a*d*o*r},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 d.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(d.CSSMatrix!==void 0){var a=this.toCSSMatrix().inverse();return i.fromCSSMatrix(a)}return this._inverse()},rotate3d:function(a,b,c,e,f){var h=new d.Matrix4x4;f||(e*=o);e&&(f=Math.sqrt(a*a+b*b+c*c),f!==0&&(a/=f,b/=f,c/=f,f=j(e),e=q(e),h[0][0]=
1+(1-e)*(a*a-1),h[1][0]=-c*f+(1-e)*a*b,h[2][0]=b*f+(1-e)*a*c,h[3][0]=0,h[0][1]=c*f+(1-e)*a*b,h[1][1]=1+(1-e)*(b*b-1),h[2][1]=-a*f+(1-e)*b*c,h[3][1]=0,h[0][2]=-b*f+(1-e)*a*c,h[1][2]=a*f+(1-e)*b*c,h[2][2]=1+(1-e)*(c*c-1),h[3][2]=0,h[0][3]=0,h[1][3]=0,h[2][3]=0,h[3][3]=1));return this.preMultiplyBy(h)},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 e=new d.Matrix4x4;
e[3][0]+=a;e[3][1]+=b;e[3][2]+=c;return this.preMultiplyBy(e)},scale:function(a,b,c){if(a!=1||b!=1||c!=1){var e=new d.Matrix4x4;e[0][0]=a;e[1][1]=b;e[2][2]=c;return this.preMultiplyBy(e)}return this},skew:function(b,c,h){h||(b*=o,c*=o);b!==0&&(h=new d.Matrix4x4,h[1][0]=a(b),this.preMultiplyBy(h));c!==0&&(b=new d.Matrix4x4,b[0][1]=a(c),this.preMultiplyBy(b));return this},perspective:function(a){if(a!==0){var b=new d.Matrix4x4;b[2][3]=1/a;this.preMultiplyBy(b)}return this},skewByFactors:function(a,
b,c){a=new d.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,e){var f=new d.Matrix4x4;f[0][3]=a;f[1][3]=b;f[2][3]=c;f[3][3]=e;this.preMultiplyBy(f);return this},preMultiplyBy:function(a){var b=a[0][0],c=a[0][1],e=a[0][2],f=a[0][3],d=a[1][0],h=a[1][1],g=a[1][2],i=a[1][3],j=a[2][0],o=a[2][1],k=a[2][2],l=a[2][3],m=a[3][0],s=a[3][1],r=a[3][2],a=a[3][3],q=this[0][0],t=this[0][1],
y=this[0][2],u=this[0][3],v=this[1][0],w=this[1][1],x=this[1][2],z=this[1][3],A=this[2][0],B=this[2][1],C=this[2][2],D=this[2][3],E=this[3][0],F=this[3][1],G=this[3][2],H=this[3][3];this[0][0]=b*q+c*v+e*A+f*E;this[0][1]=b*t+c*w+e*B+f*F;this[0][2]=b*y+c*x+e*C+f*G;this[0][3]=b*u+c*z+e*D+f*H;this[1][0]=d*q+h*v+g*A+i*E;this[1][1]=d*t+h*w+g*B+i*F;this[1][2]=d*y+h*x+g*C+i*G;this[1][3]=d*u+h*z+g*D+i*H;this[2][0]=j*q+o*v+k*A+l*E;this[2][1]=j*t+o*w+k*B+l*F;this[2][2]=j*y+o*x+k*C+l*G;this[2][3]=j*u+o*z+k*D+
l*H;this[3][0]=m*q+s*v+r*A+a*E;this[3][1]=m*t+s*w+r*B+a*F;this[3][2]=m*y+s*x+r*C+a*G;this[3][3]=m*u+s*z+r*D+a*H;return this}});d.Matrix4x4=i;d.decomposeTransform=function(a){var c={},d=new i(a);if(!d.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 e=Array(4),a=Array(4);if(d[0][3]!==0||d[1][3]!==0||d[2][3]!==0){e[0]=d[0][3];e[1]=d[1][3];e[2]=d[2][3];e[3]=d[3][3];a=c.inverse();
if(!a)return!1;a=a.transpose().rightMultiply(e);d[0][3]=d[1][3]=d[2][3]=0;d[3][3]=1}else a[0]=a[1]=a[2]=0,a[3]=1;c=Array(3);c[0]=d[3][0];d[3][0]=0;c[1]=d[3][1];d[3][1]=0;c[2]=d[3][2];d[3][2]=0;e=Array(3);e[0]=Array(3);e[1]=Array(3);e[2]=Array(3);for(var f=0;f<3;f++)e[f][0]=d[f][0],e[f][1]=d[f][1],e[f][2]=d[f][2];d=Array(3);d[0]=u(e[0]);e[0]=w(e[0]);f=Array(3);f[0]=x(e[0],e[1]);e[1]=I(e[1],e[0],1,-f[0]);d[1]=u(e[1]);e[1]=w(e[1]);d[1]!==0&&(f[0]/=d[1]);f[1]=x(e[0],e[2]);e[2]=I(e[2],e[0],1,-f[1]);f[2]=
x(e[1],e[2]);e[2]=I(e[2],e[1],1,-f[2]);d[2]=u(e[2]);d[2]!==0&&(e[2]=w(e[2]));d[2]!==0&&(f[1]/=d[2],f[2]/=d[2]);var h;h=e[1];var j=e[2],o=Array(3);h.length!=3||j.length!=3?h=null:(o[0]=h[1]*j[2]-h[2]*j[1],o[1]=h[2]*j[0]-h[0]*j[2],o[2]=h[0]*j[1]-h[1]*j[0],h=o);if(x(e[0],h)<0)for(h=0;h<3;h++)d[h]*=-1,e[h][0]*=-1,e[h][1]*=-1,e[h][2]*=-1;h=Array(3);h[1]=g(-e[0][2]);q(h[1])!==0?(h[0]=b(e[1][2],e[2][2]),h[2]=b(e[0][1],e[0][0])):(h[0]=b(-e[2][0],e[1][1]),h[2]=0);return c={translation:c,rotation:h,scale:d,
skew:f,perspective:a}};d.Timeline.addTweenType("transform",function(a,b,c,e){return new k("transform",a,b,c,e)})})(jQuery,jQuery.Edge,jQuery.Edge.PropertyTween);(function(m,d,l){function k(a,b,c,h,g){d.PropertyTween.call(this,a,b,c,h,g);this.name="colorTween"}m.extend(k.prototype,l.prototype,{constructor:k,getValue:function(a){return m(this).css(a)},setValue:function(a,b,c){m(this).css(b,c)},parseValue:function(a){var b=d.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=d.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=d.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}}});d.ColorTween=k;d.parseColorValue=function(a){if(a){var b=[],c,d,g=/^\s*#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])\s*$/;(d=/^\s*#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})\s*$/.exec(a))?(b=[parseInt(d[1],16)/255*100,parseInt(d[2],16)/255*100,parseInt(d[3],
16)/255*100],c="rgb"):(d=g.exec(a))?(b=[parseInt(d[1]+d[1],16)/255*100,parseInt(d[2]+d[2],16)/255*100,parseInt(d[3]+d[3],16)/255*100],c="rgb"):a=="transparent"&&(b=[0,0,0,0],c="rgb");c||(c=a.match(/\w+/),m.isArray(c)?c=c[0]:c||(c=""),(d=a.match(/\([^\)]*\)/))&&d.length>0&&(d=d[0].replace(/[\(\)]/g,"")));a=/rgb/gi;g=/hsl/gi;if(b.length===0)if(c.match(a))if((g=/^\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(d))&&g.length>=4){for(a=0;a<3;a++)b[a]=g[a+
1]/255*100;g.length>4&&(g[4]||(g[4]=1),b[3]=g[4])}else{if((d=/^\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(d))&&d.length>=4){if(d.length>=5)d.length=5,d[4]||(d[4]=1);for(a=0;a<d.length-1;a++)b[a]=d[a+1]}}else if(c.match(g)&&(d=/^\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(d))&&d.length>=4){if(d.length>=
5)d.length=5,d[4]||(d[4]=1);for(a=0;a<d.length-1;a++)b[a]=d[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,g=2/3,j=function(a){return a<0?a+1:a>1?a-1:a},q=function(a,b,c,d){return d<i?a+c*d:d<0.5?b:d<g?a+c*(g-d):a};d.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={},d=a.h/360,h=a.s/100,a=a.l/100;if(h===0)b.r=b.g=b.b=1;else{var h=a<=0.5?a*(1+h):a+h-a*
h,a=2*a-h,g=j(d+c),i=j(d),d=j(d-c),k=(h-a)*6;b.r=q(a,h,k,g);b.g=q(a,h,k,i);b.b=q(a,h,k,d)}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};d.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,d=a.g/100,a=a.b/100,g=Math.max(c,d,a),i=Math.min(c,d,a);b.l=(g+i)/2;if(g==i||b.l<=0)return b;var j=g-i;b.s=b.l<=0.5?
j/(g+i):j/(2-g-i);b.h=g==a?4+(c-d)/j:g==d?2+(a-c)/j:(d-a)/j;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};d.Timeline.addTweenType("color",function(a,b,c,d){return new k("color",a,b,c,d)})})(jQuery,jQuery.Edge,jQuery.Edge.PropertyTween);

