/*!
 * ScrollMagic v2.0.0 (2015-02-26)
 * The javascript library for magical scroll interactions.
 * (c) 2015 Jan Paepke (@janpaepke)
 * Project Website: http://janpaepke.github.io/ScrollMagic
 * 
 * @version 2.0.0
 * @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(root,factory){typeof define=="function"&&define.amd?define(["ScrollMagic","TweenMax","TimelineMax"],factory):factory(root.ScrollMagic||root.jQuery&&root.jQuery.ScrollMagic,root.TweenMax||root.TweenLite,root.TimelineMax||root.TimelineLite)})(this,function(ScrollMagic,Tween,Timeline){"use strict";var NAMESPACE="animation.gsap",err=Function.prototype.bind.call(console&&(console.error||console.log)||function(){},console);ScrollMagic||err("("+NAMESPACE+") -> 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."),Tween||err("("+NAMESPACE+") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs."),ScrollMagic.Scene.addOption("tweenChanges",!1,function(val){return!!val}),ScrollMagic.Scene.extend(function(){var Scene=this,_tween,log=function(){Scene._log&&(Array.prototype.splice.call(arguments,1,0,"("+NAMESPACE+")","->"),Scene._log.apply(this,arguments))};Scene.on("progress.plugin_gsap",function(){updateTweenProgress()}),Scene.on("destroy.plugin_gsap",function(e){Scene.removeTween(e.reset)});var updateTweenProgress=function(){if(_tween){var progress=Scene.progress(),state=Scene.state();_tween.repeat&&_tween.repeat()===-1?state==="DURING"&&_tween.paused()?_tween.play():state!=="DURING"&&!_tween.paused()&&_tween.pause():progress!=_tween.progress()&&(Scene.duration()===0?progress>0?_tween.play():_tween.reverse():Scene.tweenChanges()&&_tween.tweenTo?_tween.tweenTo(progress*_tween.duration()):_tween.progress(progress).pause())}};Scene.setTween=function(TweenObject,duration,params){var newTween;arguments.length>1&&(arguments.length<3&&(params=duration,duration=1),TweenObject=Tween.to(TweenObject,duration,params));try{Timeline?newTween=new Timeline({smoothChildTiming:!0}).add(TweenObject):newTween=TweenObject,newTween.pause()}catch(e){return log(1,"ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject"),Scene}if(_tween&&Scene.removeTween(),_tween=newTween,TweenObject.repeat&&TweenObject.repeat()===-1&&(_tween.repeat(-1),_tween.yoyo(TweenObject.yoyo())),Scene.tweenChanges()&&!_tween.tweenTo&&log(2,"WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic."),_tween&&Scene.controller()&&Scene.triggerElement()&&Scene.loglevel()>=2){var triggerTweens=Tween.getTweensOf(Scene.triggerElement()),vertical=Scene.controller().info("vertical");triggerTweens.forEach(function(value,index){var tweenvars=value.vars.css||value.vars,condition=vertical?tweenvars.top!==void 0||tweenvars.bottom!==void 0:tweenvars.left!==void 0||tweenvars.right!==void 0;if(condition)return log(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 list=_tween.getChildren?_tween.getChildren(!0,!0,!1):[_tween],newCallback=function(){log(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")},i=0,thisTween,oldCallback;i<list.length;i++)thisTween=list[i],oldCallback!==newCallback&&(oldCallback=thisTween.vars.onOverwrite,thisTween.vars.onOverwrite=function(){oldCallback&&oldCallback.apply(this,arguments),newCallback.apply(this,arguments)});return log(3,"added tween"),updateTweenProgress(),Scene},Scene.removeTween=function(reset){return _tween&&(reset&&_tween.progress(0).pause(),_tween.kill(),_tween=void 0,log(3,"removed tween (reset: "+(reset?"true":"false")+")")),Scene}})});
//# sourceMappingURL=/cdn/shop/t/129/assets/animation.gsap.js.map?v=126884475224762214881735288691
