!function(){"use strict";function Waypoint(options){if(!options)throw new Error("No options passed to Waypoint constructor");if(!element)throw new Error("No element option passed to Waypoint constructor");if(!handler)throw new Error("No handler option passed to Waypoint constructor");key="waypoint-"+keyCounter,options=extend({},defaults,options),element=element,adapter=new adapter(element),callback=handler,axis=horizontal?"horizontal":"vertical",enabled=enabled,triggerpoint=null,group=findorcreate({name:group,axis:axis}),context=findorcreatebyelement(context),offsetaliases[offset]&&(offset=offsetaliases[offset]),add(this),add(this),allWaypoints[key]=this,keyCounter+=1}var keyCounter=0,allWaypoints={};queuetrigger=function(direction){queuetrigger(this,direction)},trigger=function(args){enabled&&callback&&apply(this,args)},destroy=function(){remove(this),remove(this),delete allWaypoints[key]},disable=function(){return enabled=!1,this},enable=function(){return refresh(),enabled=!0,this},next=function(){return next(this)},previous=function(){return previous(this)},invokeall=function(method){var allWaypointsArray=[];for(var waypointKey in allWaypoints)push(allWaypoints[waypointKey]);for(var i=0,end=length;ioldscroll,direction=isForward?forward:backward;for(var waypointKey in waypoints[axisKey]){var waypoint=waypoints[axisKey][waypointKey];if(null!==triggerpoint){var wasBeforeTriggerPoint=oldscroll=triggerpoint,crossedForward=wasBeforeTriggerPoint&&nowAfterTriggerPoint,crossedBackward=!wasBeforeTriggerPoint&&!nowAfterTriggerPoint;(crossedForward||crossedBackward)&&(queuetrigger(direction),triggeredGroups[id]=group)}}}for(var groupKey in triggeredGroups)triggeredGroups[groupKey].flushTriggers();oldscroll={x:newscroll,y:newscroll}},innerheight=function(){return element==window?viewportheight():innerheight()},remove=function(waypoint){delete waypoints[axis][key],checkempty()},innerwidth=function(){return element==window?viewportwidth():innerwidth()},destroy=function(){var allWaypoints=[];for(var axis in waypoints)for(var waypointKey in waypoints[axis])push(waypoints[axis][waypointKey]);for(var i=0,end=length;i-1&&(adjustment=ceil(contextdimension*adjustment/100))),contextModifier=contextoffset,triggerpoint=floor(elementOffset+contextModifier-adjustment),wasBeforeScroll=oldTriggerPoint=oldscroll,triggeredBackward=wasBeforeScroll&&nowAfterScroll,triggeredForward=!wasBeforeScroll&&!nowAfterScroll,!freshWaypoint&&triggeredBackward?(queuetrigger(backward),triggeredGroups[id]=group):!freshWaypoint&&triggeredForward?(queuetrigger(forward),triggeredGroups[id]=group):freshWaypoint&&oldscroll>=triggerpoint&&(queuetrigger(forward),triggeredGroups[id]=group)}}return requestanimationframe(function(){for(var groupKey in triggeredGroups)triggeredGroups[groupKey].flushTriggers()}),this},findorcreatebyelement=function(element){return findbyelement(element)||new Context(element)},refreshall=function(){for(var contextId in contexts)contexts[contextId].refresh()},findbyelement=function(element){return contexts[waypointcontextkey]},onload=function(){oldWindowLoad&&oldWindowLoad(),refreshall()},requestanimationframe=function(callback){var requestFn=requestanimationframe||mozrequestanimationframe||webkitrequestanimationframe||requestAnimationFrameShim;call(window,callback)},context=Context}(),function(){"use strict";function byTriggerPoint(a,b){return triggerpoint}function byReverseTriggerPoint(a,b){return triggerpoint}function Group(options){name=name,axis=axis,id=name+"-"+axis,waypoints=[],cleartriggerqueues(),groups[axis][name]=this}var groups={vertical:{},horizontal:{}},Waypoint=waypoint;add=function(waypoint){push(waypoint)},cleartriggerqueues=function(){triggerqueues={up:[],down:[],left:[],right:[]}},flushtriggers=function(){for(var direction in triggerqueues){var waypoints=triggerqueues[direction],reverse="up"===direction||"left"===direction;sort(reverse?byReverseTriggerPoint:byTriggerPoint);for(var i=0,end=length;i-1&&splice(index,1)},first=function(){return waypoints[0]},last=function(){return waypoints[length-1]},findorcreate=function(options){return groups[axis][name]||new Group(options)},group=Group}(),function(){"use strict";function JQueryAdapter(element){this.$element=$(element)}var $=jquery,Waypoint=waypoint;$.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(i,method){prototype[method]=function(){var args=call(arguments);return this.$element[method].apply(this.$element,args)}}),$.each(["extend","inArray","isEmptyObject"],function(i,method){JQueryAdapter[method]=$[method]}),push({name:"jquery",Adapter:JQueryAdapter}),adapter=JQueryAdapter}(),function(){"use strict";function createExtension(framework){return function(){var waypoints=[],overrides=arguments[0];return isfunction(arguments[0])&&(overrides=extend({},arguments[1]),handler=arguments[0]),each(function(){var options=extend({},overrides,{element:this});"string"==typeof context&&(context=framework(this).closest(context)[0]),push(new Waypoint(options))}),waypoints}}var Waypoint=waypoint;jquery&&(elementorwaypoint=createExtension(jquery)),zepto&&(elementorwaypoint=createExtension(zepto))}();