!function(t){"use strict";t.jscroll={defaults:{debug:!1,autoTrigger:!0,autoTriggerUntil:!1,loadingHtml:"Loading...",loadingFunction:!1,padding:0,nextSelector:"a:last",contentSelector:"",pagingSelector:"",callback:!1}};var n=function(n,e){var l=n.data("jscroll"),o="function"==typeof e?{callback:e}:e,r=t.extend({},t.jscroll.defaults,o,l||{}),i="visible"===n.css("overflow-y"),c=n.find(r.nextSelector).first(),a=t(window),s=t("body"),d=i?a:n,f=t.trim(c.attr("href")+" "+r.contentSelector),g=function(){var n=t(r.loadingHtml).filter("img").attr("src");if(n){var e=new Image;e.src=n}},u=function(){n.find(".jscroll-inner").length||n.contents().wrapAll('
')},p=function(t){var n;r.pagingSelector?t.closest(r.pagingSelector).hide():(n=t.parent().not(".jscroll-inner,.jscroll-added").addClass("jscroll-next-parent").hide(),n.length||t.wrap('').parent().hide())},j=function(){return d.unbind(".jscroll").removeData("jscroll").find(".jscroll-inner").children().unwrap().filter(".jscroll-added").children().unwrap()},h=function(){if(n.is(":visible")){u();var t=n.find("div.jscroll-inner").first(),e=n.data("jscroll"),l=parseInt(n.css("borderTopWidth"),10),o=isNaN(l)?0:l,c=parseInt(n.css("paddingTop"),10)+o,a=i?d.scrollTop():n.offset().top,s=t.length?t.offset().top:0,f=Math.ceil(a-s+d.height()+c);if(!e.waiting&&f+r.padding>=t.outerHeight())return w("info","jScroll:",t.outerHeight()-f,"from bottom. Loading next request..."),m()}},v=function(t){return t=t||n.data("jscroll"),t&&t.nextHref?(b(),!0):(w("warn","jScroll: nextSelector not found - destroying"),j(),!1)},b=function(){var e=n.find(r.nextSelector).first();if(e.length)if(r.autoTrigger&&(r.autoTriggerUntil===!1||r.autoTriggerUntil>0)){p(e);var l=s.height()-n.offset().top,o=n.height()