diff --git a/ScrollMagic.jquery.json b/ScrollMagic.jquery.json
index 1b6d01ae..6a426920 100644
--- a/ScrollMagic.jquery.json
+++ b/ScrollMagic.jquery.json
@@ -1,6 +1,6 @@
{
"name": "ScrollMagic",
- "version": "1.0.5",
+ "version": "1.0.6",
"title": "ScrollMagic",
"author": {
"name": "Jan Paepke",
@@ -17,7 +17,7 @@
}
],
"dependencies": {
- "jquery": ">=1.6",
+ "jquery": ">=1.7",
"greensock":">=1.8"
},
"description": "The jQuery plugin for magical scroll interactions.",
diff --git a/bower.json b/bower.json
index c3582ec4..c0d380cd 100644
--- a/bower.json
+++ b/bower.json
@@ -1,7 +1,7 @@
{
"name": "ScrollMagic",
"description": "The jQuery plugin for magical scroll interactions.",
- "version": "1.0.5",
+ "version": "1.0.6",
"homepage": "http://janpaepke.github.io/ScrollMagic/",
"author": {
"name": "Jan Paepke",
diff --git a/docs/ScrollScene.html b/docs/ScrollScene.html
index 26664880..ef5f13b8 100644
--- a/docs/ScrollScene.html
+++ b/docs/ScrollScene.html
@@ -1114,7 +1114,7 @@
Parameters:
Source:
@@ -1273,7 +1273,7 @@ Parameters:
Source:
@@ -1424,7 +1424,7 @@ Parameters:
Source:
@@ -1593,7 +1593,7 @@ Parameters:
Source:
@@ -1747,7 +1747,7 @@ Parameters:
Source:
@@ -1947,7 +1947,7 @@ Parameters:
Source:
@@ -2098,7 +2098,7 @@ Parameters:
Source:
@@ -2278,7 +2278,7 @@ Parameters:
Source:
@@ -2368,7 +2368,7 @@ parentSource:
@@ -2519,7 +2519,7 @@ Parameters:
Source:
@@ -2637,7 +2637,7 @@ removeSource:
@@ -2796,7 +2796,7 @@ Parameters:
Source:
@@ -2955,7 +2955,7 @@ Parameters:
Source:
@@ -3106,7 +3106,7 @@ Parameters:
Source:
@@ -3418,7 +3418,7 @@ Properties
Source:
@@ -3557,7 +3557,7 @@ Parameters:
Source:
@@ -3647,7 +3647,7 @@ startPos
Source:
@@ -3737,7 +3737,7 @@ stateSource:
@@ -3919,7 +3919,7 @@ Parameters:
Source:
@@ -4073,7 +4073,7 @@ Parameters:
Source:
@@ -4247,7 +4247,7 @@ Parameters:
Source:
@@ -4416,7 +4416,7 @@ Parameters:
Source:
@@ -4593,7 +4593,7 @@ Parameters:
Source:
@@ -4865,7 +4865,7 @@ Properties
Source:
@@ -5132,7 +5132,7 @@ Properties
Source:
@@ -5399,7 +5399,7 @@ Properties
Source:
@@ -5666,7 +5666,7 @@ Properties
Source:
@@ -5933,7 +5933,7 @@ Properties
Source:
@@ -6200,7 +6200,7 @@ Properties
Source:
@@ -6467,7 +6467,7 @@ Properties
Source:
diff --git a/docs/classes.list.html b/docs/classes.list.html
index 0afd4449..5feebcf3 100644
--- a/docs/classes.list.html
+++ b/docs/classes.list.html
@@ -384,7 +384,7 @@ Properties
Source:
@@ -651,7 +651,7 @@ Properties
Source:
@@ -918,7 +918,7 @@ Properties
Source:
@@ -1185,7 +1185,7 @@ Properties
Source:
@@ -1452,7 +1452,7 @@ Properties
Source:
@@ -1719,7 +1719,7 @@ Properties
Source:
@@ -1986,7 +1986,7 @@ Properties
Source:
diff --git a/docs/index.html b/docs/index.html
index 6f16a090..b76ebaa5 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -214,7 +214,7 @@
Version:
-
+
diff --git a/docs/jquery.scrollmagic.debug.js.html b/docs/jquery.scrollmagic.debug.js.html
index f6589444..0c0b8b1f 100644
--- a/docs/jquery.scrollmagic.debug.js.html
+++ b/docs/jquery.scrollmagic.debug.js.html
@@ -101,7 +101,7 @@ Source: jquery.scrollmagic.debug.js
by Jan Paepke 2014 (@janpaepke)
http://janpaepke.github.io/ScrollMagic
- @version 1.0.5
+ @version 1.0.6
@license Dual licensed under MIT license and GPL.
@author Jan Paepke - e-mail@janpaepke.de
*/
diff --git a/docs/jquery.scrollmagic.js.html b/docs/jquery.scrollmagic.js.html
index 1b15e0b7..1ed9e2ba 100644
--- a/docs/jquery.scrollmagic.js.html
+++ b/docs/jquery.scrollmagic.js.html
@@ -109,7 +109,7 @@ Source: jquery.scrollmagic.js
*/
/**
@overview ##Info
-@version 1.0.5
+@version 1.0.6
@license Dual licensed under MIT license and GPL.
@author Jan Paepke - e-mail@janpaepke.de
@@ -853,8 +853,9 @@ Source: jquery.scrollmagic.js
});
} else {
// unpinned state
- var newCSS = {
- position: _pinOptions.origStyle.position == "absolute" ? "absolute" : "relative",
+ var
+ newCSS = {
+ position: _pinOptions.inFlow ? "relative" : "absolute",
top: 0,
left: 0
},
@@ -885,7 +886,7 @@ Source: jquery.scrollmagic.js
* @private
*/
var updatePinSpacerSize = function () {
- if (_pin && _parent && _pinOptions.origStyle.position != "absolute") { // no spacerresize, if original position is absolute
+ if (_pin && _parent && _pinOptions.inFlow) { // no spacerresize, if original position is absolute
var
after = (_state === "AFTER"),
before = (_state === "BEFORE"),
@@ -903,20 +904,42 @@ Source: jquery.scrollmagic.js
css["margin-top"] = css["margin-bottom"] = "auto";
}
- // set new size spacer->pin if relsize / spacer->pin if hard size
+ // set new size
+ // if relsize: spacer -> pin | else: pin -> spacer
if (_pinOptions.relSize.width) {
- _pin.css("width", pinned ? _pinOptions.spacer.width() : "100%");
+ if (pinned) {
+ if ($(window).width() == _pinOptions.spacer.parent().width()) {
+ // relative to body
+ _pin.css("width", "inherit");
+ } else {
+ // not relative to body -> need to calculate
+ _pin.css("width", _pinOptions.spacer.width());
+ }
+ } else {
+ _pin.css("width", "100%");
+ }
} else {
css["min-width"] = $spacercontent.outerWidth(true); // needed for cascading pins
css.width = pinned ? css["min-width"] : "auto";
}
if (_pinOptions.relSize.height) {
- _pin.css("height", pinned ? _pinOptions.spacer.height() : "100%");
+ if (pinned) {
+ if ($(window).height() == _pinOptions.spacer.parent().height()) {
+ // relative to body
+ _pin.css("height", "inherit");
+ } else {
+ // not relative to body -> need to calculate
+ _pin.css("height", _pinOptions.spacer.height());
+ }
+ } else {
+ _pin.css("height", "100%");
+ }
} else {
css["min-height"] = $spacercontent.outerHeight(!marginCollapse); // needed for cascading pins
css.height = pinned ? css["min-height"] : "auto";
}
+ // add space for duration if pushFollowers is true
if (_pinOptions.pushFollowers) {
css["padding" + (vertical ? "Top" : "Left")] = _options.duration * _progress;
css["padding" + (vertical ? "Bottom" : "Right")] = _options.duration * (1 - _progress);
@@ -939,6 +962,7 @@ Source: jquery.scrollmagic.js
}
}
};
+
/**
* Updates the Pin spacer size state (in certain scenarios)
* If container is resized during pin and relatively sized the size of the pin might need to be updated...
@@ -946,7 +970,15 @@ Source: jquery.scrollmagic.js
* @private
*/
var updateRelativePinSpacer = function (e) {
- if (_parent && _pin && _state === "DURING" && (_pinOptions.relSize.width || _pinOptions.relSize.height)) {
+ if ( _parent && _pin // well, duh
+ && (_state === "DURING" || _state === "AFTER" && _options.duration == 0) // element in pinned state?
+ && ( // is width or height relatively sized, but not in relation to body? then we need to recalc.
+ (
+ _pinOptions.relSize.width && $(window).width() != _pinOptions.spacer.parent().width()
+ || _pinOptions.relSize.height && $(window).height() != _pinOptions.spacer.parent().height()
+ )
+ )
+ ) {
updatePinSpacerSize();
}
};
@@ -1459,6 +1491,9 @@ Source: jquery.scrollmagic.js
if (element.length == 0) {
log(1, "ERROR calling method 'setPin()': Invalid pin element supplied.");
return ScrollScene; // cancel
+ } else if (element.css("position") == "fixed") {
+ log(1, "ERROR: Pin does not work with elements that are positioned 'fixed'.");
+ return ScrollScene; // cancel
}
if (_pin) { // preexisting pin?
@@ -1475,23 +1510,18 @@ Source: jquery.scrollmagic.js
_pin.parent().hide(); // hack start to force jQuery css to return stylesheet values instead of calculated px values.
var
- pinCSS = _pin.css(["position", "display", "top", "left", "bottom", "right"]),
+ inFlow = _pin.css("position") != "absolute",
+ pinCSS = _pin.css(["display", "top", "left", "bottom", "right"]),
sizeCSS = _pin.css(["width", "height"]);
_pin.parent().show(); // hack end.
- if (pinCSS.position == "fixed") {
- log(1, "ERROR: Pin does not work with elements that are positioned 'fixed'.");
- _pin = undefined;
- return ScrollScene;
- }
-
// create spacer
var spacer = $("<div></div>")
.addClass(settings.spacerClass)
.css(pinCSS)
.data("ScrollMagicPinSpacer", true)
.css({
- position: pinCSS.position == "absolute" ? "absolute" : "relative",
+ position: inFlow ? "relative" : "absolute",
"margin-left": "auto",
"margin-right": "auto",
"box-sizing": "content-box",
@@ -1499,7 +1529,7 @@ Source: jquery.scrollmagic.js
"-webkit-box-sizing": "content-box"
});
- if (pinCSS.position == "absolute" && settings.pushFollowers) {
+ if (!inFlow && settings.pushFollowers) {
log(2, "WARNING: If the pinned element is positioned absolutely pushFollowers is disabled.");
settings.pushFollowers = false;
}
@@ -1512,10 +1542,11 @@ Source: jquery.scrollmagic.js
height: sizeCSS.height.slice(-1) === "%"
},
pushFollowers: settings.pushFollowers,
- origStyle: pinCSS // save old styles (for reset)
+ inFlow: inFlow, // stores if the element takes up space in the document flow
+ origStyle: _pin.attr("style") // save old styles (for reset)
};
- // if relative size, copy it to spacer...
+ // if relative size, transfer it to spacer and make pin calculate it...
if (_pinOptions.relSize.width) {
spacer.css("width", sizeCSS.width);
}
@@ -1528,7 +1559,7 @@ Source: jquery.scrollmagic.js
.appendTo(spacer)
// and set new css
.css({
- position: pinCSS.position == "absolute" ? "absolute" : "relative",
+ position: inFlow ? "relative" : "absolute",
top: "auto",
left: "auto",
bottom: "auto",
@@ -1563,7 +1594,7 @@ Source: jquery.scrollmagic.js
if (_pin) {
if (reset || !_parent) { // if there's no parent no progress was made anyway...
_pin.insertBefore(_pinOptions.spacer)
- .css(_pinOptions.origStyle);
+ .attr("style", _pinOptions.origStyle);
_pinOptions.spacer.remove();
} else {
if (_state === "DURING") {
diff --git a/js/jquery.scrollmagic.debug.js b/js/jquery.scrollmagic.debug.js
index b005c4a9..e91eed3d 100644
--- a/js/jquery.scrollmagic.debug.js
+++ b/js/jquery.scrollmagic.debug.js
@@ -4,7 +4,7 @@
by Jan Paepke 2014 (@janpaepke)
http://janpaepke.github.io/ScrollMagic
- @version 1.0.5
+ @version 1.0.6
@license Dual licensed under MIT license and GPL.
@author Jan Paepke - e-mail@janpaepke.de
*/
diff --git a/js/jquery.scrollmagic.js b/js/jquery.scrollmagic.js
index 63fd7a59..8f5611ae 100644
--- a/js/jquery.scrollmagic.js
+++ b/js/jquery.scrollmagic.js
@@ -12,7 +12,7 @@ Greensock License info at http://www.greensock.com/licensing/
*/
/**
@overview ##Info
-@version 1.0.5
+@version 1.0.6
@license Dual licensed under MIT license and GPL.
@author Jan Paepke - e-mail@janpaepke.de
@@ -756,8 +756,9 @@ Greensock License info at http://www.greensock.com/licensing/
});
} else {
// unpinned state
- var newCSS = {
- position: _pinOptions.origStyle.position == "absolute" ? "absolute" : "relative",
+ var
+ newCSS = {
+ position: _pinOptions.inFlow ? "relative" : "absolute",
top: 0,
left: 0
},
@@ -788,7 +789,7 @@ Greensock License info at http://www.greensock.com/licensing/
* @private
*/
var updatePinSpacerSize = function () {
- if (_pin && _parent && _pinOptions.origStyle.position != "absolute") { // no spacerresize, if original position is absolute
+ if (_pin && _parent && _pinOptions.inFlow) { // no spacerresize, if original position is absolute
var
after = (_state === "AFTER"),
before = (_state === "BEFORE"),
@@ -806,20 +807,42 @@ Greensock License info at http://www.greensock.com/licensing/
css["margin-top"] = css["margin-bottom"] = "auto";
}
- // set new size spacer->pin if relsize / spacer->pin if hard size
+ // set new size
+ // if relsize: spacer -> pin | else: pin -> spacer
if (_pinOptions.relSize.width) {
- _pin.css("width", pinned ? _pinOptions.spacer.width() : "100%");
+ if (pinned) {
+ if ($(window).width() == _pinOptions.spacer.parent().width()) {
+ // relative to body
+ _pin.css("width", "inherit");
+ } else {
+ // not relative to body -> need to calculate
+ _pin.css("width", _pinOptions.spacer.width());
+ }
+ } else {
+ _pin.css("width", "100%");
+ }
} else {
css["min-width"] = $spacercontent.outerWidth(true); // needed for cascading pins
css.width = pinned ? css["min-width"] : "auto";
}
if (_pinOptions.relSize.height) {
- _pin.css("height", pinned ? _pinOptions.spacer.height() : "100%");
+ if (pinned) {
+ if ($(window).height() == _pinOptions.spacer.parent().height()) {
+ // relative to body
+ _pin.css("height", "inherit");
+ } else {
+ // not relative to body -> need to calculate
+ _pin.css("height", _pinOptions.spacer.height());
+ }
+ } else {
+ _pin.css("height", "100%");
+ }
} else {
css["min-height"] = $spacercontent.outerHeight(!marginCollapse); // needed for cascading pins
css.height = pinned ? css["min-height"] : "auto";
}
+ // add space for duration if pushFollowers is true
if (_pinOptions.pushFollowers) {
css["padding" + (vertical ? "Top" : "Left")] = _options.duration * _progress;
css["padding" + (vertical ? "Bottom" : "Right")] = _options.duration * (1 - _progress);
@@ -842,6 +865,7 @@ Greensock License info at http://www.greensock.com/licensing/
}
}
};
+
/**
* Updates the Pin spacer size state (in certain scenarios)
* If container is resized during pin and relatively sized the size of the pin might need to be updated...
@@ -849,7 +873,15 @@ Greensock License info at http://www.greensock.com/licensing/
* @private
*/
var updateRelativePinSpacer = function (e) {
- if (_parent && _pin && _state === "DURING" && (_pinOptions.relSize.width || _pinOptions.relSize.height)) {
+ if ( _parent && _pin // well, duh
+ && (_state === "DURING" || _state === "AFTER" && _options.duration == 0) // element in pinned state?
+ && ( // is width or height relatively sized, but not in relation to body? then we need to recalc.
+ (
+ _pinOptions.relSize.width && $(window).width() != _pinOptions.spacer.parent().width()
+ || _pinOptions.relSize.height && $(window).height() != _pinOptions.spacer.parent().height()
+ )
+ )
+ ) {
updatePinSpacerSize();
}
};
@@ -1362,6 +1394,9 @@ Greensock License info at http://www.greensock.com/licensing/
if (element.length == 0) {
log(1, "ERROR calling method 'setPin()': Invalid pin element supplied.");
return ScrollScene; // cancel
+ } else if (element.css("position") == "fixed") {
+ log(1, "ERROR: Pin does not work with elements that are positioned 'fixed'.");
+ return ScrollScene; // cancel
}
if (_pin) { // preexisting pin?
@@ -1378,23 +1413,18 @@ Greensock License info at http://www.greensock.com/licensing/
_pin.parent().hide(); // hack start to force jQuery css to return stylesheet values instead of calculated px values.
var
- pinCSS = _pin.css(["position", "display", "top", "left", "bottom", "right"]),
+ inFlow = _pin.css("position") != "absolute",
+ pinCSS = _pin.css(["display", "top", "left", "bottom", "right"]),
sizeCSS = _pin.css(["width", "height"]);
_pin.parent().show(); // hack end.
- if (pinCSS.position == "fixed") {
- log(1, "ERROR: Pin does not work with elements that are positioned 'fixed'.");
- _pin = undefined;
- return ScrollScene;
- }
-
// create spacer
var spacer = $("
")
.addClass(settings.spacerClass)
.css(pinCSS)
.data("ScrollMagicPinSpacer", true)
.css({
- position: pinCSS.position == "absolute" ? "absolute" : "relative",
+ position: inFlow ? "relative" : "absolute",
"margin-left": "auto",
"margin-right": "auto",
"box-sizing": "content-box",
@@ -1402,7 +1432,7 @@ Greensock License info at http://www.greensock.com/licensing/
"-webkit-box-sizing": "content-box"
});
- if (pinCSS.position == "absolute" && settings.pushFollowers) {
+ if (!inFlow && settings.pushFollowers) {
log(2, "WARNING: If the pinned element is positioned absolutely pushFollowers is disabled.");
settings.pushFollowers = false;
}
@@ -1415,10 +1445,11 @@ Greensock License info at http://www.greensock.com/licensing/
height: sizeCSS.height.slice(-1) === "%"
},
pushFollowers: settings.pushFollowers,
- origStyle: pinCSS // save old styles (for reset)
+ inFlow: inFlow, // stores if the element takes up space in the document flow
+ origStyle: _pin.attr("style") // save old styles (for reset)
};
- // if relative size, copy it to spacer...
+ // if relative size, transfer it to spacer and make pin calculate it...
if (_pinOptions.relSize.width) {
spacer.css("width", sizeCSS.width);
}
@@ -1431,7 +1462,7 @@ Greensock License info at http://www.greensock.com/licensing/
.appendTo(spacer)
// and set new css
.css({
- position: pinCSS.position == "absolute" ? "absolute" : "relative",
+ position: inFlow ? "relative" : "absolute",
top: "auto",
left: "auto",
bottom: "auto",
@@ -1466,7 +1497,7 @@ Greensock License info at http://www.greensock.com/licensing/
if (_pin) {
if (reset || !_parent) { // if there's no parent no progress was made anyway...
_pin.insertBefore(_pinOptions.spacer)
- .css(_pinOptions.origStyle);
+ .attr("style", _pinOptions.origStyle);
_pinOptions.spacer.remove();
} else {
if (_state === "DURING") {
diff --git a/js/jquery.scrollmagic.min.js b/js/jquery.scrollmagic.min.js
index 81413f3e..cd2ebcd7 100644
--- a/js/jquery.scrollmagic.min.js
+++ b/js/jquery.scrollmagic.min.js
@@ -1,2 +1,2 @@
-/* ScrollMagic v1.0.5 | (c) Jan Paepke, @janpaepke | license & info: http://janpaepke.github.io/ScrollMagic */
-!function($){ScrollMagic=function(e){"use strict";var t="ScrollMagic",r={container:window,vertical:!0,globalSceneOptions:{},loglevel:2},o=this,i=$.extend({},r,e),s=[],a=!1,l=0,c="PAUSED",g=!0,u=0,d=!1,f=!0,h=function(){if($.each(i,function(e){r.hasOwnProperty(e)||(w(2,'WARNING: Unknown option "'+e+'"'),delete i[e])}),i.container=$(i.container).first(),0==i.container.length)return void w(1,"ERROR creating object ScrollMagic: No valid scroll container supplied");g=!$.contains(document,i.container.get(0)),u=i.vertical?i.container.height():i.container.width(),i.container.on("scroll resize",m);try{TweenLite.ticker.addEventListener("tick",v),d=!0}catch(e){i.container.on("scroll resize",v),d=!1}w(3,"added new "+t+" controller")},p=function(){return i.vertical?i.container.scrollTop():i.container.scrollLeft()},v=function(){if(a&&f){var e=$.isArray(a)?a:s,t=l;l=o.scrollPos();var n=l-t;c=0==n?"PAUSED":n>0?"FORWARD":"REVERSE",o.updateScene(e,!0),0==e.length&&i.loglevel>=3&&w(3,"updating 0 Scenes (nothing added to controller)"),a=!1}},m=function(e){"resize"==e.type&&(u=i.vertical?i.container.height():i.container.width()),a=!0},w=function(e){if(i.loglevel>=e){var r="("+t+") ->",o=Array.prototype.splice.call(arguments,1),s=Function.prototype.bind.call(n,window);o.unshift(e,r),s.apply(window,o)}};return this.addScene=function(e){return $.isArray(e)?$.each(e,function(e,t){o.addScene(t)}):e.parent()!=o?e.addTo(o):-1==$.inArray(s,e)&&(s.push(e),$.each(i.globalSceneOptions,function(t,n){e[t]&&e[t].call(e,n)}),w(3,"added Scene ("+s.length+" total)")),o},this.removeScene=function(e){if($.isArray(e))$.each(e,function(e,t){o.removeScene(t)});else{var t=$.inArray(e,s);t>-1&&(s.splice(t,1),e.remove(),w(3,"removed Scene ("+s.length+" total)"))}return o},this.updateScene=function(e,t){return $.isArray(e)?$.each(e,function(n,r){w(3,"updating Scene "+(n+1)+"/"+e.length+" ("+s.length+" total)"),o.updateScene(r,t)}):t?e.update(!0):($.isArray(a)||(a=[]),-1==$.inArray(e,a)&&a.push(e)),o},this.update=function(e){return m({type:"resize"}),e&&v(),o},this.scrollPos=function(e){return arguments.length?($.isFunction(e)||(e=function(){return e}),p=e,o):p.call(o)},this.info=function(e){var t={size:u,vertical:i.vertical,scrollPos:l,scrollDirection:c,container:i.container,isDocument:g};return arguments.length?void 0!==t[e]?t[e]:void w(1,'ERROR: option "'+e+'" is not available'):t},this.loglevel=function(e){return arguments.length?(i.loglevel!=e&&(i.loglevel=e),o):i.loglevel},this.enabled=function(e){return arguments.length?(f!=e&&(f=!!e,o.updateScene(s,!0)),o):f},this.destroy=function(e){for(;s.length>0;){var n=s[s.length-1];n.destroy(e)}return i.container.off("scroll resize",m),d?TweenLite.ticker.removeEventListener("tick",v):i.container.off("scroll resize",v),w(3,"destroyed "+t+" (reset: "+(e?"true":"false")+")"),null},h(),o},ScrollScene=function(e){"use strict";var t,o,i,s,a=["onCenter","onEnter","onLeave"],l="ScrollScene",c={duration:0,offset:0,triggerElement:null,triggerHook:a[0],reverse:!0,tweenChanges:!1,loglevel:2},g=this,u=$.extend({},c,e),d="BEFORE",f=0,h={start:0,end:0},p=!0,v=function(){w(),g.on("change.internal",function(e){w(),"loglevel"!=e.what&&"tweenChanges"!=e.what&&("reverse"!=e.what&&null===u.triggerElement&&R(),g.update(),("DURING"!==d&&"duration"==e.what||"AFTER"===d&&0==u.duration)&&y())}),g.on("progress.internal",function(){E(),y()})},m=function(e){if(u.loglevel>=e){var t="("+l+") ->",r=Array.prototype.splice.call(arguments,1),o=Function.prototype.bind.call(n,window);r.unshift(e,t),o.apply(window,r)}},w=function(){if($.each(u,function(e){c.hasOwnProperty(e)||(m(2,'WARNING: Unknown option "'+e+'"'),delete u[e])}),u.duration=parseFloat(u.duration),(!$.isNumeric(u.duration)||u.duration<0)&&(m(1,'ERROR: Invalid value for option "duration":',u.duration),u.duration=c.duration),u.offset=parseFloat(u.offset),$.isNumeric(u.offset)||(m(1,'ERROR: Invalid value for option "offset":',u.offset),u.offset=c.offset),null!=u.triggerElement&&0==$(u.triggerElement).length&&(m(1,'ERROR: Element defined in option "triggerElement" was not found:',u.triggerElement),u.triggerElement=c.triggerElement),$.isNumeric(u.triggerHook)||-1!=$.inArray(u.triggerHook,a)||(m(1,'ERROR: Invalid value for option "triggerHook": ',u.triggerHook),u.triggerHook=c.triggerHook),!$.isNumeric(u.loglevel)||u.loglevel<0||u.loglevel>3){var e=u.loglevel;u.loglevel=c.loglevel,m(1,'ERROR: Invalid value for option "loglevel":',e)}if(o&&t&&u.triggerElement&&u.loglevel>=2){var n=o.getTweensOf($(u.triggerElement)),r=t.info("vertical");$.each(n,function(e,t){var n=t.vars.css||t.vars,o=r?void 0!==n.top||void 0!==n.bottom:void 0!==n.left||void 0!==n.right;return o?(m(2,"WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!"),!1):void 0})}},R=function(){h={start:g.startPosition()},t&&(h.start-=t.info("size")*g.triggerHook()),h.end=h.start+u.duration},E=function(e){var t=e>=0&&1>=e?e:f;if(o){if(-1===o.repeat())if(("DURING"===d||"AFTER"===d&&0==u.duration)&&o.paused())o.play();else{if("DURING"===d||o.paused())return!1;o.pause()}else{if(t==o.progress())return!1;0==u.duration?"AFTER"==d?o.play():o.reverse():u.tweenChanges?o.tweenTo(t*o.duration()):o.progress(t).pause()}return!0}return!1},y=function(e){if(i&&t){var n=t.info();if(e||"DURING"!==d&&("AFTER"!==d||0!=u.duration)){var o={position:"absolute"==s.origStyle.position?"absolute":"relative",top:0,left:0},a=i.css("position")!=o.position;s.pushFollowers?"AFTER"===d&&0==parseFloat(s.spacer.css("padding-top"))?a=!0:"BEFORE"===d&&0==parseFloat(s.spacer.css("padding-bottom"))&&(a=!0):o[n.vertical?"top":"left"]=u.duration*f,i.css(o),a&&S()}else{"fixed"!=i.css("position")&&(i.css("position","fixed"),S());var l=r(s.spacer,!0),c=u.reverse||0==u.duration?n.scrollPos-h.start:Math.round(f*u.duration*10)/10;l.top-=parseFloat(s.spacer.css("margin-top")),l[n.vertical?"top":"left"]+=c,i.css({top:l.top,left:l.left})}}},S=function(){if(i&&t&&"absolute"!=s.origStyle.position){var e="AFTER"===d,n="BEFORE"===d,r="DURING"===d,o="fixed"==i.css("position"),a=t.info("vertical"),l=s.spacer.children().first(),c=$.inArray(s.spacer.css("display"),["block","flex","list-item","table","-webkit-box"])>-1,g={};c?(g["margin-top"]=n||r&&o?i.css("margin-top"):"auto",g["margin-bottom"]=e||r&&o?i.css("margin-bottom"):"auto"):g["margin-top"]=g["margin-bottom"]="auto",s.relSize.width?i.css("width",o?s.spacer.width():"100%"):(g["min-width"]=l.outerWidth(!0),g.width=o?g["min-width"]:"auto"),s.relSize.height?i.css("height",o?s.spacer.height():"100%"):(g["min-height"]=l.outerHeight(!c),g.height=o?g["min-height"]:"auto"),s.pushFollowers&&(g["padding"+(a?"Top":"Left")]=u.duration*f,g["padding"+(a?"Bottom":"Right")]=u.duration*(1-f)),s.spacer.css(g)}},b=function(){t&&i&&"DURING"===d&&(t.info("isDocument")||y())},F=function(){t&&i&&"DURING"===d&&(s.relSize.width||s.relSize.height)&&S()};return this.parent=function(){return t},this.duration=function(e){return arguments.length?(u.duration!=e&&(u.duration=e,g.trigger("change",{what:"duration",newval:e})),g):u.duration},this.offset=function(e){return arguments.length?(u.offset!=e&&(u.offset=e,g.trigger("change",{what:"offset",newval:e})),g):u.offset},this.triggerElement=function(e){return arguments.length?(u.triggerElement!=e&&(u.triggerElement=e,g.trigger("change",{what:"triggerElement",newval:e})),g):u.triggerElement},this.triggerHook=function(e){if(!arguments.length){var t;if($.isNumeric(u.triggerHook))t=u.triggerHook;else switch(u.triggerHook){case"onCenter":t=.5;break;case"onLeave":t=0;break;case"onEnter":default:t=1}return t}return u.triggerHook!=e&&(u.triggerHook=e,g.trigger("change",{what:"triggerHook",newval:e})),g},this.reverse=function(e){return arguments.length?(u.reverse!=e&&(u.reverse=e,g.trigger("change",{what:"reverse",newval:e})),g):u.reverse},this.tweenChanges=function(e){return arguments.length?(u.tweenChanges!=e&&(u.tweenChanges=e,g.trigger("change",{what:"tweenChanges",newval:e})),g):u.tweenChanges},this.loglevel=function(e){return arguments.length?(u.loglevel!=e&&(u.loglevel=e,g.trigger("change",{what:"loglevel",newval:e})),g):u.loglevel},this.state=function(){return d},this.startPosition=function(){var e=u.offset;if(t){var n=t.info();if(null===u.triggerElement)e+=n.size*g.triggerHook();else{for(var o=$(u.triggerElement).first(),i=r(t.info("container"));o.parent().data("ScrollMagicPinSpacer");)o=o.parent();var s=r(o);n.isDocument||(i.top-=n.scrollPos,i.left-=n.scrollPos),e+=n.vertical?s.top-i.top:s.left-i.left}}return e},this.update=function(e){if(t)if(e)if(t.enabled()&&p){var n,r=t.info("scrollPos");null!==u.triggerElement&&R(),n=u.duration>0?(r-h.start)/(h.end-h.start):r>=h.start?1:0,g.trigger("update",{startPos:h.start,endPos:h.end,scrollPos:r}),g.progress(n)}else i&&"fixed"==i.css("position")&&y(!0);else t.updateScene(g,!1);return g},this.progress=function(e){if(arguments.length){var n=!1,r=d,o=t?t.info("scrollDirection"):"PAUSED";if(0>=e&&"BEFORE"!==d&&(e>=f||u.reverse)?(f=0,d="BEFORE",n=!0):e>0&&1>e&&(e>=f||u.reverse)?(f=e,d="DURING",n=!0):e>=1&&"AFTER"!==d?(f=1,d="AFTER",n=!0):"DURING"!==d||u.reverse||y(),n){var i={progress:f,state:d,scrollDirection:o},s=d!=r,a="BEFORE"===d&&0==u.duration;s&&(("DURING"===d||0==u.duration)&&g.trigger("enter",i),("BEFORE"===d||"BEFORE"===r)&&g.trigger(a?"end":"start",i)),g.trigger("progress",i),s&&(("AFTER"===d||"AFTER"===r)&&g.trigger(a?"start":"end",i),("DURING"!==d||0==u.duration)&&g.trigger("leave",i))}return g}return f},this.setTween=function(e){o&&g.removeTween();try{o=new TimelineMax({smoothChildTiming:!0}).add(e).pause()}catch(e){m(1,"ERROR calling method 'setTween()': Supplied argument is not a valid TweenMaxObject")}finally{return e.repeat&&-1===e.repeat()&&(o.repeat(-1),o.yoyo(e.yoyo())),w(),m(3,"added tween"),E(),g}},this.removeTween=function(e){return o&&(e&&E(0),o.kill(),o=void 0,m(3,"removed tween (reset: "+(e?"true":"false")+")")),g},this.setPin=function(e,t){var n={pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"},t=$.extend({},n,t);if(e=$(e).first(),0==e.length)return m(1,"ERROR calling method 'setPin()': Invalid pin element supplied."),g;if(i){if(i===e)return g;g.removePin()}i=e,i.parent().hide();var r=i.css(["position","display","top","left","bottom","right"]),o=i.css(["width","height"]);if(i.parent().show(),"fixed"==r.position)return m(1,"ERROR: Pin does not work with elements that are positioned 'fixed'."),i=void 0,g;var a=$("").addClass(t.spacerClass).css(r).data("ScrollMagicPinSpacer",!0).css({position:"absolute"==r.position?"absolute":"relative","margin-left":"auto","margin-right":"auto","box-sizing":"content-box","-moz-box-sizing":"content-box","-webkit-box-sizing":"content-box"});return"absolute"==r.position&&t.pushFollowers&&(m(2,"WARNING: If the pinned element is positioned absolutely pushFollowers is disabled."),t.pushFollowers=!1),s={spacer:a,relSize:{width:"%"===o.width.slice(-1),height:"%"===o.height.slice(-1)},pushFollowers:t.pushFollowers,origStyle:r},s.relSize.width&&a.css("width",o.width),s.relSize.height&&a.css("height",o.height),i.before(a).appendTo(a).css({position:"absolute"==r.position?"absolute":"relative",top:"auto",left:"auto",bottom:"auto",right:"auto"}),$(window).on("scroll resize",b),m(3,"added pin"),y(),g},this.removePin=function(e){return i&&(e||!t?(i.insertBefore(s.spacer).css(s.origStyle),s.spacer.remove()):"DURING"===d&&y(!0),$(window).off("scroll resize",b),i=void 0,m(3,"removed pin (reset: "+(e?"true":"false")+")")),g},this.addTo=function(e){return t!=e?(t&&t.removeScene(g),t=e,w(),R(),S(),t.info("container").on("resize",F),m(3,"added "+l+" to controller"),e.addScene(g),g.update(),g):void 0},this.enabled=function(e){return arguments.length?(p!=e&&(p=!!e,g.update(!0)),g):p},this.remove=function(){if(t){t.info("container").off("resize",F);var e=t;t=void 0,m(3,"removed "+l+" from controller"),e.removeScene(g)}return g},this.destroy=function(e){return this.removeTween(e),this.removePin(e),this.remove(),this.off("start end enter leave progress change update change.internal progress.internal"),m(3,"destroyed "+l+" (reset: "+(e?"true":"false")+")"),null},this.on=function(e,t){if($.isFunction(t)){var n=$.trim(e).toLowerCase().replace(/(\w+)\.(\w+)/g,"$1."+l+"_$2").replace(/( |^)(\w+)( |$)/g,"$1$2."+l+"$3");$(g).on(n,t)}else m(1,"ERROR calling method 'on()': Supplied argument is not a valid callback!");return g},this.off=function(e,t){var n=$.trim(e).toLowerCase().replace(/(\w+)\.(\w+)/g,"$1."+l+"_$2").replace(/( |^)(\w+)( |$)/g,"$1$2."+l+"$3");return $(g).off(n,t),g},this.trigger=function(e,t){m(3,"event fired:",e,"->",t);var n={type:$.trim(e).toLowerCase(),target:g};return $.isPlainObject(t)&&(n=$.extend({},t,n)),$(g).trigger(n),g},v(),g};var e=window.console=window.console||{},t=["error","warn","log"];e.log||(e.log=$.noop),$.each(t,function(t,n){e[n]||(e[n]=e.log)});var n=function(n){(n>t.length||0>=n)&&(n=t.length);var r=new Date,o=("0"+r.getHours()).slice(-2)+":"+("0"+r.getMinutes()).slice(-2)+":"+("0"+r.getSeconds()).slice(-2)+":"+("00"+r.getMilliseconds()).slice(-3),i=t[n-1],s=Array.prototype.splice.call(arguments,1),a=Function.prototype.bind.call(e[i],e);s.unshift(o),a.apply(e,s)},r=function(e,t){var n={top:0,left:0},r=e[0];if(r)if(r.getBoundingClientRect){var o=r.getBoundingClientRect();n.top=o.top,n.left=o.left,t||(n.top+=$(document).scrollTop(),n.left+=$(document).scrollLeft())}else n=e.offset()||n,t&&(n.top-=$(document).scrollTop(),n.left-=$(document).scrollLeft());return n}}(jQuery);
\ No newline at end of file
+/* ScrollMagic v1.0.6 | (c) Jan Paepke, @janpaepke | license & info: http://janpaepke.github.io/ScrollMagic */
+!function($){ScrollMagic=function(e){"use strict";var t="ScrollMagic",n={container:window,vertical:!0,globalSceneOptions:{},loglevel:2},i=this,o=$.extend({},n,e),s=[],a=!1,l=0,c="PAUSED",g=!0,u=0,d=!1,f=!0,h=function(){if($.each(o,function(e){n.hasOwnProperty(e)||(m(2,'WARNING: Unknown option "'+e+'"'),delete o[e])}),o.container=$(o.container).first(),0==o.container.length)return void m(1,"ERROR creating object ScrollMagic: No valid scroll container supplied");g=!$.contains(document,o.container.get(0)),u=o.vertical?o.container.height():o.container.width(),o.container.on("scroll resize",w);try{TweenLite.ticker.addEventListener("tick",v),d=!0}catch(e){o.container.on("scroll resize",v),d=!1}m(3,"added new "+t+" controller")},p=function(){return o.vertical?o.container.scrollTop():o.container.scrollLeft()},v=function(){if(a&&f){var e=$.isArray(a)?a:s,t=l;l=i.scrollPos();var r=l-t;c=0==r?"PAUSED":r>0?"FORWARD":"REVERSE",i.updateScene(e,!0),0==e.length&&o.loglevel>=3&&m(3,"updating 0 Scenes (nothing added to controller)"),a=!1}},w=function(e){"resize"==e.type&&(u=o.vertical?o.container.height():o.container.width()),a=!0},m=function(e){if(o.loglevel>=e){var n="("+t+") ->",i=Array.prototype.splice.call(arguments,1),s=Function.prototype.bind.call(r,window);i.unshift(e,n),s.apply(window,i)}};return this.addScene=function(e){return $.isArray(e)?$.each(e,function(e,t){i.addScene(t)}):e.parent()!=i?e.addTo(i):-1==$.inArray(s,e)&&(s.push(e),$.each(o.globalSceneOptions,function(t,r){e[t]&&e[t].call(e,r)}),m(3,"added Scene ("+s.length+" total)")),i},this.removeScene=function(e){if($.isArray(e))$.each(e,function(e,t){i.removeScene(t)});else{var t=$.inArray(e,s);t>-1&&(s.splice(t,1),e.remove(),m(3,"removed Scene ("+s.length+" total)"))}return i},this.updateScene=function(e,t){return $.isArray(e)?$.each(e,function(r,n){m(3,"updating Scene "+(r+1)+"/"+e.length+" ("+s.length+" total)"),i.updateScene(n,t)}):t?e.update(!0):($.isArray(a)||(a=[]),-1==$.inArray(e,a)&&a.push(e)),i},this.update=function(e){return w({type:"resize"}),e&&v(),i},this.scrollPos=function(e){return arguments.length?($.isFunction(e)||(e=function(){return e}),p=e,i):p.call(i)},this.info=function(e){var t={size:u,vertical:o.vertical,scrollPos:l,scrollDirection:c,container:o.container,isDocument:g};return arguments.length?void 0!==t[e]?t[e]:void m(1,'ERROR: option "'+e+'" is not available'):t},this.loglevel=function(e){return arguments.length?(o.loglevel!=e&&(o.loglevel=e),i):o.loglevel},this.enabled=function(e){return arguments.length?(f!=e&&(f=!!e,i.updateScene(s,!0)),i):f},this.destroy=function(e){for(;s.length>0;){var r=s[s.length-1];r.destroy(e)}return o.container.off("scroll resize",w),d?TweenLite.ticker.removeEventListener("tick",v):o.container.off("scroll resize",v),m(3,"destroyed "+t+" (reset: "+(e?"true":"false")+")"),null},h(),i},ScrollScene=function(e){"use strict";var t,i,o,s,a=["onCenter","onEnter","onLeave"],l="ScrollScene",c={duration:0,offset:0,triggerElement:null,triggerHook:a[0],reverse:!0,tweenChanges:!1,loglevel:2},g=this,u=$.extend({},c,e),d="BEFORE",f=0,h={start:0,end:0},p=!0,v=function(){m(),g.on("change.internal",function(e){m(),"loglevel"!=e.what&&"tweenChanges"!=e.what&&("reverse"!=e.what&&null===u.triggerElement&&R(),g.update(),("DURING"!==d&&"duration"==e.what||"AFTER"===d&&0==u.duration)&&y())}),g.on("progress.internal",function(){E(),y()})},w=function(e){if(u.loglevel>=e){var t="("+l+") ->",n=Array.prototype.splice.call(arguments,1),i=Function.prototype.bind.call(r,window);n.unshift(e,t),i.apply(window,n)}},m=function(){if($.each(u,function(e){c.hasOwnProperty(e)||(w(2,'WARNING: Unknown option "'+e+'"'),delete u[e])}),u.duration=parseFloat(u.duration),(!$.isNumeric(u.duration)||u.duration<0)&&(w(1,'ERROR: Invalid value for option "duration":',u.duration),u.duration=c.duration),u.offset=parseFloat(u.offset),$.isNumeric(u.offset)||(w(1,'ERROR: Invalid value for option "offset":',u.offset),u.offset=c.offset),null!=u.triggerElement&&0==$(u.triggerElement).length&&(w(1,'ERROR: Element defined in option "triggerElement" was not found:',u.triggerElement),u.triggerElement=c.triggerElement),$.isNumeric(u.triggerHook)||-1!=$.inArray(u.triggerHook,a)||(w(1,'ERROR: Invalid value for option "triggerHook": ',u.triggerHook),u.triggerHook=c.triggerHook),!$.isNumeric(u.loglevel)||u.loglevel<0||u.loglevel>3){var e=u.loglevel;u.loglevel=c.loglevel,w(1,'ERROR: Invalid value for option "loglevel":',e)}if(i&&t&&u.triggerElement&&u.loglevel>=2){var r=i.getTweensOf($(u.triggerElement)),n=t.info("vertical");$.each(r,function(e,t){var r=t.vars.css||t.vars,i=n?void 0!==r.top||void 0!==r.bottom:void 0!==r.left||void 0!==r.right;return i?(w(2,"WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!"),!1):void 0})}},R=function(){h={start:g.startPosition()},t&&(h.start-=t.info("size")*g.triggerHook()),h.end=h.start+u.duration},E=function(e){var t=e>=0&&1>=e?e:f;if(i){if(-1===i.repeat())if(("DURING"===d||"AFTER"===d&&0==u.duration)&&i.paused())i.play();else{if("DURING"===d||i.paused())return!1;i.pause()}else{if(t==i.progress())return!1;0==u.duration?"AFTER"==d?i.play():i.reverse():u.tweenChanges?i.tweenTo(t*i.duration()):i.progress(t).pause()}return!0}return!1},y=function(e){if(o&&t){var r=t.info();if(e||"DURING"!==d&&("AFTER"!==d||0!=u.duration)){var i={position:s.inFlow?"relative":"absolute",top:0,left:0},a=o.css("position")!=i.position;s.pushFollowers?"AFTER"===d&&0==parseFloat(s.spacer.css("padding-top"))?a=!0:"BEFORE"===d&&0==parseFloat(s.spacer.css("padding-bottom"))&&(a=!0):i[r.vertical?"top":"left"]=u.duration*f,o.css(i),a&&S()}else{"fixed"!=o.css("position")&&(o.css("position","fixed"),S());var l=n(s.spacer,!0),c=u.reverse||0==u.duration?r.scrollPos-h.start:Math.round(f*u.duration*10)/10;l.top-=parseFloat(s.spacer.css("margin-top")),l[r.vertical?"top":"left"]+=c,o.css({top:l.top,left:l.left})}}},S=function(){if(o&&t&&s.inFlow){var e="AFTER"===d,r="BEFORE"===d,n="DURING"===d,i="fixed"==o.css("position"),a=t.info("vertical"),l=s.spacer.children().first(),c=$.inArray(s.spacer.css("display"),["block","flex","list-item","table","-webkit-box"])>-1,g={};c?(g["margin-top"]=r||n&&i?o.css("margin-top"):"auto",g["margin-bottom"]=e||n&&i?o.css("margin-bottom"):"auto"):g["margin-top"]=g["margin-bottom"]="auto",s.relSize.width?i?$(window).width()==s.spacer.parent().width()?o.css("width","inherit"):o.css("width",s.spacer.width()):o.css("width","100%"):(g["min-width"]=l.outerWidth(!0),g.width=i?g["min-width"]:"auto"),s.relSize.height?i?$(window).height()==s.spacer.parent().height()?o.css("height","inherit"):o.css("height",s.spacer.height()):o.css("height","100%"):(g["min-height"]=l.outerHeight(!c),g.height=i?g["min-height"]:"auto"),s.pushFollowers&&(g["padding"+(a?"Top":"Left")]=u.duration*f,g["padding"+(a?"Bottom":"Right")]=u.duration*(1-f)),s.spacer.css(g)}},b=function(){t&&o&&"DURING"===d&&(t.info("isDocument")||y())},F=function(){t&&o&&("DURING"===d||"AFTER"===d&&0==u.duration)&&(s.relSize.width&&$(window).width()!=s.spacer.parent().width()||s.relSize.height&&$(window).height()!=s.spacer.parent().height())&&S()};return this.parent=function(){return t},this.duration=function(e){return arguments.length?(u.duration!=e&&(u.duration=e,g.trigger("change",{what:"duration",newval:e})),g):u.duration},this.offset=function(e){return arguments.length?(u.offset!=e&&(u.offset=e,g.trigger("change",{what:"offset",newval:e})),g):u.offset},this.triggerElement=function(e){return arguments.length?(u.triggerElement!=e&&(u.triggerElement=e,g.trigger("change",{what:"triggerElement",newval:e})),g):u.triggerElement},this.triggerHook=function(e){if(!arguments.length){var t;if($.isNumeric(u.triggerHook))t=u.triggerHook;else switch(u.triggerHook){case"onCenter":t=.5;break;case"onLeave":t=0;break;case"onEnter":default:t=1}return t}return u.triggerHook!=e&&(u.triggerHook=e,g.trigger("change",{what:"triggerHook",newval:e})),g},this.reverse=function(e){return arguments.length?(u.reverse!=e&&(u.reverse=e,g.trigger("change",{what:"reverse",newval:e})),g):u.reverse},this.tweenChanges=function(e){return arguments.length?(u.tweenChanges!=e&&(u.tweenChanges=e,g.trigger("change",{what:"tweenChanges",newval:e})),g):u.tweenChanges},this.loglevel=function(e){return arguments.length?(u.loglevel!=e&&(u.loglevel=e,g.trigger("change",{what:"loglevel",newval:e})),g):u.loglevel},this.state=function(){return d},this.startPosition=function(){var e=u.offset;if(t){var r=t.info();if(null===u.triggerElement)e+=r.size*g.triggerHook();else{for(var i=$(u.triggerElement).first(),o=n(t.info("container"));i.parent().data("ScrollMagicPinSpacer");)i=i.parent();var s=n(i);r.isDocument||(o.top-=r.scrollPos,o.left-=r.scrollPos),e+=r.vertical?s.top-o.top:s.left-o.left}}return e},this.update=function(e){if(t)if(e)if(t.enabled()&&p){var r,n=t.info("scrollPos");null!==u.triggerElement&&R(),r=u.duration>0?(n-h.start)/(h.end-h.start):n>=h.start?1:0,g.trigger("update",{startPos:h.start,endPos:h.end,scrollPos:n}),g.progress(r)}else o&&"fixed"==o.css("position")&&y(!0);else t.updateScene(g,!1);return g},this.progress=function(e){if(arguments.length){var r=!1,n=d,i=t?t.info("scrollDirection"):"PAUSED";if(0>=e&&"BEFORE"!==d&&(e>=f||u.reverse)?(f=0,d="BEFORE",r=!0):e>0&&1>e&&(e>=f||u.reverse)?(f=e,d="DURING",r=!0):e>=1&&"AFTER"!==d?(f=1,d="AFTER",r=!0):"DURING"!==d||u.reverse||y(),r){var o={progress:f,state:d,scrollDirection:i},s=d!=n,a="BEFORE"===d&&0==u.duration;s&&(("DURING"===d||0==u.duration)&&g.trigger("enter",o),("BEFORE"===d||"BEFORE"===n)&&g.trigger(a?"end":"start",o)),g.trigger("progress",o),s&&(("AFTER"===d||"AFTER"===n)&&g.trigger(a?"start":"end",o),("DURING"!==d||0==u.duration)&&g.trigger("leave",o))}return g}return f},this.setTween=function(e){i&&g.removeTween();try{i=new TimelineMax({smoothChildTiming:!0}).add(e).pause()}catch(e){w(1,"ERROR calling method 'setTween()': Supplied argument is not a valid TweenMaxObject")}finally{return e.repeat&&-1===e.repeat()&&(i.repeat(-1),i.yoyo(e.yoyo())),m(),w(3,"added tween"),E(),g}},this.removeTween=function(e){return i&&(e&&E(0),i.kill(),i=void 0,w(3,"removed tween (reset: "+(e?"true":"false")+")")),g},this.setPin=function(e,t){var r={pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"},t=$.extend({},r,t);if(e=$(e).first(),0==e.length)return w(1,"ERROR calling method 'setPin()': Invalid pin element supplied."),g;if("fixed"==e.css("position"))return w(1,"ERROR: Pin does not work with elements that are positioned 'fixed'."),g;if(o){if(o===e)return g;g.removePin()}o=e,o.parent().hide();var n="absolute"!=o.css("position"),i=o.css(["display","top","left","bottom","right"]),a=o.css(["width","height"]);o.parent().show();var l=$("").addClass(t.spacerClass).css(i).data("ScrollMagicPinSpacer",!0).css({position:n?"relative":"absolute","margin-left":"auto","margin-right":"auto","box-sizing":"content-box","-moz-box-sizing":"content-box","-webkit-box-sizing":"content-box"});return!n&&t.pushFollowers&&(w(2,"WARNING: If the pinned element is positioned absolutely pushFollowers is disabled."),t.pushFollowers=!1),s={spacer:l,relSize:{width:"%"===a.width.slice(-1),height:"%"===a.height.slice(-1)},pushFollowers:t.pushFollowers,inFlow:n,origStyle:o.attr("style")},s.relSize.width&&l.css("width",a.width),s.relSize.height&&l.css("height",a.height),o.before(l).appendTo(l).css({position:n?"relative":"absolute",top:"auto",left:"auto",bottom:"auto",right:"auto"}),$(window).on("scroll resize",b),w(3,"added pin"),y(),g},this.removePin=function(e){return o&&(e||!t?(o.insertBefore(s.spacer).attr("style",s.origStyle),s.spacer.remove()):"DURING"===d&&y(!0),$(window).off("scroll resize",b),o=void 0,w(3,"removed pin (reset: "+(e?"true":"false")+")")),g},this.addTo=function(e){return t!=e?(t&&t.removeScene(g),t=e,m(),R(),S(),t.info("container").on("resize",F),w(3,"added "+l+" to controller"),e.addScene(g),g.update(),g):void 0},this.enabled=function(e){return arguments.length?(p!=e&&(p=!!e,g.update(!0)),g):p},this.remove=function(){if(t){t.info("container").off("resize",F);var e=t;t=void 0,w(3,"removed "+l+" from controller"),e.removeScene(g)}return g},this.destroy=function(e){return this.removeTween(e),this.removePin(e),this.remove(),this.off("start end enter leave progress change update change.internal progress.internal"),w(3,"destroyed "+l+" (reset: "+(e?"true":"false")+")"),null},this.on=function(e,t){if($.isFunction(t)){var r=$.trim(e).toLowerCase().replace(/(\w+)\.(\w+)/g,"$1."+l+"_$2").replace(/( |^)(\w+)( |$)/g,"$1$2."+l+"$3");$(g).on(r,t)}else w(1,"ERROR calling method 'on()': Supplied argument is not a valid callback!");return g},this.off=function(e,t){var r=$.trim(e).toLowerCase().replace(/(\w+)\.(\w+)/g,"$1."+l+"_$2").replace(/( |^)(\w+)( |$)/g,"$1$2."+l+"$3");return $(g).off(r,t),g},this.trigger=function(e,t){w(3,"event fired:",e,"->",t);var r={type:$.trim(e).toLowerCase(),target:g};return $.isPlainObject(t)&&(r=$.extend({},t,r)),$(g).trigger(r),g},v(),g};var e=window.console=window.console||{},t=["error","warn","log"];e.log||(e.log=$.noop),$.each(t,function(t,r){e[r]||(e[r]=e.log)});var r=function(r){(r>t.length||0>=r)&&(r=t.length);var n=new Date,i=("0"+n.getHours()).slice(-2)+":"+("0"+n.getMinutes()).slice(-2)+":"+("0"+n.getSeconds()).slice(-2)+":"+("00"+n.getMilliseconds()).slice(-3),o=t[r-1],s=Array.prototype.splice.call(arguments,1),a=Function.prototype.bind.call(e[o],e);s.unshift(i),a.apply(e,s)},n=function(e,t){var r={top:0,left:0},n=e[0];if(n)if(n.getBoundingClientRect){var i=n.getBoundingClientRect();r.top=i.top,r.left=i.left,t||(r.top+=$(document).scrollTop(),r.left+=$(document).scrollLeft())}else r=e.offset()||r,t&&(r.top-=$(document).scrollTop(),r.left-=$(document).scrollLeft());return r}}(jQuery);
\ No newline at end of file