// Generated by CoffeeScript 1.6.2 /* Infinite Scroll Shortcut for jQuery Waypoints - v2.0.4 Copyright (c) 2011-2014 Caleb Troughton Dual licensed under the MIT license and GPL license. https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt */ (function(){(function(n,e){if(typeof define==="function"&&define.amd){return define(["jquery","waypoints"],e)}else{return e(n.jQuery)}})(this,function(n){var e;e={container:"auto",items:".infinite-item",more:".infinite-more-link",offset:"bottom-in-view",loadingClass:"infinite-loading",onBeforePageLoad:n.noop,onAfterPageLoad:n.noop};return n.waypoints("extendFn","infinite",function(i){var t;i=n.extend({},n.fn.waypoint.defaults,e,i);if(n(i.more).length===0){return this}t=i.container==="auto"?this:n(i.container);i.handler=function(e){var o;if(e==="down"||e==="right"){o=n(this);i.onBeforePageLoad();o.waypoint("disable");t.addClass(i.loadingClass);return n.get(n(i.more).attr("href"),function(e){var a,r,f;a=n(n.parseHTML(e));r=n(i.more);f=a.find(i.more);t.append(a.find(i.items));t.removeClass(i.loadingClass);if(f.length){r.replaceWith(f);o.waypoint("enable")}else{o.waypoint("destroy")}return i.onAfterPageLoad()})}};return this.waypoint(i)})})}).call(this);