/*! * VERSION: beta 1.641 * DATE: 2012-11-08 * JavaScript (ActionScript 3 and 2 also available) * UPDATES AND DOCS AT: http://www.greensock.com * * Copyright (c) 2008-2013, GreenSock. All rights reserved. * This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ (window._gsQueue||(window._gsQueue=[])).push(function(){_gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(h,p,f){var g=function(d){h.call(this,d);this._repeat=this.vars.repeat||0;this._repeatDelay=this.vars.repeatDelay||0;this._cycle=0;this._yoyo=!0==this.vars.yoyo;this._dirty=!0},q=[],s=new f(null,null,1,0),f=g.prototype=new h;f.constructor=g;f.kill()._gc=!1;g.version=1.641;f.invalidate=function(){this._yoyo=!0===this.vars.yoyo;this._repeat=this.vars.repeat||0;this._repeatDelay= this.vars.repeatDelay||0;this._uncache(!0);return h.prototype.invalidate.call(this)};f.addCallback=function(d,c,a,e){return this.insert(p.delayedCall(0,d,a,e),c)};f.removeCallback=function(d,c){if(null==c)this._kill(null,d);else for(var a=this.getTweensOf(d,!1),e=a.length,b=this._parseTimeOrLabel(c);-1<--e;)a[e]._startTime===b&&a[e]._enabled(!1,!1);return this};f.tweenTo=function(d,c){var c=c||{},a={ease:s,overwrite:2,useFrames:this.usesFrames(),immediateRender:!1},e,b;for(e in c)a[e]=c[e];a.time= this._parseTimeOrLabel(d);b=new p(this,Math.abs(Number(a.time)-this._time)/this._timeScale||0.001,a);a.onStart=function(){b.target.paused(!0);b.vars.time!==b.target.time()&&b.duration(Math.abs(b.vars.time-b.target.time())/b.target._timeScale);c.onStart&&c.onStart.apply(c.onStartScope||b,c.onStartParams||q)};return b};f.tweenFromTo=function(d,c,a){a=a||{};a.startAt={time:this._parseTimeOrLabel(d)};d=this.tweenTo(c,a);return d.duration(Math.abs(d.vars.time-d.vars.startAt.time)/this._timeScale||0.001)}; f.render=function(d,c,a){this._gc&&this._enabled(!0,!1);this._active=!this._paused;var e=!this._dirty?this._totalDuration:this.totalDuration(),b=this._time,j=this._totalTime,i=this._startTime,f=this._timeScale,n=this._rawPrevTime,m=this._paused,k=this._cycle,g,l;if(d>=e){this._locked||(this._totalTime=e,this._cycle=this._repeat);if(!this._reversed&&!this._hasPausedChild()&&(g=!0,l="onComplete",0===this._duration&&(0===d||0>this._rawPrevTime)))this._rawPrevTime!==d&&(a=!0);this._rawPrevTime=d;this._yoyo&& 0!==(this._cycle&1)?(this._time=0,d=-1E-6):(this._time=this._duration,d=this._duration+1E-6)}else if(0>=d){this._locked||(this._totalTime=this._cycle=0);this._time=0;if(0!==b||0===this._duration&&0d?(this._active=!1,0===this._duration&&0<=this._rawPrevTime&&(a=!0)):this._initted||(a=!0);this._rawPrevTime=d;d=0===this._duration?0:-1E-6}else if(this._time=this._rawPrevTime=d,!this._locked&&(this._totalTime=d,0!==this._repeat)){var r= this._duration+this._repeatDelay;this._cycle=this._totalTime/r>>0;0!==this._cycle&&this._cycle===this._totalTime/r&&this._cycle--;this._time=this._totalTime-this._cycle*r;this._yoyo&&0!==(this._cycle&1)&&(this._time=this._duration-this._time);this._time>this._duration?(this._time=this._duration,d=this._duration+1E-6):0>this._time?this._time=d=0:d=this._time}if(this._cycle!==k&&!this._locked){var r=this._yoyo&&0!==(k&1),h=r===(this._yoyo&&0!==(this._cycle&1)),p=this._totalTime,s=this._cycle,u=this._rawPrevTime, v=this._time;this._totalTime=k*this._duration;this._cycleb)for(a=this._first;a;){j=a._next;if(this._paused&&!m)break;else if(a._active||a._startTime<=this._time&&!a._paused&&!a._gc)a._reversed?a.render((!a._dirty?a._totalDuration:a.totalDuration())- (d-a._startTime)*a._timeScale,c,!1):a.render((d-a._startTime)*a._timeScale,c,!1);a=j}else for(a=this._last;a;){j=a._prev;if(this._paused&&!m)break;else if(a._active||a._startTime<=b&&!a._paused&&!a._gc)a._reversed?a.render((!a._dirty?a._totalDuration:a.totalDuration())-(d-a._startTime)*a._timeScale,c,!1):a.render((d-a._startTime)*a._timeScale,c,!1);a=j}this._onUpdate&&(c||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||q));if(l&&!this._locked&&!this._gc&&(i===this._startTime|| f!==this._timeScale))if(0===this._time||e>=this.totalDuration())g&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),c||this.vars[l]&&this.vars[l].apply(this.vars[l+"Scope"]||this,this.vars[l+"Params"]||q)}};f.getActive=function(d,c,a){null==d&&(d=!0);null==c&&(c=!0);null==a&&(a=!1);var e=[],d=this.getChildren(d,c,a),c=0,a=d.length,b,j;for(b=0;b=j._startTime&&j._timeline._timed)return c[e].name;return null};f.getLabelBefore=function(d){null==d&&(d=this._time);for(var c=this.getLabelsArray(),a=c.length;-1<--a;)if(c[a].timethis._duration&&(d=this._duration);this._yoyo&&0!==(this._cycle&1)?d=this._duration-d+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(d+=this._cycle*(this._duration+this._repeatDelay)); return this.totalTime(d,c)};f.repeat=function(d){if(!arguments.length)return this._repeat;this._repeat=d;return this._uncache(!0)};f.repeatDelay=function(d){if(!arguments.length)return this._repeatDelay;this._repeatDelay=d;return this._uncache(!0)};f.yoyo=function(d){if(!arguments.length)return this._yoyo;this._yoyo=d;return this};f.currentLabel=function(d){return!arguments.length?this.getLabelBefore(this._time+1E-8):this.seek(d,!0)};return g},!0);_gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline", "TweenLite"],function(h,p,f){var g=function(a){p.call(this,a);this._labels={};this.autoRemoveChildren=!0==this.vars.autoRemoveChildren;this.smoothChildTiming=!0==this.vars.smoothChildTiming;this._sortChildren=!0;this._onUpdate=this.vars.onUpdate;for(var a=q.length,e,b;-1<--a;)if(b=this.vars[q[a]])for(e=b.length;-1<--e;)"{self}"===b[e]&&(b=this.vars[q[a]]=b.concat(),b[e]=this);this.vars.tweens instanceof Array&&this.insertMultiple(this.vars.tweens,0,this.vars.align||"normal",this.vars.stagger||0)}, q=["onStartParams","onUpdateParams","onCompleteParams","onReverseCompleteParams","onRepeatParams"],s=[],d=function(a){var e={},b;for(b in a)e[b]=a[b];return e},c=g.prototype=new p;g.version=1.641;c.constructor=g;c.kill()._gc=!1;c.to=function(a,e,b,c,d){return this.insert(new f(a,e,b),this._parseTimeOrLabel(d,c,!0))};c.from=function(a,e,b,c,d){return this.insert(f.from(a,e,b),this._parseTimeOrLabel(d,c,!0))};c.fromTo=function(a,e,b,c,d,t){return this.insert(f.fromTo(a,e,b,c),this._parseTimeOrLabel(t, d,!0))};c.staggerTo=function(a,e,b,c,i,t,n,m,k){n=new g({onComplete:n,onCompleteParams:m,onCompleteScope:k});c=c||0;for(m=0;m=d){this._totalTime=this._time= d;if(!this._reversed&&!this._hasPausedChild()&&(k=!0,l="onComplete",0===this._duration&&(0===a||0>this._rawPrevTime)))this._rawPrevTime!==a&&(b=!0);this._rawPrevTime=a;a=d+1E-6}else if(0>=a){this._totalTime=this._time=0;if(0!==c||0===this._duration&&0a?(this._active=!1,0===this._duration&&0<=this._rawPrevTime&&(b=!0)):this._initted||(b=!0);this._rawPrevTime=a;a=-1E-6}else this._totalTime=this._time=this._rawPrevTime=a;if(this._time!==c|| b){this._initted||(this._initted=!0);0===c&&this.vars.onStart&&0!==this._time&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||s));if(this._time>c)for(b=this._first;b;){h=b._next;if(this._paused&&!m)break;else if(b._active||b._startTime<=this._time&&!b._paused&&!b._gc)b._reversed?b.render((!b._dirty?b._totalDuration:b.totalDuration())-(a-b._startTime)*b._timeScale,e,!1):b.render((a-b._startTime)*b._timeScale,e,!1);b=h}else for(b=this._last;b;){h=b._prev;if(this._paused&& !m)break;else if(b._active||b._startTime<=c&&!b._paused&&!b._gc)b._reversed?b.render((!b._dirty?b._totalDuration:b.totalDuration())-(a-b._startTime)*b._timeScale,e,!1):b.render((a-b._startTime)*b._timeScale,e,!1);b=h}this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||s));if(l&&!this._gc&&(f===this._startTime||g!=this._timeScale))if(0===this._time||d>=this.totalDuration())k&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),e||this.vars[l]&& this.vars[l].apply(this.vars[l+"Scope"]||this,this.vars[l+"Params"]||s)}};c._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof g&&a._hasPausedChild())return!0;a=a._next}return!1};c.getChildren=function(a,d,b,c){for(var c=c||-9999999999,i=[],g=this._first,h=0;g;)g._startTime=b&&(c._startTime+=a),c=c._next;if(d)for(var f in this._labels)this._labels[f]>=b&&(this._labels[f]+=a);return this._uncache(!0)};c._kill=function(a,c){if(null==a&&null==c)return this._enabled(!1,!1);for(var b=null==c?this.getChildren(!0,!0,!1):this.getTweensOf(c), d=b.length,f=!1;-1<--d;)b[d]._kill(a,c)&&(f=!0);return f};c.clear=function(a){var c=this.getChildren(!1,!0,!0),b=c.length;for(this._time=this._totalTime=0;-1<--b;)c[b]._enabled(!1,!1);!1!=a&&(this._labels={});return this._uncache(!0)};c.invalidate=function(){for(var a=this._first;a;)a.invalidate(),a=a._next;return this};c._enabled=function(a,c){if(a===this._gc)for(var b=this._first;b;)b._enabled(a,!0),b=b._next;return p.prototype._enabled.call(this,a,c)};c.progress=function(a){return!arguments.length? this._time/this.duration():this.totalTime(this.duration()*a,!1)};c.duration=function(a){if(!arguments.length)return this._dirty&&this.totalDuration(),this._duration;0!==this.duration()&&0!==a&&this.timeScale(this._duration/a);return this};c.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var c=0,b=this._first,d=-999999999999,f;b;)f=b._next,b._startTimeb._startTime&&(c-=b._startTime,this.shiftChildren(-b._startTime, !1,-9999999999)),b=b._startTime+(!b._dirty?b._totalDuration:b.totalDuration())/b._timeScale,b>c&&(c=b),b=f;this._duration=this._totalDuration=c;this._dirty=!1}return this._totalDuration}0!==this.totalDuration()&&0!==a&&this.timeScale(this._totalDuration/a);return this};c.usesFrames=function(){for(var a=this._timeline;a._timeline;)a=a._timeline;return a===h._rootFramesTimeline};c.rawTime=function(){return this._paused||0!==this._totalTime&&this._totalTime!==this._totalDuration?this._totalTime:(this._timeline.rawTime()- this._startTime)*this._timeScale};return g},!0)});window._gsDefine&&_gsQueue.pop()();