/*!
jQuery Waypoints - v3.0+
Copyright (c) 2011-2014 Caleb Troughton
Licensed under the MIT license.
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
*/
!function(){"use strict";function c(d){if(!d)throw new Error("No options passed to Waypoint constructor");if(!d.element)throw new Error("No element option passed to Waypoint constructor");if(!d.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+a,this.options=c.Adapter.extend({},c.defaults,d),this.element=this.options.element,this.adapter=new c.Adapter(this.element),this.callback=d.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=c.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=c.Context.findOrCreateByElement(this.options.context),c.offsetAliases[this.options.offset]&&(this.options.offset=c.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),b[this.key]=this,a+=1}var a=0,b={};c.prototype.queueTrigger=function(a){this.group.queueTrigger(this,a)},c.prototype.trigger=function(a){this.enabled&&this.callback&&this.callback.apply(this,a)},c.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete b[this.key]},c.prototype.disable=function(){return this.enabled=!1,this},c.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},c.prototype.next=function(){return this.group.next(this)},c.prototype.previous=function(){return this.group.previous(this)},c.invokeAll=function(a){var c=[];for(var d in b)c.push(b[d]);for(var e=0,f=c.length;e<f;e++)c[e][a]()},c.destroyAll=function(){c.invokeAll("destroy")},c.disableAll=function(){c.invokeAll("disable")},c.enableAll=function(){c.Context.refreshAll();for(var a in b)b[a].enabled=!0;return this},c.refreshAll=function(){c.Context.refreshAll()},c.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},c.viewportWidth=function(){return document.documentElement.clientWidth},c.adapters=[],c.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},c.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=c}();