window.log = function(){
  log.history = log.history || [];
  log.history.push(arguments);
  arguments.callee = arguments.callee.caller;  
  if(this.console) console.log( Array.prototype.slice.call(arguments) );
};
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});


/*******

	***	Anchor Slider by Cedric Dugas   ***
	*** Http://www.position-absolute.com ***
	
	Never have an anchor jumping your content, slide it.

	Don't forget to put an id to your anchor !
	You can use and modify this script for any project you want, but please leave this comment as credit.
	
*****/
		


$(document).ready(function() {
	$("a.anchorLink").anchorAnimate()
});

jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 1100
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}


/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 * 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});




//Copyright (c) 2011. Adobe Systems Incorporated.
// All rights reserved.
//
// 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);



/*************************************************************************
 edge.authoring.0.0.1.min.js - version 0.1.1
**************************************************************************/
(function(h,i){function o(){for(A=[];e.length>0;)e.shift().call()}var t=i.triggerDict={element:function(a,g,b){a&&h(g).bind(b,a)},timeline:function(a,g,b){if(a&&g){var d=this.getTimelineData(g),c=d.toState,d=d.fromState;if(!this.tlProxy)this.tlProxy={};this.tlProxy[b]=a;this._getTimeline(g,c,d).addObserver(this.tlProxy)}}},l=i.Symbol=function(a,g){i.Notifier.call(this);this.widgetEventPrefix="edgeSym_";this.element=null;this.options={data:null,initialState:null};this.states={};this.timelines={};this.timelineCache=
{};this.timelineStateMap={};this.defaultBaseState="Base State";this.baseState=null;this._init(a,g)};i.symbol=l;var r=i.PropertyTween,s=r.substituteParameters;l._substituteParameters=s;var n,p=i.symbolDefns={};i.baseDataName="edgeBaseData";h.extend(l.prototype,i.Notifier.prototype,{constructor:l,_init:function(a,g){if(g&&(h.extend(this.options,g),h.isArray(g.observers)&&g.observers.length))for(var b=g.observers.length,d=0;d<b;d++)this.addObserver(g.observers[d]);if(!this.options.data)return null;this.element=
a;d=this._createEvent();this.notifyObservers("onPreSymbolInit",d);b=this._createEvent();if(d.performDefaultAction){d=h(a);d.data("edgeSymbol",this);if(!d.get(0).id)d.get(0).id=l._makeUniqueID();var c=this.options.data;this.parameterValues=this._makeDefaultParameters();h.extend(this.parameterValues,this.options.parameters);c.content&&this._injectMarkup();c.actions&&this._addActionsFromData(c.actions);c.timelines&&this._createTimelineSetFromData(c.timelines,c.states);c.bindings&&c.bindings.length&&
this._addBindingsFromData(c.bindings);var e=d[0].nodeName=="BODY";c.content&&c.content.dom&&!e&&(c=d.css("position"),c!="absolute"&&c!="relative"&&d.css("position","relative"));this._goToInitialState();if(d[0].style&&(typeof d[0].style.webkitTransform=="undefined"||d[0].style.webkitTransform===""||d[0].style.webkitTransform=="none"))d[0].style.webkitTransform="translateZ(0)";this.notifyObservers("onPostSymbolInit",b);return this}else this.notifyObservers("onPostSymbolInit",b)},_createEvent:function(a){var g=
{Symbol:this,element:this.element,performDefaultAction:!0};h.extend(g,a);return g},_makeDefaultParameters:function(){var a={},g=this.options.data.parameters;if(g)for(var b in g)if(g.hasOwnProperty(b))a[b]=g[b].defaultValue;h.extend(a,this._getSymbolParams());return a},_injectMarkup:function(a){var g=a,b=this._createEvent({markup:g});this.notifyObservers("onPreInjectMarkup",b);g=b.markup;a=this._createEvent({markup:g});if(b.performDefaultAction){var d,b=this.parameterValues;d=this.options.data.content;
if(!g&&d)if(d.ref)g="",h(d.ref).each(function(a,b){g+=h(b).html()});else if(d.markup)g=d.markup;else if(d.dom){var c=i.DeclareMarkup;if(c){var e=d.dom,f=d.symbolInstances;if(this.options.opts&&this.options.opts.regenerateID===!0){JSON.parse(JSON.stringify(d.dom));f=[];d.symbolInstances&&(f=JSON.parse(JSON.stringify(d.symbolInstances)));var B=e.length;for(d=0;d<B;d++)this._reIdDOMElements(e[d],f)}c.renderDOM(e,h(this.element).get(0),b,this.getSymbolTypeName(),f);f&&f.length>0&&this._processNestedSymbolInstances(f)}}if(g){if((c=
this._getParentSymbol())&&c.options.data.actors&&c.options.data.actors.instance_parameters){e=c.options.data.actors.instance_parameters;f=e.length;for(d=0;d<f;d++)B=r.substituteParameters(e[d].selector,c._getSymbolParams()),h(B).filter(h(this.element)).length&&h.extend(b,e[d].parameters)}g=s(g,b);h(g).appendTo(this.element)}}this.notifyObservers("onPostInjectMarkup",a)},_processNestedSymbolInstances:function(a){if(a)for(var g=a.length,b=0;b<g;b++){var d="#"+a[b].id;h(d).get(0)&&i.convertElementToSymbolInstance(d,
a[b].symbolName)}},_reIdDOMElements:function(a,g){var b=h(this.element).get(0).id,d=a.id;if(!d||d==="")d=l._makeUniqueID();for(var b=b+"_"+d,d=g.length,c=0;c<d;c++)if(g[c].id==a.id)g[c].id=b;a.id=b;if(a.c){b=a.c.length;for(d=0;d<b;d++)this._reIdDOMElements(a.c[d],g)}},_getParentSymbol:function(){for(var a=h(this.element).parents(),g=a.length,b=0;b<g;b++){var d=l.get(a[b]);if(d)return d}return null},_createTimelineSetFromData:function(a,g){this.states=g;this.timelines=a;this.baseState=this.options.data.baseState;
if(!this.baseState)this.baseState="Base State";return this},_addBindingsFromData:function(a){for(var g=a.length,b=0;b<g;b++){var d=a[b],c=d[0];if(c[0]=="element"){var e=s(c[1],this._getSymbolParams());e!=c[1]&&(c=i.cloneJSONObject(c),c[1]=e)}if(e=t[c[0]])(d=this._getActionCallbackFunc(c[0],c[1],d.slice(1)))&&e.apply(this,[d].concat(c.slice(1)))}},_getActionCallbackFunc:function(a,g,b){var d=this[b[0]],c=this;if(typeof d=="function")if(b.slice(1),a=="element")return function(){try{var a=Array.prototype.slice.call(arguments);
return d.apply(c,a)}catch(b){}};else if(a=="timeline")return function(){try{var b=Array.prototype.slice.call(arguments),e=h.Event(a);b.splice(0,0,e,g);return d.apply(c,b)}catch(f){}};return null},_addActionsFromData:function(a){h.extend(this,a)},_getSymbolParams:function(){return{symbolSelector:"#"+h(this.element).get(0).id}},_flushCache:function(){var a=this.timelines,g;for(g in a)a.hasOwnProperty(g)&&this._dirtyTimeline(g)},_goToInitialState:function(){var a={parameters:this.parameterValues},g=
this.options.data.initialState;if(!g)g=this.options.data.baseState;l.useCSSAnimation||(g?this._applyRules(this._buildStateForCache(null,g,a)):(this.options.data.autoPlay||this.getTimelineData("Default Timeline"))&&this.seek("Default Timeline",0))},_preNotify:function(a,g,b){var d={};h.extend(d,b);b=this._createEvent({tlName:g,tlOptions:d});this.notifyObservers(a,b);if(b.performDefaultAction)return b.tlOptions;else d=b.tlOptions,g={Symbol:this,timelineName:g,tlOptions:d,performDefaultAction:!0},a=
a.replace(/onPre/,"onPost"),this.notifyObservers(a,g)},play:function(a,g){var b=this._preNotify("onPreSymbolPlay",a,g);if(typeof b!==void 0){if(typeof a==="string"){this._rememberBaseStateForTimeline(a);var d={parameters:this.parameterValues};h.extend(d,b);this.timelines&&(this._seek(a,0,d),this._play(a,d))}this.notifyObservers("onPostSymbolPlay",this._createEvent({timeline:a,tlOptions:b}));return this}},playContinue:function(a,g){var b=this._preNotify("onPreSymbolPlayContinue",a,g);if(typeof b!==
void 0){if(typeof a==="string"){this._rememberBaseStateForTimeline(a);var d={parameters:this.parameterValues};h.extend(d,b);this.timelines&&this._play(a,d)}this.notifyObservers("onPostSymbolPlayContinue",this._createEvent({timeline:a,tlOptions:b}));return this}},seek:function(a,g,b){b=this._preNotify("onPreSymbolSeek",a,b);if(typeof b===void 0)return null;if(typeof a==="string"){this._rememberBaseStateForTimeline(a);var d={parameters:this.parameterValues};h.extend(d,b);this.timelines&&this._seek(a,
g,d)}this.notifyObservers("onPostSymbolSeek",this._createEvent({timeline:a,tlOptions:b}));return null},getSymbolTypeName:function(){return this.options.data.typeName},getParameter:function(a){return this.parameterValues[a]},setParameter:function(a,g){this.parameterValues[a]=g},destroy:function(){h(this.ele).removeData("edgeSymbol");return this},_addState:function(a,g){this.states[a]=g},_addTimelineData:function(a,g){this.timelines[a]=g;if(g.fromState&&g.toState)this.timelineStateMap={}},_getTimelineFromStates:function(a,
g){if(typeof this.timelineStateMap[a+"//"+g]=="undefined"){for(var b in this.timelines)if(this.timelines.hasOwnProperty(b)){var d=this.timelines[b];this.timelineStateMap[d.fromState+"//"+d.toState]=b}typeof this.timelineStateMap[a+"//"+g]=="undefined"&&(this.timelineStateMap[a+"//"+g]=null);return this.timelineStateMap[a+"//"+g]}},_setTimelineData:function(a,g){var b=this.timelines[a],d=this._getTimeline(a,b.toState,b.fromState),c=d.observers.slice(0);this._dirtyTimeline(a);if(b&&b.fromState&&b.toState)this.timelineStateMap=
{};this._addTimelineData(a,g);var e=c.length;if(e){d=this._getTimeline(a,b.toState,b.fromState);for(b=0;b<e;b++)d.addObserver(c[b])}},_saveObservers:function(a){var g=this.timelines[a],g=this._getTimeline(a,g.toState,g.fromState);if(!this.timelineObservers)this.timelineObservers={};this.timelineObservers[a]=g.observers.slice(0)},_restoreObservers:function(a,g){if(this.timelineObservers&&this.timelineObservers[a]){var b=this.timelineObservers[a];if(b){var d,c=b.length;for(d=0;d<c;d++)g.addObserver(b[d])}}},
_dirtyTimeline:function(a){this._saveObservers(a);this.timelineCache[this._makeTimelineKey(a)]=null;this.timelineStateMap={};this.toStateCache=this.fromStateCache=null},_isCacheDIrty:function(a){return this.timelineCache[this._makeTimelineKey(a)]===null},_getStateData:function(a){return this.states[a]},getTimelineData:function(a){return this.timelines[a]},_makeTimelineKey:function(a,g,b){var d=null;if(!g||!b)d=this.getTimelineData(a);if(!g)g=d.toState;if(!b)b=d.fromState;return a+"-"+(g?g:"")+"-"+
(b?b:"")},_getBaseStateData:function(){if(this.baseState)return this._getStateData(this.baseState);else for(var a in this.states)if(this.states[a].baseState)return this.baseState=a,this._getStateData(this.baseState);return this._getStateData(this.defaultBaseState)},_mergeBaseState:function(a){var g=i.cloneJSONObject(this._getBaseStateData()),b;for(b in a)a.hasOwnProperty(b)&&(g[b]||(g[b]=[]),g[b]=g[b].concat(a[b]));return g},_getTimeline:function(a,g,b){var d=this._makeTimelineKey(a,g,b);if(this.timelineCache[d])return this.timelineCache[d];
var c=this.getTimelineData(a).timeline;if(g||b)c=i.cloneJSONObject(c);for(var e=c.length,f={},h={},j,k,m=0;m<e;m++)k=c[m],k.tween&&(j=k.tween[1],f[j]||(f[j]=[]),f[j].push(k),j=k.tween[0]+":"+k.tween[1]+":"+k.tween[2],h[j]||(h[j]=[]),h[j].push(k));k=function(a,b){return a.position-b.position};for(j in h)h.hasOwnProperty(j)&&h[j].sort(k);var l,n,o,p,r,s,t,v;if(g)for(l in g=this._mergeBaseState(this._getStateData(g)),g)if(g.hasOwnProperty(j)){m=g[l];n=f[l];o=m.length;for(t=0;t<o;t++){k=m[t];p=k[0];r=
k[1];s=k[2];var q=null,w=-1,e=n.length;for(v=0;n&&v<e;v++)if(k=n[v],j=k.tween,j[0]==p&&j[2]==r&&(w==-1||k.position+k.duration>w))q=k,w=k.position+k.duration;q&&q.tween.length>4&&q.tween[4]&&q.tween[4].copyToState&&(q.tween[3]=s)}}g={};if(b)for(l in b=this._getStateData(b),b)if(b.hasOwnProperty(l)){m=b[l];n=f[l];o=m.length;for(t=0;t<o;t++){k=m[t];p=k[0];r=k[1];s=k[2];g[p+":"+l+":"+r]=s;q=null;w=-1;if(n)e=n.length;for(v=0;n&&v<e;v++)if(k=n[v],j=k.tween,j[0]==p&&j[2]==r&&(w==-1||k.position<w))q=k,w=
k.position;if(q&&(k=q.tween.length>4&&q.tween[4]&&q.tween[4].copyFromState,q.tween.length<4||!q.tween[4]||typeof q.tween[4].fromValue=="undefined"||k))q.tween[4]||(q.tween[4]={}),q.tween[4].fromValue=s}}if(b)for(j in h)if(h.hasOwnProperty(j)&&h[j][0].position>0&&(b=g[j],b!==void 0))k=i.cloneJSONObject(h[j][0]),k.tween[3]=k.tween[4].fromValue=b,b=k.position,k.position=0,k.duration=b,c.push(k);c=this._createTimelineFromData(c);this._restoreObservers(a,c);return this.timelineCache[d]=c},_createTimelineFromData:function(a){for(var g=
jQuery.Edge.Timeline.createTimeline(),b=a.length,d=0;d<b;d++){var c=a[d],e=null;c.timeline?e=l.prototype._createTimelineFromData(c.timeline):c.tween?e=i.Timeline.createTween.apply(null,c.tween):c.trigger&&(e=c.trigger.slice(0,2),e.push(this),e=i.Timeline.createTrigger.apply(null,e));e&&g.add(e,c.position,c.duration,c.easing)}return g},playReverse:function(a,g){if(!(typeof a!="string"||a.length===0)){var b=this._preNotify("onPreSymbolPlayReverse",a,g);if(typeof b!==void 0){this._rememberBaseStateForTimeline(a);
var d=this.getTimelineData(a).fromState,c=this.getTimelineData(a).toState,e={};h.extend(e,b,this.opts,{playDirection:"reverse"},{parameters:this.parameterValues});e.continueFromCurrentPos||this._ensureToState(a,e);if(d=this._getTimeline(a,c,d)){if(!this.tlPlayHandler){var f=this;this.tlPlayHandler={};this.tlPlayHandler.onComplete=function(){f._ensureFromState(this.timelineName,this.opts);this.tl.removeObserver(f.tlPlayHandler)}}h.extend(this.tlPlayHandler,{tl:d,timelineName:a,opts:e});d.addObserver(this.tlPlayHandler);
e.continueFromCurrentPos||d.seek(d.getDuration());d.play(e)}this.notifyObservers("onPostSymbolPlayReverse",this._createEvent({timeline:a,tlOptions:b}));return this}}},playReverseContinue:function(a,g){var b=this._preNotify("onPreSymbolPlayReverseContinue",a,g);if(typeof b!==void 0){this._rememberBaseStateForTimeline(a);if(typeof a==="string"){var d={};h.extend(d,b,{continueFromCurrentPos:!0},{parameters:this.parameterValues});this.playReverse(a,d)}this.notifyObservers("onPostSymbolPlayReverseContinue",
this._createEvent({timeline:a,tlOptions:b}));return this}},_buildStateForCache:function(a,g){var b={};if(g){var d=this.states[g];if(d){var c={},e,f,i;if(a){var j=this.getTimelineData(a).timeline,k=j.length;for(e=0;e<k;e++)i=j[e],i.tween&&(f=s(i.tween[1],this.parameterValues),f=i.tween[0]+":"+f+":"+i.tween[2],c[f]||(c[f]=[]),c[f].push(i))}for(var m in d)if(m!=="prototype"){c=d[m];for(e=0;e<c.length;e++)if(j=c[e],f=s(m,this.parameterValues),j[0]=="style"||j[0]=="transform"||j[0]=="color"){b[f]||(b[f]=
[]);i=j[2];if(j[3]&&j[3].valueTemplate)if(k=r.prototype.parseTemplate.call(null,j[3].valueTemplate)){var n=k.length,l=[],o=j[2];h.isArray(o)||(o=[o]);for(var p=0;p<n;p++)i=k[p],i.isPlaceholder?l.push(o[i.value]):l.push(i.value);i=l.join("")}else i=j[2].join("");b[f].push({decl:j,value:i})}}return b}}},_ensureState:function(a,g,b){var d=g+"Cache";this[d]||(this[d]={});var c=null;this[d][a]?c=this[d][a]:(g=this.getTimelineData(a)[g],c=this._buildStateForCache(a,g,b),!this._isParameterizedActorTL(a)&&
!this._isParameterizedActorState(g)&&(this[d][a]=c));this._applyRules(c,b)},_applyRules:function(a,c){var b=this,d,e=function(){var a=h(this),e={},f=h.data(this,"edgeBaseData");f||(b._rememberBaseState(a),f=h.data(this,"edgeBaseData"));h.extend(e,f.transformData,d);h.data(this,i.TransformTween.dataName,e);f=!1;if(c)f=c.dontForceZ;i.TransformTween.applyTransform(a,e,void 0,{dontForceZ:f});(e=h.data(this,"ui_visibility"))&&a.css("visibility",e)},f;for(f in a)if(a.hasOwnProperty(f)){var u=a[f],l=u.length;
d=null;for(var j=0;j<l;j++){var k=u[j].decl,m=k[1];k[0]=="transform"?(d||(d={}),d[m]=u[j].value):(k=u[j].decl,k=u[j].value,h(f).css(m,k))}d&&i.TransformTween&&h(f).each(e)}},_ensureFromState:function(a,c){this._ensureState(a,"fromState",c)},_ensureToState:function(a,c){this._ensureState(a,"toState",c)},_isParameterizedActorTL:function(a){for(var a=this.getTimelineData(a).timeline,c=a.length,b=0;b<c;b++){var d=a[b];if(d.tween&&typeof d.tween[1]=="string"&&d.tween[1].search(/\$\{/)!=-1)return!0}return!1},
_isParameterizedActorState:function(a){if(!a)return!1;a=this.states[a];if(!a)return!1;for(var c in a)if(c.search(/\$\{/)!=-1)return!0;return!1},_isReverse:function(a){return typeof a=="object"&&typeof a.playDirection=="string"&&a.playDirection=="reverse"},_play:function(a,c){var b=this.getTimelineData(a);if(b){var d=b.toState;if(a&&(b=this._getTimeline(a,d,b.fromState))){if(d&&!this._isReverse(c)){if(!this.tlPlayHandler){var e=this;this.tlPlayHandler={};this.tlPlayHandler.onComplete=function(){e._ensureToState(this.timelineName,
this.opts);this.tl.removeObserver(e.tlPlayHandler)}}h.extend(this.tlPlayHandler,{tl:b,timelineName:a,opts:c});b.addObserver(this.tlPlayHandler)}b.play(c)}}},_seek:function(a,c,b){var d=this._isCacheDIrty(a),e=this.getTimelineData(a);if(e){var f=e.toState,e=e.fromState;b||(b={});!d&&b.skipFromState?b.assumeStateUnchanged=!0:(this._ensureFromState(a,b),b.assumeStateUnchanged=!1);d=0;if(a&&(f=this._getTimeline(a,f,e)))d=f.getDuration(),f.seek(c,b);c>=d&&this._ensureToState(a,b)}},_rememberBaseStateForTimeline:function(a){if(a&&
(a=this.getTimelineData(a)))for(var a=a.timeline,c=a.length,b=0;b<c;b++){var d=a[b];d.tween&&this._rememberBaseState(s(d.tween[1],this.parameterValues))}},_rememberBaseState:function(a){h(a).each(function(){var a=h(this),b=h.data(this,"edgeBaseData");if(!b)b={},h.data(this,"edgeBaseData",b),b.inlineValue=a.attr("style"),b.transformData=i.TransformTween.prototype.buildTransformData.call(null,this)})},compute:function(a,c,b,d,e){var f;if(a){var h=this.getTimelineData(a);(a=this._getTimeline(a,h.toState,
h.fromState))&&(f=a.compute(c,b,d,e))}return f},findNext:function(a,c,b,d,e,f,h){if(a){var i=this.getTimelineData(a),d=d.toString();if(a=this._getTimeline(a,i.toState,i.fromState)){var j,i=a.getDuration()+10,d=parseFloat(d.replace(/[a-zA-Z%]+$/,"")),k=f+10;j=a.compute(c,b,f,h);for(var m=j[e],m=parseFloat(m.replace(/[a-zA-Z%]+$/,"")),k=f;k<=i;k+=10)if((j=a.compute(c,b,k,h))&&j.length){f=j[e];f=parseFloat(f.replace(/[a-zA-Z%]+$/,""));if(d>=Math.min(m,f)&&d<=Math.max(m,f))return k;m=f}}}return-1},remove:function(){var a=
this._createEvent({});this.notifyObservers("onPreRemove",a);if(a.performDefaultAction){h(this.element).removeData("edgeSymbol");if(n)for(var c=n.length;c>=0;c--)n[c]==this&&n.splice(c,1);this.element=null;this.notifyObservers("onPostRemove",a)}}});l.get=function(a){return h(a).data("edgeSymbol")};l.getDefaultEasing=function(){return i.TimelineObject.defaultEasing};var z=(new Date).getTime(),x=function(){for(var a="eid_"+z++;h("#"+a).length>0;)a="eid_"+z++;return a};l._makeUniqueID=x;var y=0,A=[],
e=[];$loadCalled=!1;i.requestImage=function(a){y++;var c=new Image;A.push(c);h(c).load(function(){y--;y<=0&&$loadCalled&&setTimeout(o,0)});c.src=a};i.ready=function(a){e.push(a)};h(window).load(function(){$loadCalled=!0;y<=0&&o()});i.compositions=i.compositions||{};i.compositionDefns=i.compositionDefns||{};i.registerCompositionDefn=function(a,c){i.compositionDefns[a]||(i.compositionDefns[a]=c)};var c=i.Composition=function(a,c,b){b=b||{};if(!window.edge_authoring_mode||b._tool||window.edge_remote_authoring){i.Notifier.call(this);
var d,e,n=this,u=this.symbolDefns=i.compositionDefns[a];this.symbolInstances=[];this.compId=a;f(p);for(d in c)a=h(c[d]),a.each(function(){e=new l(this,{data:u[d],comp:n});n.symbolInstances.push(e)})}};h.extend(c.prototype,i.Notifier.prototype,{play:function(a){if(!window.edge_authoring_mode||a)if(typeof i.autoPlay=="undefined"||i.autoPlay)for(var a=this.symbolInstances.length,c=0;c<a;c++){var b=this.symbolInstances[c],d=b.options.data.autoPlay;typeof d=="string"&&d!="true"?b.play(d):(typeof d=="undefined"||
d===!0||d=="true")&&b.play("Default Timeline")}}});var f;i.initialize=function(a,c,b){if(!window.edge_authoring_mode||b||window.edge_remote_authoring){if(typeof n=="undefined")n=i.symbolInstances=[];h.extend(p,a);f(p);var a=n,d;for(d in p)if(p.hasOwnProperty(d)){p[d].typeName=d;var b=[],b=".symbol_"+d,b=c?h(c).find("*").andSelf().filter(b):h(b),e=b.size(),o;for(o=0;b&&o<e;o++){var u=new l(h(b.get(o)),{data:p[d]});n.push(u);if(d=="stage")i.stage=u}}if(a.length===0||!i.stage)i.stage=new l(h("body"),
{data:p.stage}),n.push(i.stage);window.runtimeReady&&window.runtimeReady()}};i.convertElementToSymbolInstance=function(a,c){if(a&&h(a)&&n&&p[c]){var b=new l(h(a),{data:p[c],opts:{regenerateID:!0}});n.push(b)}};i.getSymbolInstances=function(a){var c=[];if(!n)return c;for(var b=n.length,d=0;d<b;d++)for(a in p)p.hasOwnProperty(a)&&n[d].getSymbolTypeName()==a&&c.push(n[d]);return c};i.removeSymbolInstance=function(a){n&&(a=l.get(a))&&a.remove()};f=function(a){for(var c in a)if(a.hasOwnProperty(c)&&a[c].timelines)for(var b in a[c].timelines)if(a[c].timelines.hasOwnProperty(b))for(var d=
a[c].timelines[b].timeline,e=d.length,f=0;f<e;f++){var h=d[f];if(!h.id)h.id=x()}};i.play=function(a){if(!window.edge_authoring_mode||a)if(typeof i.autoPlay=="undefined"||i.autoPlay)for(var a=this.symbolInstances.length,c=0;c<a;c++){var b=n[c],d=b.options.data.autoPlay;typeof d=="string"&&d!="true"?b.play(d):(typeof d=="undefined"||d===!0||d=="true")&&b.play("Default Timeline")}};i.logDebug=function(){};i.logInfo=function(){};i.logWarn=function(){};i.logError=function(){};i.logFatal=function(){};h.extend(i.TimelineObject.prototype,
{compute:function(a,c,b,d){if(!this.dDuration){var e=this.duration,f=null;this.animation&&this.animation.getDuration&&(f=this.animation.getDuration());this.dScale=e!=-1&&e!==0?f/e:1;this.dDuration=e!=-1?e:f}e=this.dDuration;e=e===0?1:e;b>=e&&(b=e);b<=0&&(b=0);if(this.animation)return e=h.easing[this.easing](b/e,b,0,1,e),this.animation.compute(a,c,b*this.dScale,e,d)}});h.extend(i.Timeline.prototype,{compute:function(a,c,b,d){for(var e=this.objects,f=e.length,i=[],l={obj:null,end:0},j={obj:null,start:this.getDuration()},
k=0;k<f;k++){var m=e[k];if(!m.animation.isTrigger&&c==m.animation.property&&a==m.animation.elements)if(b>=m.position&&b<=m.position+m.duration){if(m=m.compute(a,c,b-m.position,d))h.isArray(m)||(m=[m]),i=m}else if(b<m.position){if(m.position<=j.start)j.start=m.position,j.obj=m}else if(b>m.position+m.duration&&m.position+m.duration>=l.end)l.end=m.position,l.obj=m}if(!i||h.isArray(i)&&i.length===0)if(l.obj&&l.obj.animation.toValue)i=l.obj.animation.toValue;else if(j.obj&&j.obj.animation.fromValue)i=
j.obj.animation.fromValue;h.isArray(i)||(i=[i]);return i}});h.extend(r.prototype,{compute:function(a,c,b,d){b=this.property;if(a!=this.elements||c!=b)return null;for(var a=this.fromValues,c=this.toValues,b=this.filter,e=a.length,f=[],i=0;i<e;i++){var h=a[i],j=c[i];h+=(j.value-h)*d;b&&b[i]&&(h=b[i](h));f.push(h+j.unit)}return f}});h.extend(i.TransformTween.prototype,{compute:r.prototype.compute})})(jQuery,jQuery.Edge);(function(h,i){if(typeof i.DeclareMarkup=="undefined"){var o=function(){function h(e,c,f,a,g){var b=document.createElement(e);b.id=c;b.style.position="absolute";$eleNew=$(b);$eleNew.addClass(c+"_id");if(f.className)b.className=f.className;$(b).css("left",f.rect[0]+"px");$(b).css("top",f.rect[1]+"px");f.rect[2]>0&&$(b).css("width",f.rect[2]+"px");f.rect[3]>0&&$(b).css("height",f.rect[3]+"px");f.overflow&&($(b).css("overflow",f.overflow),(f.overflow=="hidden"||f.overflow=="scroll")&&$(b).css("text-overflow",
"clip"));f.br&&(f.br.length==1?$(b).css("border-radius",f.br[0]+"px"):($(b).css("border-top-left-radius",f.br[0]),$(b).css("border-top-right-radius",f.br[1]),$(b).css("border-bottom-right-radius",f.br[2]),$(b).css("border-bottom-left-radius",f.br[3])));if(f.tf){for(var c=[],d=[[3,0],[3,0],[2,0],[3,1],[2,"50%"]],l=0;l<d.length;l++){c[l]=[];f.tf[l]||(f.tf[l]=[]);for(var n=0;n<d[l][0];n++)f.tf[l][n]||(f.tf[l][n]=d[l][1]),c[l][n]=f.tf[l][n]}d=typeof c[4][0]=="string"?c[4][0]+" "+c[4][1]:c[4][0]+"px "+
c[4][1]+"px";$(b).css("-webkit-transform-origin",d);$(b).css("-moz-transform-origin",d);$(b).css("-ms-transform-origin",d);$(b).css("-o-transform-origin",d);"webkitAppearance"in document.documentElement.style?$(b).css("-webkit-transform","translate3d("+c[0][0]+"px,"+c[0][1]+"px,"+c[0][2]+"px) rotateZ("+c[1][0]+"deg) rotateX("+c[1][1]+"deg) rotateY("+c[1][2]+"deg) skew("+c[2][0]+"deg,"+c[2][1]+"deg) scale3d("+c[3][0]+","+c[3][1]+","+c[3][2]+")"):(d="translate("+c[0][0]+"px,"+c[0][1]+"px) rotate("+
c[1][0]+"deg)  skewX("+c[2][0]+"deg) skewY("+c[2][1]+"deg) scale("+c[3][0]+","+f.tf[3][1]+")",$(b).css("-moz-transform",d),$(b).css("-ms-transform",d),$(b).css("-o-transform",d))}else b.style.webkitTransform="translateZ(0)";f.opacity&&$(b).css("opacity",f.opacity);f.stroke&&((c=f.stroke[0])||(c=0),(d=f.stroke[1])?typeof d=="string"&&(d=[d]):d=["rgba(0,0,0,0)"],(l=f.stroke[2])||(l="none"),$(b).css("border",""+c+"px "+l+" "+d[0]));if(f.fill&&(c=f.fill[0],typeof c=="string"&&(c=[c]),(d=f.fill[1])||(d=
"solid"),d=="solid"&&c&&$(b).css("background-color",c[0]),f.fill[1])){c=f.fill[1];typeof c=="string"?c=[c]:typeof c=="object"&&((d=c[window.EdgeScreenProfile.name])||(d=c["default"]),c=d);if(c[0]){$(b).css("background-image","url("+c[0]+")");if(c[1]||c[2])c[1]||(c[1]="0px"),c[2]||(c[2]="0px"),$(b).css("background-position",c[1]+" "+c[2]);i.requestImage(c[0])}c[3]||$(b).css("background-repeat","no-repeat");c[4]&&c[4]!="scroll"&&$(b).css("background-attachment",c[4])}f.source&&(b.setAttribute("src",
f.source),e=="video"&&b.setAttribute("controls","controls"),e=="audio"&&b.setAttribute("autoplay","autoplay"));if(a){if(!a.appendChild)return b;a.firstChild&&g>=0&&a.children&&g<a.children.length?a.insertBefore(b,a.children[g]):a.appendChild(b)}return b}function l(e,c,f,a,g){var j;x(c,a);var b=null;f&&f.nodeName&&f.nodeName.toLowerCase()=="canvas"&&(j=b=o.stageLookup[f.id],f=j);var d=null,b="div";if(c.tag)b=c.tag;switch(c.t){case "def":break;case "rect":case "elipse":case "group":d=h(b,e,c,f,g);break;
case "image":d=h(b,e,c,f,g);if(b=="img")c=$(d).css("background-image"),c.indexOf("url(")==0&&(c=c.substring(4,c.length-1)),d.src=c,$(d).css("background-image","");break;case "video":d=h("video",e,c,f,g);break;case "audio":d=h("audio",e,c,f,g);break;case "text":d=h(b,e,c,f,g);c.font&&(c.font[0]&&c.font[0]!==""&&$(d).css("font-family",c.font[0]),typeof c.font[1]!="object"&&(c.font[1]=[c.font[1]]),c.font[1][1]||(c.font[1][1]="px"),c.font[1][0]&&c.font[1][0]!==""&&$(d).css("font-size",c.font[1][0]+c.font[1][1]),
c.font[2]&&c.font[2]!==""&&$(d).css("color",c.font[2]),c.font[3]&&c.font[3]!==""&&$(d).css("font-weight",c.font[3]),c.font[4]&&c.font[4]!==""&&$(d).css("text-decoration",c.font[4]),c.font[5]&&c.font[5]!==""&&$(d).css("font-style",c.font[5]));c.align&&$(d).css("text-align",c.align);if(c.position)d.style.position=c.position;d.appendChild(document.createTextNode(c.text));break;case "canvas":d=h("canvas",e,c,f,g);b={def:c,params:a,stage:new y(d),children:{}};b.obj=b.stage;b.obj.width=c.rect[2];b.obj.height=
c.rect[3];o.stageLookup[e]=b;break;case "line":break;case "shape":if(!f)break;d={def:c,params:a,obj:new A,stage:f.stage,children:{}};d.obj.x=c.rect[0];d.obj.y=c.rect[1];d.obj.width=c.rect[2];d.obj.height=c.rect[3];f.children[c.id]=d;f.obj.addChild(d.obj);break;default:alert("unhandled type == "+c.t)}return d}function r(e,c,f,a,g,b){b||(b=0);if(f=l(e,c,a,g,b)){o.DOMNodeStarted(f,a,c,o.nodeSymbolInstanceLookup[e]);if(c.c)for(e=0;e<c.c.length;e++)a=c.c[e],r(a.id,a,c,f,g);o.DOMNodeCompleted(f)}return f}
function s(e,c){var f=e,a;if(e.base){if(typeof e.base=="string")e.base=[e.base];if(e.base.length>0){f={};for(a=0;a<e.base.length;a++){var g=o.nodeLookup[e.base[a]];g&&$.extend(!0,f,g)}$.extend(!0,f,e)}}f.base=null;for(a=0;f.c&&a<f.c.length;a++)f.c[a]=s(f.c[a],c);return f}function n(e,c){if(e)if(x(e,c),!e.id||e.id==="")alert("elements without ids are not yet supported");else{o.nodeLookup[e.id]=e;for(var f=0;e.children&&f<e.children.length;f++)n(e.children[f])}}function p(e,c){if(!e)return c;if(typeof c==
"string"){var f=c.search(/\$\{/);if(f>=0){var a=c.search(/\}/);if(a>f)return f=c.slice(f+2,a),e[f]}}return c}function z(e,c){var f=e.obj.graphics,a=e.params;f.clear();var g="rgba(0,0,0,0)";e.def.fill&&typeof e.def.fill=="object"&&(g=e.def.fill[0]);f.beginFill(g).drawRect(0,0,p(a,e.def.rect[2]),p(a,e.def.rect[3]));for(var b in e.children)e.children.hasOwnProperty(b)&&z(c.children[b])}var x,y,A;x=function(e,c){if(e.type)e.t=e.type;if(e.t)e.t=e.t.toLowerCase();e.type=e.t;e.children?e.c=e.children:e.children=
e.c;e.rect?e.r=e.rect:e.rect=e.r;if(!e.rect)e.rect=[];for(;e.rect.length<4;)e.rect[e.rect.length]=0;e.borderRadius?e.br=e.borderRadius:e.borderRadius=e.br;e.shape?e.sh=e.shape:e.shape=e.sh;e.transform?e.tf=e.transform:e.transform=e.tf;if(e.tf){for(;e.tf.length<5;)e.tf[e.tf.length]=0;for(;e.transform.length<8;)e.tf[e.tf.length]=1}e.opacity?e.o=e.opacity:e.opacity=e.o;if(e.stroke)e.s=e.stroke;e.stroke=e.s;if(e.fill)e.f=e.fill;if(e.f&&c){var f=c[e.f];if(f)e.f=f}e.fill=e.f};return{stageLookup:{},nodeLookup:{},
nodeSymbolInstanceLookup:{},DOMNodeSeek:function(){},DOMNodeReset:function(){},DOMNodeStarted:function(){},DOMNodeCompleted:function(){},renderDOM:function(e,c,f,a,g){window.EdgeScreenProfile={name:"detected",dim:[screen.width,screen.height]};o.nodeLookup={};var b;for(b=0;b<e.length;b++)n(e[b],f);for(b=0;b<e.length;b++)e[b]&&(e[b]=s(e[b],f));o.nodeSymbolInstanceLookup={};if(g)for(b=0;b<g.length;b++)o.nodeSymbolInstanceLookup[g[b].id]=g[b].symbolName;o.DOMNodeSeek(c,a);for(b=0;b<e.length;b++)e[b]&&
(a=e[b],(a=r(a.id,a,null,null,f))&&c.appendChild(a));o.DOMNodeReset()},buildSceneGraphNode:r,drawSceneGraph:function(){for(var e in o.stageLookup)if(o.stageLookup.hasOwnProperty(e)){var c=o.stageLookup[e],f;for(f in c.children)c.children.hasOwnProperty(f)&&z(c.children[f],c);c.stage.update()}},createElement:l}}();i.DeclareMarkup=o}})(jQuery,jQuery.Edge);


/*
	Cufon
*/

/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version 1.09i
 */
var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());


 /*
 * TipTip
 * Copyright 2010 Drew Wilson
 * www.drewwilson.com
 * code.drewwilson.com/entry/tiptip-jquery-plugin
 *
 * Version 1.3   -   Updated: Mar. 23, 2010
 *
 * This Plug-In will create a custom tooltip to replace the default
 * browser tooltip. It is extremely lightweight and very smart in
 * that it detects the edges of the browser window and will make sure
 * the tooltip stays within the current window size. As a result the
 * tooltip will adjust itself to be displayed above, below, to the left 
 * or to the right depending on what is necessary to stay within the
 * browser window. It is completely customizable as well via CSS.
 *
 * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($){
	$.fn.tipTip = function(options) {
		var defaults = { 
			activation: "hover",
			keepAlive: false,
			maxWidth: "200px",
			edgeOffset: 3,
			defaultPosition: "bottom",
			delay: 400,
			fadeIn: 200,
			fadeOut: 200,
			attribute: "title",
			content: false, // HTML or String to fill TipTIp with
		  	enter: function(){},
		  	exit: function(){}
	  	};
	 	var opts = $.extend(defaults, options);
	 	
	 	// Setup tip tip elements and render them to the DOM
	 	if($("#tiptip_holder").length <= 0){
	 		var tiptip_holder = $('<div id="tiptip_holder" style="max-width:'+ opts.maxWidth +';"></div>');
			var tiptip_content = $('<div id="tiptip_content"></div>');
			var tiptip_arrow = $('<div id="tiptip_arrow"></div>');
			$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));
		} else {
			var tiptip_holder = $("#tiptip_holder");
			var tiptip_content = $("#tiptip_content");
			var tiptip_arrow = $("#tiptip_arrow");
		}
		
		return this.each(function(){
			var org_elem = $(this);
			if(opts.content){
				var org_title = opts.content;
			} else {
				var org_title = org_elem.attr(opts.attribute);
			}
			if(org_title != ""){
				if(!opts.content){
					org_elem.removeAttr(opts.attribute); //remove original Attribute
				}
				var timeout = false;
				
				if(opts.activation == "hover"){
					org_elem.hover(function(){
						active_tiptip();
					}, function(){
						if(!opts.keepAlive){
							deactive_tiptip();
						}
					});
					if(opts.keepAlive){
						tiptip_holder.hover(function(){}, function(){
							deactive_tiptip();
						});
					}
				} else if(opts.activation == "focus"){
					org_elem.focus(function(){
						active_tiptip();
					}).blur(function(){
						deactive_tiptip();
					});
				} else if(opts.activation == "click"){
					org_elem.click(function(){
						active_tiptip();
						return false;
					}).hover(function(){},function(){
						if(!opts.keepAlive){
							deactive_tiptip();
						}
					});
					if(opts.keepAlive){
						tiptip_holder.hover(function(){}, function(){
							deactive_tiptip();
						});
					}
				}
			
				function active_tiptip(){
					opts.enter.call(this);
					tiptip_content.html(org_title);
					tiptip_holder.hide().removeAttr("class").css("margin","0");
					tiptip_arrow.removeAttr("style");
					
					var top = parseInt(org_elem.offset()['top']);
					var left = parseInt(org_elem.offset()['left']);
					var org_width = parseInt(org_elem.outerWidth());
					var org_height = parseInt(org_elem.outerHeight());
					var tip_w = tiptip_holder.outerWidth();
					var tip_h = tiptip_holder.outerHeight();
					var w_compare = Math.round((org_width - tip_w) / 2);
					var h_compare = Math.round((org_height - tip_h) / 2);
					var marg_left = Math.round(left + w_compare);
					var marg_top = Math.round(top + org_height + opts.edgeOffset);
					var t_class = "";
					var arrow_top = "";
					var arrow_left = Math.round(tip_w - 12) / 2;

                    if(opts.defaultPosition == "bottom"){
                    	t_class = "_bottom";
                   	} else if(opts.defaultPosition == "top"){ 
                   		t_class = "_top";
                   	} else if(opts.defaultPosition == "left"){
                   		t_class = "_left";
                   	} else if(opts.defaultPosition == "right"){
                   		t_class = "_right";
                   	}
					
					var right_compare = (w_compare + left) < parseInt($(window).scrollLeft());
					var left_compare = (tip_w + left) > parseInt($(window).width());
					
					if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){
						t_class = "_right";
						arrow_top = Math.round(tip_h - 13) / 2;
						arrow_left = -12;
						marg_left = Math.round(left + org_width + opts.edgeOffset);
						marg_top = Math.round(top + h_compare);
					} else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){
						t_class = "_left";
						arrow_top = Math.round(tip_h - 13) / 2;
						arrow_left =  Math.round(tip_w);
						marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5));
						marg_top = Math.round(top + h_compare);
					}

					var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop());
					var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0;
					
					if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){
						if(t_class == "_top" || t_class == "_bottom"){
							t_class = "_top";
						} else {
							t_class = t_class+"_top";
						}
						arrow_top = tip_h;
						marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset));
					} else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){
						if(t_class == "_top" || t_class == "_bottom"){
							t_class = "_bottom";
						} else {
							t_class = t_class+"_bottom";
						}
						arrow_top = -12;						
						marg_top = Math.round(top + org_height + opts.edgeOffset);
					}
				
					if(t_class == "_right_top" || t_class == "_left_top"){
						marg_top = marg_top + 5;
					} else if(t_class == "_right_bottom" || t_class == "_left_bottom"){		
						marg_top = marg_top - 5;
					}
					if(t_class == "_left_top" || t_class == "_left_bottom"){	
						marg_left = marg_left + 5;
					}
					tiptip_arrow.css({"margin-left": arrow_left+"px", "margin-top": arrow_top+"px"});
					tiptip_holder.css({"margin-left": marg_left+"px", "margin-top": marg_top+"px"}).attr("class","tip"+t_class);
					
					if (timeout){ clearTimeout(timeout); }
					timeout = setTimeout(function(){ tiptip_holder.stop(true,true).fadeIn(opts.fadeIn); }, opts.delay);	
				}
				
				function deactive_tiptip(){
					opts.exit.call(this);
					if (timeout){ clearTimeout(timeout); }
					tiptip_holder.fadeOut(opts.fadeOut);
				}
			}				
		});
	}
})(jQuery);  	



/*
	Tumblr
*/

/*
* jQuery Tumblr RSS Plugin 1.0
* 
* Copyright 2011 Jason Graves (GodLikeMouse)
* 
* Licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the License.
* http://www.apache.org/licenses/LICENSE-2.0
* 
* Source: http://www.godlikemouse.com/code/jquery-ui-tumblr-rss/
* Version: 1.0
* 
* Simple API for retrieving a user's tweets
* 
* Examples
*   1) Populate an element with 5 of a user's tumblr posts.
*
*      -- Example HTML --
*      <div id="myUserPosts"/>
*
*      $(function(){
*          $("#myUserPosts").tumblrRss({username: "godliikemouse", limit: 5});
*      });
*      
*   2) Populate all elements of a specific class with the tumblr posts
*      by tag parameters.
*
*      -- Example HTML --
*      <div class="myUserPosts" tumblr-username="godliikemouse" tumblr-limit="5" />
*
*      $(function(){
*          $(".myUserPosts").tumblrRss();
*      });
*/

$.fn.tumblrRss = function(options){

    if(options){
        //options configured
        options.username = options.username ? options.username : null;
        if(!options.username) throw "jquery.ui.tumblr.rss.js: username required.";
    
        options.language = options.language ? options.language : "en-us";
        options.template = options.template ? options.template : $.fn.tumblrRss.defaultTemplate;
        options.context = options.context ? options.context : this;
        options.offset = options.offset ? options.offset : 0;
        options.limit = options.limit ? options.limit : 25;
        options.url = options.url ? options.url : "http://" + options.username + ".tumblr.com/api/read/json";
        options.callback = options.callback ? options.callback : null;
    }
    else{
        options = {};
        //tumblr-param configured
        options.username = $(this).attr("tumblr-username") ? $(this).attr("tumblr-username") : null;
        if(!options.username) throw "jquery.ui.tumblr.rss.js: username required.";
        
        options.language = $(this).attr("tumblr-language") ? $(this).attr("tumblr-language") : "en-us";
        options.template = $(this).attr("tumblr-template") ? $(this).attr("tumblr-template") : $.fn.tumblrRss.defaultTemplate;
        options.context = this;
        options.offset = $(this).attr("tumblr-offset") ? $(this).attr("tumblr-offset") : 0;
        options.limit = $(this).attr("tumblr-limit") ? $(this).attr("tumblr-limit") : 25;
        options.url = $(this).attr("tumblr-url") ? $(this).attr("tumblr-url") : "http://" + options.username + ".tumblr.com/api/read/json";
        options.callback = null;
    }//end if
    
    function applyTemplate(t, e, p){
        for(var i in e){
            var v = e[i];
            
            if(typeof(v) == "string" || typeof(v) == "number"){
                var lookup = "{" + p + "." + i + "}";
                while(t.indexOf(lookup) >= 0)
                    t = t.replace(lookup, v);
            }//end if
            
            if(typeof(v) == "object"){
                t = applyTemplate(t, v, p + "." + i);
            }//end if
        }//end for
        
        return t;
    }//end applyTemplate()
    
    $.ajax({
        url: options.url,
        dataType: "jsonp",
        data: {
            num: options.limit,
            start: options.offset
        },
        success: function(data){
            if(options.callback) return options.callback(data);
            var output = '';
            
            var len = data.posts.length;
            for(var i=0; i<len; i++){
                var entry = data.posts[i];

                entry.username = options.username;
                var t = options.template;
                
                t = applyTemplate(t, entry, 'entry');
                    
                output += t;
            }//end for
            
            output = output.replace(/{[A-Za-z0-9.\-]+}/gim, '');
            
            options.context.html(output);
        }//end success()
    });

}//end tumblrRss

$.fn.tumblrRss.defaultTemplate = '<div class="jquery-ui-tumblr-rss-entry"><cite><a href="http://{entry.username}.tumblr.com" class="profileLink">{entry.username}</a></cite> <time>{entry.date-gmt}</time> <img src="{entry.photo-url-75}" onerror="$(this).hide();" class="photo" /> <span class="video">{entry.video-player}</span> <span class="audioCaption">{entry.audio-caption}</span> <span class="audioPlayer">{entry.audio-player}</span> <span class="regularTitle">{entry.regular-title}</span> <span class="regularBody">{entry.regular-body}</span> <a href="{entry.link-url}" class="link">{entry.link-text}</a><span class="linkDescription">{entry.link-description}</span> <span class="conversationTitle">{entry.conversation-title}</span> <span class="conversationText">{entry.conversation-text}</span> <quote>{entry.quote-text}</quote> <a href="{entry.url-with-slug}" class="postLink">View Full Post</a></div>';



/*
	jquery.twitter.js v1.5
	Last updated: 08 July 2009

	Created by Damien du Toit
	http://coda.co.za/blog/2008/10/26/jquery-plugin-for-twitter

	Licensed under a Creative Commons Attribution-Non-Commercial 3.0 Unported License
	http://creativecommons.org/licenses/by-nc/3.0/
*/

(function($) {


	$.fn.getTwitter = function(options) {

		$.fn.getTwitter.defaults = {
			userName: null,
			numTweets: 5,
			loaderText: "Loading tweets...",
			slideIn: true,
			slideDuration: 750,
			showHeading: true,
			headingText: "Latest Tweets",
			showProfileLink: true,
			showTimestamp: true
		};

		var o = $.extend({}, $.fn.getTwitter.defaults, options);

		return this.each(function() {
			var c = $(this);

			// hide container element, remove alternative content, and add class
			c.hide().empty().addClass("twitted");

			// add heading to container element
			if (o.showHeading) {
				c.append("<h2>"+o.headingText+"</h2>");
			}

			// add twitter list to container element
			var twitterListHTML = "<ul id=\"twitter_update_list\"><li></li></ul>";
			c.append(twitterListHTML);

			var tl = $("#twitter_update_list");

			// hide twitter list
			tl.hide();

			// add preLoader to container element
			var preLoaderHTML = $("<p class=\"preLoader\">"+o.loaderText+"</p>");
			c.append(preLoaderHTML);

			// add Twitter profile link to container element
			if (o.showProfileLink) {
				var profileLinkHTML = "<p class=\"profileLink\"><a href=\"http://twitter.com/"+o.userName+"\">http://twitter.com/"+o.userName+"</a></p>";
				c.append(profileLinkHTML);
			}

			// show container element
			c.show();

			$.getScript("http://twitter.com/javascripts/blogger.js");
			$.getScript("http://twitter.com/statuses/user_timeline/"+o.userName+".json?callback=twitterCallback2&count="+o.numTweets, function() {
				// remove preLoader from container element
				$(preLoaderHTML).remove();

				// remove timestamp and move to title of list item
				if (!o.showTimestamp) {
					tl.find("li").each(function() {
						var timestampHTML = $(this).children("a");
						var timestamp = timestampHTML.html();
						timestampHTML.remove();
						$(this).attr("title", timestamp);
					});
				}

				// show twitter list
				if (o.slideIn) {
					// a fix for the jQuery slide effect
					// Hat-tip: http://blog.pengoworks.com/index.cfm/2009/4/21/Fixing-jQuerys-slideDown-effect-ie-Jumpy-Animation
					var tlHeight = tl.data("originalHeight");

					// get the original height
					if (!tlHeight) {
						tlHeight = tl.show().height();
						tl.data("originalHeight", tlHeight);
						tl.hide().css({height: 0});
					}

					tl.show().animate({height: tlHeight}, o.slideDuration);
				}
				else {
					tl.show();
				}

				// add unique class to first list item
				tl.find("li:first").addClass("firstTweet");

				// add unique class to last list item
				tl.find("li:last").addClass("lastTweet");
			});
		});
	};
})(jQuery);
