/*! ScrollMagic v2.0.5 | (c) 2015 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */ !function(n,t){"function"==typeof define&&define.amd?define(["ScrollMagic"],t):t("object"==typeof exports?require("scrollmagic"):n.ScrollMagic||n.jQuery&&n.jQuery.ScrollMagic)}(this,function(n){"use strict";var u="0.85em",f="9999",r=15,t=n._util,e=0,o,i;n.Scene.extend(function(){var i,n=this;n.addIndicators=function(r){if(!i)r=t.extend({},{name:"",indent:0,parent:void 0,colorStart:"green",colorEnd:"red",colorTrigger:"blue"},r),e++,i=new o(n,r),n.on("add.plugin_addIndicators",i.add),n.on("remove.plugin_addIndicators",i.remove),n.on("destroy.plugin_addIndicators",n.removeIndicators),n.controller()&&i.add();return n};n.removeIndicators=function(){return i&&(i.remove(),this.off("*.plugin_addIndicators"),i=void 0),n}});n.Controller.addOption("addIndicators",!1);n.Controller.extend(function(){var s=this,c=s.info(),i=c.container,h=c.isDocument,u=c.vertical,e={groups:[]},o,f;return this._indicators=e,o=function(){e.updateBoundsPositions()},f=function(){e.updateTriggerGroupPositions()},i.addEventListener("resize",f),h||(window.addEventListener("resize",f),window.addEventListener("scroll",f)),i.addEventListener("resize",o),i.addEventListener("scroll",o),this._indicators.updateBoundsPositions=function(n){for(var o,s,f,h=n?[t.extend({},n.triggerGroup,{members:[n]})]:e.groups,c=h.length,l={},a=u?"left":"top",v=u?"width":"height",y=u?t.get.scrollLeft(i)+t.get.width(i)-r:t.get.scrollTop(i)+t.get.height(i)-r;c--;)for(f=h[c],o=f.members.length,s=t.get[v](f.element.firstChild);o--;)l[a]=y-s,t.css(f.members[o].bounds,l)},this._indicators.updateTriggerGroupPositions=function(n){for(var f,o,c,a,l,v=n?[n]:e.groups,y=v.length,b=h?document.body:i,p=h?{top:0,left:0}:t.get.offset(b,!0),w=u?t.get.width(i)-r:t.get.height(i)-r,k=u?"width":"height",d=u?"Y":"X";y--;)f=v[y],o=f.element,c=f.triggerHook*s.info("size"),a=t.get[k](o.firstChild.firstChild),l=c>a?"translate"+d+"(-100%)":"",t.css(o,{top:p.top+(u?c:w-f.members[0].options.indent),left:p.left+(u?w-f.members[0].options.indent:c)}),t.css(o.firstChild.firstChild,{"-ms-transform":l,"-webkit-transform":l,transform:l})},this._indicators.updateTriggerGroupLabel=function(n){var t="trigger"+(n.members.length>1?"":" "+n.members[0].options.name),i=n.element.firstChild.firstChild,r=i.textContent!==t;r&&(i.textContent=t,u&&e.updateBoundsPositions())},this.addScene=function(t){this._options.addIndicators&&t instanceof n.Scene&&t.controller()===s&&t.addIndicators();this.$super.addScene.apply(this,arguments)},this.destroy=function(){i.removeEventListener("resize",f);h||(window.removeEventListener("resize",f),window.removeEventListener("scroll",f));i.removeEventListener("resize",o);i.removeEventListener("scroll",o);this.$super.destroy.apply(this,arguments)},s});o=function(n,r){var s,f,u=this,o=i.bounds(),l=i.start(r.colorStart),c=i.end(r.colorEnd),h=r.parent&&t.get.elements(r.parent)[0];r.name=r.name||e;l.firstChild.textContent+=" "+r.name;c.textContent+=" "+r.name;o.appendChild(l);o.appendChild(c);u.options=r;u.bounds=o;u.triggerGroup=void 0;this.add=function(){f=n.controller();s=f.info("vertical");var i=f.info("isDocument");h||(h=i?document.body:f.info("container"));i||"static"!==t.css(h,"position")||t.css(h,{position:"relative"});n.on("change.plugin_addIndicators",v);n.on("shift.plugin_addIndicators",a);w();y();setTimeout(function(){f._indicators.updateBoundsPositions(u)},0)};this.remove=function(){if(u.triggerGroup){if(n.off("change.plugin_addIndicators",v),n.off("shift.plugin_addIndicators",a),u.triggerGroup.members.length>1){var t=u.triggerGroup;t.members.splice(t.members.indexOf(u),1);f._indicators.updateTriggerGroupLabel(t);f._indicators.updateTriggerGroupPositions(t);u.triggerGroup=void 0}else p();k()}};var a=function(){y()},v=function(n){"triggerHook"===n.what&&w()},b=function(){var n=f.info("vertical");t.css(l.firstChild,{"border-bottom-width":n?1:0,"border-right-width":n?0:1,bottom:n?-1:r.indent,right:n?r.indent:-1,padding:n?"0 8px":"2px 4px"});t.css(c,{"border-top-width":n?1:0,"border-left-width":n?0:1,top:n?"100%":"",right:n?r.indent:"",bottom:n?"":r.indent,left:n?"":"100%",padding:n?"0 8px":"2px 4px"});h.appendChild(o)},k=function(){o.parentNode.removeChild(o)},y=function(){o.parentNode!==h&&b();var i={};i[s?"top":"left"]=n.triggerPosition();i[s?"height":"width"]=n.duration();t.css(o,i);t.css(c,{display:n.duration()>0?"":"none"})},d=function(){var o=i.trigger(r.colorTrigger),h={},e;h[s?"right":"bottom"]=0;h[s?"border-top-width":"border-left-width"]=1;t.css(o.firstChild,h);t.css(o.firstChild.firstChild,{padding:s?"0 8px 3px 8px":"3px 4px"});document.body.appendChild(o);e={triggerHook:n.triggerHook(),element:o,members:[u]};f._indicators.groups.push(e);u.triggerGroup=e;f._indicators.updateTriggerGroupLabel(e);f._indicators.updateTriggerGroupPositions(e)},p=function(){f._indicators.groups.splice(f._indicators.groups.indexOf(u.triggerGroup),1);u.triggerGroup.element.parentNode.removeChild(u.triggerGroup.element);u.triggerGroup=void 0},w=function(){var i=n.triggerHook(),o=.0001,t,r,e;if(!(u.triggerGroup&&Math.abs(u.triggerGroup.triggerHook-i)