]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 16 Aug 2013 15:49:09 +0000 (15:49 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 16 Aug 2013 15:49:09 +0000 (15:49 +0000)
js/libs/fluidbook/fluidbook.background.js
js/libs/fluidbook/fluidbook.help.js
js/libs/fluidbook/fluidbook.video.js
js/libs/gsap/TimelineLite.js
js/libs/gsap/TimelineMax.js
js/libs/gsap/TweenLite.js
js/libs/gsap/TweenMax.js
js/libs/gsap/plugins/CSSPlugin.js
js/libs/jquery/jquery.migrate.js [deleted file]

index c640c006221027dd564dc315ec7640777091e909..9a313e4a6cdef530b95e85ed496d94c56ab25bef 100644 (file)
@@ -8,9 +8,6 @@ FluidbookBackground.prototype = {
        init: function() {\r
                $("#main").append('<div id="background"></div>');\r
                \r
-               fb([Fluidbook.REPEAT,Fluidbook.STRETCH]);\r
-               \r
-               \r
                if (this.fluidbook.datas.links.background != undefined\r
                                && this.fluidbook.datas.repeat != Fluidbook.REPEAT\r
                                && this.fluidbook.datas.repeat != Fluidbook.STRETCH\r
index f7f852bfd9da8532de0b0d62878abb7ed224b9bc..59cd72a446fe75fdda74d8004aab26e86809d8af 100644 (file)
@@ -167,7 +167,6 @@ FluidbookHelp.prototype = {
                }\r
        },\r
        resize: function(ww, hh, interfaceScale, navScale) {\r
-               this.hide();\r
                var menuHeightScaled = (this.fluidbook.datas.menuHeight) * navScale\r
                this.view.css({\r
                        width: ww,\r
@@ -230,12 +229,10 @@ FluidbookHelp.prototype = {
                clearTimeout(this.autoTimeout);\r
        },\r
        displayAtStartup: function() {\r
-               var $this = this;\r
                if (this.fluidbook.datas.helpStartup) {\r
-\r
-                       $this.show(parseInt($this.fluidbook.datas.helpStartupTime));\r
-                       if ($this.fluidbook.pad.enabled) {\r
-                               $this.fluidbook.pad.displayInterface();\r
+                       this.show(parseInt(this.fluidbook.datas.helpStartupTime));\r
+                       if (this.fluidbook.pad.enabled) {\r
+                               this.fluidbook.pad.displayInterface();\r
                        }\r
                }\r
        }\r
index b89b4d6769599d95c1d6e8eeb5eee5a7c50b3ef3..83ac5a755117d39bf450b252a05cea9fb776df20 100644 (file)
@@ -158,6 +158,6 @@ FluidbookVideo.prototype = {
                });
        },
        logCacheEvent: function(e) {
-               fb('video :' + e.type);
+               
        }
 };
\ No newline at end of file
index b56cf5f20c900488e85fd5e0384991764d841d78..5dfe82315693789113acca102c84b75e24d4edad 100644 (file)
@@ -1,6 +1,6 @@
 /*!
- * VERSION: beta 1.10.1
- * DATE: 2013-07-10
+ * VERSION: beta 1.10.2
+ * DATE: 2013-08-05
  * UPDATES AND DOCS AT: http://www.greensock.com
  *
  * @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
@@ -52,7 +52,7 @@
                        _slice = _blankArray.slice,
                        p = TimelineLite.prototype = new SimpleTimeline();
 
-               TimelineLite.version = "1.10.1";
+               TimelineLite.version = "1.10.2";
                p.constructor = TimelineLite;
                p.kill()._gc = false;
                
                                        if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
                                                internalForce = true;
                                        }
-                               } else if (!this._initted) {
-                                       internalForce = true;
+                                       this._rawPrevTime = time;
+                               } else {
+                                       this._rawPrevTime = time;
+                                       time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
+                                       if (!this._initted) {
+                                               internalForce = true;
+                                       }
                                }
-                               this._rawPrevTime = time;
-                               time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
 
                        } else {
                                this._totalTime = this._time = this._rawPrevTime = time;
index e42d34a97c5195d4c0bbb57e4b9c2c6a0e7137a7..1144c9847d43e655a0ab96a624931a110ceb736b 100644 (file)
@@ -1,6 +1,6 @@
 /*!
- * VERSION: beta 1.10.1
- * DATE: 2013-07-10
+ * VERSION: beta 1.10.2
+ * DATE: 2013-08-05
  * UPDATES AND DOCS AT: http://www.greensock.com
  *
  * @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
@@ -39,7 +39,7 @@
                        
                p.constructor = TimelineMax;
                p.kill()._gc = false;
-               TimelineMax.version = "1.10.1";
+               TimelineMax.version = "1.10.2";
                
                p.invalidate = function() {
                        this._yoyo = (this.vars.yoyo === true);
                                        if (dur === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
                                                internalForce = true;
                                        }
-                               } else if (!this._initted) {
-                                       internalForce = true;
+                                       this._rawPrevTime = time;
+                               } else {
+                                       this._rawPrevTime = time;
+                                       time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
+                                       if (!this._initted) {
+                                               internalForce = true;
+                                       }
                                }
-                               this._rawPrevTime = time;
-                               time = 0;  //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
                                
                        } else {
                                this._time = this._rawPrevTime = time;
                        _slice = _blankArray.slice,
                        p = TimelineLite.prototype = new SimpleTimeline();
 
-               TimelineLite.version = "1.10.1";
+               TimelineLite.version = "1.10.2";
                p.constructor = TimelineLite;
                p.kill()._gc = false;
 
                                        if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
                                                internalForce = true;
                                        }
-                               } else if (!this._initted) {
-                                       internalForce = true;
+                                       this._rawPrevTime = time;
+                               } else {
+                                       this._rawPrevTime = time;
+                                       time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
+                                       if (!this._initted) {
+                                               internalForce = true;
+                                       }
                                }
-                               this._rawPrevTime = time;
-                               time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
 
                        } else {
                                this._totalTime = this._time = this._rawPrevTime = time;
index 6d9024108084ae02e5768d7fa01305a8bf6ffc62..3fd6e3470a9844c4396559a1e23242c9808eac4e 100644 (file)
@@ -1,6 +1,6 @@
 /*!
- * VERSION: beta 1.10.1
- * DATE: 2013-07-10
+ * VERSION: beta 1.10.2
+ * DATE: 2013-08-05
  * UPDATES AND DOCS AT: http://www.greensock.com
  *
  * @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
  */
                var _reqAnimFrame = window.requestAnimationFrame, 
                        _cancelAnimFrame = window.cancelAnimationFrame, 
-                       _getTime = Date.now || function() {return new Date().getTime();};
+                       _getTime = Date.now || function() {return new Date().getTime();},
+                       _lastUpdate = _getTime();
                
                //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.
                a = ["ms","moz","webkit","o"];
                                _useRAF = (useRAF !== false && _reqAnimFrame),
                                _fps, _req, _id, _gap, _nextTime,
                                _tick = function(manual) {
-                                       _self.time = (_getTime() - _startTime) / 1000;
-                                       var id = _id,
-                                               overlap = _self.time - _nextTime;
+                                       _lastUpdate = _getTime();
+                                       _self.time = (_lastUpdate - _startTime) / 1000;
+                                       var overlap = _self.time - _nextTime,
+                                               dispatch;
                                        if (!_fps || overlap > 0 || manual === true) {
                                                _self.frame++;
                                                _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);
-                                               _self.dispatchEvent("tick");
+                                               dispatch = true;
                                        }
-                                       if (manual !== true && id === _id) { //make sure the ids match in case the "tick" dispatch triggered something that caused the ticker to shut down or change _useRAF or something like that.
+                                       if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.
                                                _id = _req(_tick);
                                        }
+                                       if (dispatch) {
+                                               _self.dispatchEvent("tick");
+                                       }
                                };
 
                        EventDispatcher.call(_self);
  * ----------------------------------------------------------------
  */
                var Animation = _class("core.Animation", function(duration, vars) {
-                               this.vars = vars || {};
+                               this.vars = vars = vars || {};
                                this._duration = this._totalDuration = duration || 0;
-                               this._delay = Number(this.vars.delay) || 0;
+                               this._delay = Number(vars.delay) || 0;
                                this._timeScale = 1;
-                               this._active = (this.vars.immediateRender === true);
-                               this.data = this.vars.data;
-                               this._reversed = (this.vars.reversed === true);
+                               this._active = (vars.immediateRender === true);
+                               this.data = vars.data;
+                               this._reversed = (vars.reversed === true);
                                
                                if (!_rootTimeline) {
                                        return;
                                }
-                               if (!_tickerActive) {
+                               if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.
                                        _ticker.wake();
                                }
 
                p._rawPrevTime = -1;
                p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;
                p._paused = false;
+
+
+               //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.
+               var _checkTimeout = function() {
+                               if (_getTime() - _lastUpdate > 2000) {
+                                       _ticker.wake();
+                               }
+                               setTimeout(_checkTimeout, 2000);
+                       };
+               _checkTimeout();
+
                
                p.play = function(from, suppressEvents) {
                        if (arguments.length) {
                        return this.reversed(true).paused(false);
                };
                
-               p.render = function() {
-                       
+               p.render = function(time, suppressEvents, force) {
+                       //stub - we override this method in subclasses.
                };
                
                p.invalidate = function() {
  */
                var TweenLite = _class("TweenLite", function(target, duration, vars) {
                                Animation.call(this, duration, vars);
+                               this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
 
                                if (target == null) {
                                        throw "Cannot tween a null target.";
                p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
                p._notifyPluginsOfEnabled = false;
                
-               TweenLite.version = "1.10.1";
+               TweenLite.version = "1.10.2";
                TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
                TweenLite.defaultOverwrite = "auto";
                TweenLite.ticker = _ticker;
                        var v = this.vars,
                                op = this._overwrittenProps,
                                dur = this._duration,
+                               immediate = v.immediateRender,
                                ease = v.ease,
                                i, initPlugins, pt, p;
                        if (v.startAt) {
+                               if (this._startAt) {
+                                       this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.
+                               }
                                v.startAt.overwrite = 0;
                                v.startAt.immediateRender = true;
                                this._startAt = TweenLite.to(this.target, 0, v.startAt);
-                               if (v.immediateRender) {
-                                       this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).
-                                       if (this._time === 0 && dur !== 0) {
+                               if (immediate) {
+                                       if (this._time > 0) {
+                                               this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).
+                                       } else if (dur !== 0) {
                                                return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.
                                        }
                                }
index 68f557686fef38bca9e22205e87853719a58bb2a..a856b9ff76a7d4a66706a00cad99d72fc21ffcd9 100644 (file)
@@ -1,6 +1,6 @@
 /*!
- * VERSION: beta 1.10.1
- * DATE: 2013-07-10
+ * VERSION: beta 1.10.2
+ * DATE: 2013-08-05
  * UPDATES AND DOCS AT: http://www.greensock.com
  * 
  * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
@@ -26,6 +26,7 @@
                                this._repeat = this.vars.repeat || 0;
                                this._repeatDelay = this.vars.repeatDelay || 0;
                                this._dirty = true; //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it.
+                               this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
                        },
                        _isSelector = function(v) {
                                return (v.jquery || (v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType)))); //note: we cannot check "nodeType" on window from inside an iframe (some browsers throw a security error)
@@ -33,7 +34,7 @@
                        p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
                        _blankArray = [];
 
-               TweenMax.version = "1.10.1";
+               TweenMax.version = "1.10.2";
                p.constructor = TweenMax;
                p.kill()._gc = false;
                TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
                TweenMax.resumeAll = function(tweens, delayedCalls, timelines) {
                        _changePause(false, tweens, delayedCalls, timelines);
                };
+
+               TweenMax.globalTimeScale = function(value) {
+                       var tl = Animation._rootTimeline,
+                               t = TweenLite.ticker.time;
+                       if (!arguments.length) {
+                               return tl._timeScale;
+                       }
+                       value = value || 0.000001; //can't allow zero because it'll throw the math off
+                       tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);
+                       tl = Animation._rootFramesTimeline;
+                       t = TweenLite.ticker.frame;
+                       tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);
+                       tl._timeScale = Animation._rootTimeline._timeScale = value;
+                       return value;
+               };
                
        
 //---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------
                        _slice = _blankArray.slice,
                        p = TimelineLite.prototype = new SimpleTimeline();
 
-               TimelineLite.version = "1.10.1";
+               TimelineLite.version = "1.10.2";
                p.constructor = TimelineLite;
                p.kill()._gc = false;
 
                                        if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
                                                internalForce = true;
                                        }
-                               } else if (!this._initted) {
-                                       internalForce = true;
+                                       this._rawPrevTime = time;
+                               } else {
+                                       this._rawPrevTime = time;
+                                       time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
+                                       if (!this._initted) {
+                                               internalForce = true;
+                                       }
                                }
-                               this._rawPrevTime = time;
-                               time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
 
                        } else {
                                this._totalTime = this._time = this._rawPrevTime = time;
 
                p.constructor = TimelineMax;
                p.kill()._gc = false;
-               TimelineMax.version = "1.10.1";
+               TimelineMax.version = "1.10.2";
 
                p.invalidate = function() {
                        this._yoyo = (this.vars.yoyo === true);
                                        if (dur === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
                                                internalForce = true;
                                        }
-                               } else if (!this._initted) {
-                                       internalForce = true;
+                                       this._rawPrevTime = time;
+                               } else {
+                                       this._rawPrevTime = time;
+                                       time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
+                                       if (!this._initted) {
+                                               internalForce = true;
+                                       }
                                }
-                               this._rawPrevTime = time;
-                               time = 0;  //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
 
                        } else {
                                this._time = this._rawPrevTime = time;
                var CSSPlugin = function() {
                                TweenPlugin.call(this, "css");
                                this._overwriteProps.length = 0;
+                               this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method)
                        },
                        _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called.
                        _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance
                        p = CSSPlugin.prototype = new TweenPlugin("css");
 
                p.constructor = CSSPlugin;
-               CSSPlugin.version = "1.10.1";
+               CSSPlugin.version = "1.10.2";
                CSSPlugin.API = 2;
                CSSPlugin.defaultTransformPerspective = 0;
                p = "px"; //we'll reuse the "p" variable to keep file size down
                                pt.setRatio = _setIEOpacityRatio;
                        }
                        if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier
-                               pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "visible" : "hidden"), ((e === 0) ? "hidden" : "visible"));
-                               pt.xs0 = "visible";
+                               pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit"));
+                               pt.xs0 = "inherit";
                                cssp._overwriteProps.push(pt.n);
                        }
                        return pt;
                                if (pt._next) {
                                        pt._next._prev = pt._prev;
                                }
-                               if (prev) {
-                                       prev._next = pt;
-                               } else if (!remove && this._firstPT === null) {
-                                       this._firstPT = pt;
-                               }
                                if (pt._prev) {
                                        pt._prev._next = pt._next;
                                } else if (this._firstPT === pt) {
                                        this._firstPT = pt._next;
+                                       remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed)
+                               }
+                               if (prev) {
+                                       prev._next = pt;
+                               } else if (!remove && this._firstPT === null) {
+                                       this._firstPT = pt;
                                }
                                pt._next = next;
                                pt._prev = prev;
  */
                var _reqAnimFrame = window.requestAnimationFrame,
                        _cancelAnimFrame = window.cancelAnimationFrame,
-                       _getTime = Date.now || function() {return new Date().getTime();};
+                       _getTime = Date.now || function() {return new Date().getTime();},
+                       _lastUpdate = _getTime();
 
                //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.
                a = ["ms","moz","webkit","o"];
                                _useRAF = (useRAF !== false && _reqAnimFrame),
                                _fps, _req, _id, _gap, _nextTime,
                                _tick = function(manual) {
-                                       _self.time = (_getTime() - _startTime) / 1000;
-                                       var id = _id,
-                                               overlap = _self.time - _nextTime;
+                                       _lastUpdate = _getTime();
+                                       _self.time = (_lastUpdate - _startTime) / 1000;
+                                       var overlap = _self.time - _nextTime,
+                                               dispatch;
                                        if (!_fps || overlap > 0 || manual === true) {
                                                _self.frame++;
                                                _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);
-                                               _self.dispatchEvent("tick");
+                                               dispatch = true;
                                        }
-                                       if (manual !== true && id === _id) { //make sure the ids match in case the "tick" dispatch triggered something that caused the ticker to shut down or change _useRAF or something like that.
+                                       if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.
                                                _id = _req(_tick);
                                        }
+                                       if (dispatch) {
+                                               _self.dispatchEvent("tick");
+                                       }
                                };
 
                        EventDispatcher.call(_self);
  * ----------------------------------------------------------------
  */
                var Animation = _class("core.Animation", function(duration, vars) {
-                               this.vars = vars || {};
+                               this.vars = vars = vars || {};
                                this._duration = this._totalDuration = duration || 0;
-                               this._delay = Number(this.vars.delay) || 0;
+                               this._delay = Number(vars.delay) || 0;
                                this._timeScale = 1;
-                               this._active = (this.vars.immediateRender === true);
-                               this.data = this.vars.data;
-                               this._reversed = (this.vars.reversed === true);
+                               this._active = (vars.immediateRender === true);
+                               this.data = vars.data;
+                               this._reversed = (vars.reversed === true);
 
                                if (!_rootTimeline) {
                                        return;
                                }
-                               if (!_tickerActive) {
+                               if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.
                                        _ticker.wake();
                                }
 
                p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;
                p._paused = false;
 
+
+               //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.
+               var _checkTimeout = function() {
+                               if (_getTime() - _lastUpdate > 2000) {
+                                       _ticker.wake();
+                               }
+                               setTimeout(_checkTimeout, 2000);
+                       };
+               _checkTimeout();
+
+
                p.play = function(from, suppressEvents) {
                        if (arguments.length) {
                                this.seek(from, suppressEvents);
                        return this.reversed(true).paused(false);
                };
 
-               p.render = function() {
-
+               p.render = function(time, suppressEvents, force) {
+                       //stub - we override this method in subclasses.
                };
 
                p.invalidate = function() {
  */
                var TweenLite = _class("TweenLite", function(target, duration, vars) {
                                Animation.call(this, duration, vars);
+                               this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
 
                                if (target == null) {
                                        throw "Cannot tween a null target.";
                p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
                p._notifyPluginsOfEnabled = false;
 
-               TweenLite.version = "1.10.1";
+               TweenLite.version = "1.10.2";
                TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
                TweenLite.defaultOverwrite = "auto";
                TweenLite.ticker = _ticker;
                        var v = this.vars,
                                op = this._overwrittenProps,
                                dur = this._duration,
+                               immediate = v.immediateRender,
                                ease = v.ease,
                                i, initPlugins, pt, p;
                        if (v.startAt) {
+                               if (this._startAt) {
+                                       this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.
+                               }
                                v.startAt.overwrite = 0;
                                v.startAt.immediateRender = true;
                                this._startAt = TweenLite.to(this.target, 0, v.startAt);
-                               if (v.immediateRender) {
-                                       this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).
-                                       if (this._time === 0 && dur !== 0) {
+                               if (immediate) {
+                                       if (this._time > 0) {
+                                               this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).
+                                       } else if (dur !== 0) {
                                                return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.
                                        }
                                }
index 83857b8c20c1a3cc03cadd116731ebaf949afbab..6bd41f8be45ab5ec997ae86f1e94633effd62897 100644 (file)
@@ -1,6 +1,6 @@
 /*!
- * VERSION: beta 1.10.1
- * DATE: 2013-07-03
+ * VERSION: beta 1.10.2
+ * DATE: 2013-08-05
  * UPDATES AND DOCS AT: http://www.greensock.com
  *
  * @license Copyright (c) 2008-2013, GreenSock. All rights reserved.
@@ -19,6 +19,7 @@
                var CSSPlugin = function() {
                                TweenPlugin.call(this, "css");
                                this._overwriteProps.length = 0;
+                               this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method)
                        },
                        _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called.
                        _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance
@@ -28,7 +29,7 @@
                        p = CSSPlugin.prototype = new TweenPlugin("css");
 
                p.constructor = CSSPlugin;
-               CSSPlugin.version = "1.10.1";
+               CSSPlugin.version = "1.10.2";
                CSSPlugin.API = 2;
                CSSPlugin.defaultTransformPerspective = 0;
                p = "px"; //we'll reuse the "p" variable to keep file size down
                                pt.setRatio = _setIEOpacityRatio;
                        }
                        if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier
-                               pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "visible" : "hidden"), ((e === 0) ? "hidden" : "visible"));
-                               pt.xs0 = "visible";
+                               pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit"));
+                               pt.xs0 = "inherit";
                                cssp._overwriteProps.push(pt.n);
                        }
                        return pt;
                                if (pt._next) {
                                        pt._next._prev = pt._prev;
                                }
-                               if (prev) {
-                                       prev._next = pt;
-                               } else if (!remove && this._firstPT === null) {
-                                       this._firstPT = pt;
-                               }
                                if (pt._prev) {
                                        pt._prev._next = pt._next;
                                } else if (this._firstPT === pt) {
                                        this._firstPT = pt._next;
+                                       remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed)
+                               }
+                               if (prev) {
+                                       prev._next = pt;
+                               } else if (!remove && this._firstPT === null) {
+                                       this._firstPT = pt;
                                }
                                pt._next = next;
                                pt._prev = prev;
diff --git a/js/libs/jquery/jquery.migrate.js b/js/libs/jquery/jquery.migrate.js
deleted file mode 100644 (file)
index 25b6c81..0000000
+++ /dev/null
@@ -1,521 +0,0 @@
-/*!
- * jQuery Migrate - v1.2.1 - 2013-05-08
- * https://github.com/jquery/jquery-migrate
- * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
- */
-(function( jQuery, window, undefined ) {
-// See http://bugs.jquery.com/ticket/13335
-// "use strict";
-
-
-var warnedAbout = {};
-
-// List of warnings already given; public read only
-jQuery.migrateWarnings = [];
-
-// Set to true to prevent console output; migrateWarnings still maintained
-// jQuery.migrateMute = false;
-
-// Show a message on the console so devs know we're active
-if ( !jQuery.migrateMute && window.console && window.console.log ) {
-       window.console.log("JQMIGRATE: Logging is active");
-}
-
-// Set to false to disable traces that appear with warnings
-if ( jQuery.migrateTrace === undefined ) {
-       jQuery.migrateTrace = true;
-}
-
-// Forget any warnings we've already given; public
-jQuery.migrateReset = function() {
-       warnedAbout = {};
-       jQuery.migrateWarnings.length = 0;
-};
-
-function migrateWarn( msg) {
-       var console = window.console;
-       if ( !warnedAbout[ msg ] ) {
-               warnedAbout[ msg ] = true;
-               jQuery.migrateWarnings.push( msg );
-               if ( console && console.warn && !jQuery.migrateMute ) {
-                       console.warn( "JQMIGRATE: " + msg );
-                       if ( jQuery.migrateTrace && console.trace ) {
-                               console.trace();
-                       }
-               }
-       }
-}
-
-function migrateWarnProp( obj, prop, value, msg ) {
-       if ( Object.defineProperty ) {
-               // On ES5 browsers (non-oldIE), warn if the code tries to get prop;
-               // allow property to be overwritten in case some other plugin wants it
-               try {
-                       Object.defineProperty( obj, prop, {
-                               configurable: true,
-                               enumerable: true,
-                               get: function() {
-                                       migrateWarn( msg );
-                                       return value;
-                               },
-                               set: function( newValue ) {
-                                       migrateWarn( msg );
-                                       value = newValue;
-                               }
-                       });
-                       return;
-               } catch( err ) {
-                       // IE8 is a dope about Object.defineProperty, can't warn there
-               }
-       }
-
-       // Non-ES5 (or broken) browser; just set the property
-       jQuery._definePropertyBroken = true;
-       obj[ prop ] = value;
-}
-
-if ( document.compatMode === "BackCompat" ) {
-       // jQuery has never supported or tested Quirks Mode
-       migrateWarn( "jQuery is not compatible with Quirks Mode" );
-}
-
-
-var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
-       oldAttr = jQuery.attr,
-       valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
-               function() { return null; },
-       valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
-               function() { return undefined; },
-       rnoType = /^(?:input|button)$/i,
-       rnoAttrNodeType = /^[238]$/,
-       rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
-       ruseDefault = /^(?:checked|selected)$/i;
-
-// jQuery.attrFn
-migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
-
-jQuery.attr = function( elem, name, value, pass ) {
-       var lowerName = name.toLowerCase(),
-               nType = elem && elem.nodeType;
-
-       if ( pass ) {
-               // Since pass is used internally, we only warn for new jQuery
-               // versions where there isn't a pass arg in the formal params
-               if ( oldAttr.length < 4 ) {
-                       migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
-               }
-               if ( elem && !rnoAttrNodeType.test( nType ) &&
-                       (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
-                       return jQuery( elem )[ name ]( value );
-               }
-       }
-
-       // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
-       // for disconnected elements we don't warn on $( "<button>", { type: "button" } ).
-       if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) {
-               migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
-       }
-
-       // Restore boolHook for boolean property/attribute synchronization
-       if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
-               jQuery.attrHooks[ lowerName ] = {
-                       get: function( elem, name ) {
-                               // Align boolean attributes with corresponding properties
-                               // Fall back to attribute presence where some booleans are not supported
-                               var attrNode,
-                                       property = jQuery.prop( elem, name );
-                               return property === true || typeof property !== "boolean" &&
-                                       ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
-
-                                       name.toLowerCase() :
-                                       undefined;
-                       },
-                       set: function( elem, value, name ) {
-                               var propName;
-                               if ( value === false ) {
-                                       // Remove boolean attributes when set to false
-                                       jQuery.removeAttr( elem, name );
-                               } else {
-                                       // value is true since we know at this point it's type boolean and not false
-                                       // Set boolean attributes to the same name and set the DOM property
-                                       propName = jQuery.propFix[ name ] || name;
-                                       if ( propName in elem ) {
-                                               // Only set the IDL specifically if it already exists on the element
-                                               elem[ propName ] = true;
-                                       }
-
-                                       elem.setAttribute( name, name.toLowerCase() );
-                               }
-                               return name;
-                       }
-               };
-
-               // Warn only for attributes that can remain distinct from their properties post-1.9
-               if ( ruseDefault.test( lowerName ) ) {
-                       migrateWarn( "jQuery.fn.attr('" + lowerName + "') may use property instead of attribute" );
-               }
-       }
-
-       return oldAttr.call( jQuery, elem, name, value );
-};
-
-// attrHooks: value
-jQuery.attrHooks.value = {
-       get: function( elem, name ) {
-               var nodeName = ( elem.nodeName || "" ).toLowerCase();
-               if ( nodeName === "button" ) {
-                       return valueAttrGet.apply( this, arguments );
-               }
-               if ( nodeName !== "input" && nodeName !== "option" ) {
-                       migrateWarn("jQuery.fn.attr('value') no longer gets properties");
-               }
-               return name in elem ?
-                       elem.value :
-                       null;
-       },
-       set: function( elem, value ) {
-               var nodeName = ( elem.nodeName || "" ).toLowerCase();
-               if ( nodeName === "button" ) {
-                       return valueAttrSet.apply( this, arguments );
-               }
-               if ( nodeName !== "input" && nodeName !== "option" ) {
-                       migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");
-               }
-               // Does not return so that setAttribute is also used
-               elem.value = value;
-       }
-};
-
-
-var matched, browser,
-       oldInit = jQuery.fn.init,
-       oldParseJSON = jQuery.parseJSON,
-       // Note: XSS check is done below after string is trimmed
-       rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
-
-// $(html) "looks like html" rule change
-jQuery.fn.init = function( selector, context, rootjQuery ) {
-       var match;
-
-       if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
-                       (match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
-               // This is an HTML string according to the "old" rules; is it still?
-               if ( selector.charAt( 0 ) !== "<" ) {
-                       migrateWarn("$(html) HTML strings must start with '<' character");
-               }
-               if ( match[ 3 ] ) {
-                       migrateWarn("$(html) HTML text after last tag is ignored");
-               }
-               // Consistently reject any HTML-like string starting with a hash (#9521)
-               // Note that this may break jQuery 1.6.x code that otherwise would work.
-               if ( match[ 0 ].charAt( 0 ) === "#" ) {
-                       migrateWarn("HTML string cannot start with a '#' character");
-                       jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
-               }
-               // Now process using loose rules; let pre-1.8 play too
-               if ( context && context.context ) {
-                       // jQuery object as context; parseHTML expects a DOM object
-                       context = context.context;
-               }
-               if ( jQuery.parseHTML ) {
-                       return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
-                                       context, rootjQuery );
-               }
-       }
-       return oldInit.apply( this, arguments );
-};
-jQuery.fn.init.prototype = jQuery.fn;
-
-// Let $.parseJSON(falsy_value) return null
-jQuery.parseJSON = function( json ) {
-       if ( !json && json !== null ) {
-               migrateWarn("jQuery.parseJSON requires a valid JSON string");
-               return null;
-       }
-       return oldParseJSON.apply( this, arguments );
-};
-
-jQuery.uaMatch = function( ua ) {
-       ua = ua.toLowerCase();
-
-       var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
-               /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
-               /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
-               /(msie) ([\w.]+)/.exec( ua ) ||
-               ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
-               [];
-
-       return {
-               browser: match[ 1 ] || "",
-               version: match[ 2 ] || "0"
-       };
-};
-
-// Don't clobber any existing jQuery.browser in case it's different
-if ( !jQuery.browser ) {
-       matched = jQuery.uaMatch( navigator.userAgent );
-       browser = {};
-
-       if ( matched.browser ) {
-               browser[ matched.browser ] = true;
-               browser.version = matched.version;
-       }
-
-       // Chrome is Webkit, but Webkit is also Safari.
-       if ( browser.chrome ) {
-               browser.webkit = true;
-       } else if ( browser.webkit ) {
-               browser.safari = true;
-       }
-
-       jQuery.browser = browser;
-}
-
-// Warn if the code tries to get jQuery.browser
-migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
-
-jQuery.sub = function() {
-       function jQuerySub( selector, context ) {
-               return new jQuerySub.fn.init( selector, context );
-       }
-       jQuery.extend( true, jQuerySub, this );
-       jQuerySub.superclass = this;
-       jQuerySub.fn = jQuerySub.prototype = this();
-       jQuerySub.fn.constructor = jQuerySub;
-       jQuerySub.sub = this.sub;
-       jQuerySub.fn.init = function init( selector, context ) {
-               if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
-                       context = jQuerySub( context );
-               }
-
-               return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
-       };
-       jQuerySub.fn.init.prototype = jQuerySub.fn;
-       var rootjQuerySub = jQuerySub(document);
-       migrateWarn( "jQuery.sub() is deprecated" );
-       return jQuerySub;
-};
-
-
-// Ensure that $.ajax gets the new parseJSON defined in core.js
-jQuery.ajaxSetup({
-       converters: {
-               "text json": jQuery.parseJSON
-       }
-});
-
-
-var oldFnData = jQuery.fn.data;
-
-jQuery.fn.data = function( name ) {
-       var ret, evt,
-               elem = this[0];
-
-       // Handles 1.7 which has this behavior and 1.8 which doesn't
-       if ( elem && name === "events" && arguments.length === 1 ) {
-               ret = jQuery.data( elem, name );
-               evt = jQuery._data( elem, name );
-               if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
-                       migrateWarn("Use of jQuery.fn.data('events') is deprecated");
-                       return evt;
-               }
-       }
-       return oldFnData.apply( this, arguments );
-};
-
-
-var rscriptType = /\/(java|ecma)script/i,
-       oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
-
-jQuery.fn.andSelf = function() {
-       migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
-       return oldSelf.apply( this, arguments );
-};
-
-// Since jQuery.clean is used internally on older versions, we only shim if it's missing
-if ( !jQuery.clean ) {
-       jQuery.clean = function( elems, context, fragment, scripts ) {
-               // Set context per 1.8 logic
-               context = context || document;
-               context = !context.nodeType && context[0] || context;
-               context = context.ownerDocument || context;
-
-               migrateWarn("jQuery.clean() is deprecated");
-
-               var i, elem, handleScript, jsTags,
-                       ret = [];
-
-               jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
-
-               // Complex logic lifted directly from jQuery 1.8
-               if ( fragment ) {
-                       // Special handling of each script element
-                       handleScript = function( elem ) {
-                               // Check if we consider it executable
-                               if ( !elem.type || rscriptType.test( elem.type ) ) {
-                                       // Detach the script and store it in the scripts array (if provided) or the fragment
-                                       // Return truthy to indicate that it has been handled
-                                       return scripts ?
-                                               scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
-                                               fragment.appendChild( elem );
-                               }
-                       };
-
-                       for ( i = 0; (elem = ret[i]) != null; i++ ) {
-                               // Check if we're done after handling an executable script
-                               if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
-                                       // Append to fragment and handle embedded scripts
-                                       fragment.appendChild( elem );
-                                       if ( typeof elem.getElementsByTagName !== "undefined" ) {
-                                               // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
-                                               jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
-
-                                               // Splice the scripts into ret after their former ancestor and advance our index beyond them
-                                               ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
-                                               i += jsTags.length;
-                                       }
-                               }
-                       }
-               }
-
-               return ret;
-       };
-}
-
-var eventAdd = jQuery.event.add,
-       eventRemove = jQuery.event.remove,
-       eventTrigger = jQuery.event.trigger,
-       oldToggle = jQuery.fn.toggle,
-       oldLive = jQuery.fn.live,
-       oldDie = jQuery.fn.die,
-       ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
-       rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
-       rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
-       hoverHack = function( events ) {
-               if ( typeof( events ) !== "string" || jQuery.event.special.hover ) {
-                       return events;
-               }
-               if ( rhoverHack.test( events ) ) {
-                       migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
-               }
-               return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
-       };
-
-// Event props removed in 1.9, put them back if needed; no practical way to warn them
-if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
-       jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
-}
-
-// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
-if ( jQuery.event.dispatch ) {
-       migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
-}
-
-// Support for 'hover' pseudo-event and ajax event warnings
-jQuery.event.add = function( elem, types, handler, data, selector ){
-       if ( elem !== document && rajaxEvent.test( types ) ) {
-               migrateWarn( "AJAX events should be attached to document: " + types );
-       }
-       eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
-};
-jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
-       eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
-};
-
-jQuery.fn.error = function() {
-       var args = Array.prototype.slice.call( arguments, 0);
-       migrateWarn("jQuery.fn.error() is deprecated");
-       args.splice( 0, 0, "error" );
-       if ( arguments.length ) {
-               return this.bind.apply( this, args );
-       }
-       // error event should not bubble to window, although it does pre-1.7
-       this.triggerHandler.apply( this, args );
-       return this;
-};
-
-jQuery.fn.toggle = function( fn, fn2 ) {
-
-       // Don't mess with animation or css toggles
-       if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
-               return oldToggle.apply( this, arguments );
-       }
-       migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
-
-       // Save reference to arguments for access in closure
-       var args = arguments,
-               guid = fn.guid || jQuery.guid++,
-               i = 0,
-               toggler = function( event ) {
-                       // Figure out which function to execute
-                       var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
-                       jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
-
-                       // Make sure that clicks stop
-                       event.preventDefault();
-
-                       // and execute the function
-                       return args[ lastToggle ].apply( this, arguments ) || false;
-               };
-
-       // link all the functions, so any of them can unbind this click handler
-       toggler.guid = guid;
-       while ( i < args.length ) {
-               args[ i++ ].guid = guid;
-       }
-
-       return this.click( toggler );
-};
-
-jQuery.fn.live = function( types, data, fn ) {
-       migrateWarn("jQuery.fn.live() is deprecated");
-       if ( oldLive ) {
-               return oldLive.apply( this, arguments );
-       }
-       jQuery( this.context ).on( types, this.selector, data, fn );
-       return this;
-};
-
-jQuery.fn.die = function( types, fn ) {
-       migrateWarn("jQuery.fn.die() is deprecated");
-       if ( oldDie ) {
-               return oldDie.apply( this, arguments );
-       }
-       jQuery( this.context ).off( types, this.selector || "**", fn );
-       return this;
-};
-
-// Turn global events into document-triggered events
-jQuery.event.trigger = function( event, data, elem, onlyHandlers  ){
-       if ( !elem && !rajaxEvent.test( event ) ) {
-               migrateWarn( "Global events are undocumented and deprecated" );
-       }
-       return eventTrigger.call( this,  event, data, elem || document, onlyHandlers  );
-};
-jQuery.each( ajaxEvents.split("|"),
-       function( _, name ) {
-               jQuery.event.special[ name ] = {
-                       setup: function() {
-                               var elem = this;
-
-                               // The document needs no shimming; must be !== for oldIE
-                               if ( elem !== document ) {
-                                       jQuery.event.add( document, name + "." + jQuery.guid, function() {
-                                               jQuery.event.trigger( name, null, elem, true );
-                                       });
-                                       jQuery._data( this, name, jQuery.guid++ );
-                               }
-                               return false;
-                       },
-                       teardown: function() {
-                               if ( this !== document ) {
-                                       jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
-                               }
-                               return false;
-                       }
-               };
-       }
-);
-
-
-})( jQuery, window );