/*! * ScrollMagic v2.0.5 (2015-04-29) * The javascript library for magical scroll interactions. * (c) 2015 Jan Paepke (@janpaepke) * Project Website: http://scrollmagic.io * * @version 2.0.5 * @license Dual licensed under MIT license and GPL. * @author Jan Paepke - e-mail@janpaepke.de * * @file ScrollMagic GSAP Animation Plugin. * * requires: GSAP ~1.14 * Powered by the Greensock Animation Platform (GSAP): http://www.greensock.com/js * Greensock License info at http://www.greensock.com/licensing/ */ !function(e,n){"function"==typeof define&&define.amd?define(["ScrollMagic","TweenMax","TimelineMax"],n):"object"==typeof exports?(require("gsap"),n(require("scrollmagic"),TweenMax,TimelineMax)):n(e.ScrollMagic||e.jQuery&&e.jQuery.ScrollMagic,e.TweenMax||e.TweenLite,e.TimelineMax||e.TimelineLite)}(this,function(e,n,t){"use strict";var r="animation.gsap",o=window.console||{},i=Function.prototype.bind.call(o.error||o.log||function(){},o);e||i("("+r+") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs."),n||i("("+r+") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs."),e.Scene.addOption("tweenChanges",!1,function(e){return!!e}),e.Scene.extend(function(){var e,o=this,i=function(){o._log&&(Array.prototype.splice.call(arguments,1,0,"("+r+")","->"),o._log.apply(this,arguments))};o.on("progress.plugin_gsap",function(){a()}),o.on("destroy.plugin_gsap",function(e){o.removeTween(e.reset)});var a=function(){if(e){var n=o.progress(),t=o.state();e.repeat&&-1===e.repeat()?"DURING"===t&&e.paused()?e.play():"DURING"===t||e.paused()||e.pause():n!=e.progress()&&(0===o.duration()?n>0?e.play():e.reverse():o.tweenChanges()&&e.tweenTo?e.tweenTo(n*e.duration()):e.progress(n).pause())}};o.setTween=function(r,l,s){var u;arguments.length>1&&(arguments.length<3&&(s=l,l=1),r=n.to(r,l,s));try{u=t?new t({smoothChildTiming:!0}).add(r):r,u.pause()}catch(e){return i(1,"ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject"),o}if(e&&o.removeTween(),e=u,r.repeat&&-1===r.repeat()&&(e.repeat(-1),e.yoyo(r.yoyo())),o.tweenChanges()&&!e.tweenTo&&i(2,"WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic."),e&&o.controller()&&o.triggerElement()&&o.loglevel()>=2){var c=n.getTweensOf(o.triggerElement()),d=o.controller().info("vertical");c.forEach(function(e){var n=e.vars.css||e.vars;if(d?n.top!==undefined||n.bottom!==undefined:n.left!==undefined||n.right!==undefined)return i(2,"WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!"),!1})}if(parseFloat(TweenLite.version)>=1.14)for(var p,g,f=e.getChildren?e.getChildren(!0,!0,!1):[e],w=function(){i(2,"WARNING: tween was overwritten by another. To learn how to avoid this issue see here: https://github.com/janpaepke/ScrollMagic/wiki/WARNING:-tween-was-overwritten-by-another")},h=0;h