text: ﻿/* tablesorter pager plugin */
  (function(d){d.extend({tablesorterPager:new function(){var k=function(a){a.updateArrows&&(a.container.removeClass(a.cssDisabled),d(a.cssFirst+","+a.cssPrev+","+a.cssNext+","+a.cssLast,a.container).removeClass(a.cssDisabled),a.page===0?d(a.cssFirst+","+a.cssPrev,a.container).addClass(a.cssDisabled):a.page===a.totalPages-1&&d(a.cssNext+","+a.cssLast,a.container).addClass(a.cssDisabled),a.totalRows<a.size&&a.container.addClass(a.cssDisabled))},n=function(a,b){b.startRow=b.size*b.page+1;b.endRow=Math.min(b.totalRows, b.size*(b.page+1));var c=d(b.cssPageDisplay,b.container),e=b.output.replace(/\{(page|totalPages|startRow|endRow|totalRows)\}/gi,function(a){return{"{page}":b.page+1,"{totalPages}":b.totalPages,"{startRow}":b.startRow,"{endRow}":b.endRow,"{totalRows}":b.totalRows}[a]});c[0].tagName==="INPUT"?c.val(e):c.html(e);k(b);d(a).trigger("pagerComplete",b)},l=function(a){var b=a.config,a=d(a);if(!b.pagerPositionSet&&b.positionFixed)a.offset&&b.container.css({top:a.offset().top+a.height()+"px",position:"absolute"}), b.pagerPositionSet=!0},h=function(a,b){var c,e,i,j,g=a.config,f=b.length;c=g.page*g.size;var h=c+g.size;d(a).trigger("pagerChange",g);if(h>b.length)h=b.length;j=d(a.tBodies[0]);for(d.tablesorter.clearTableBody(a);c<h;c++){i=b[c];f=i.length;for(e=0;e<f;e++)j[0].appendChild(i[e])}l(a,j);d(a).trigger("applyWidgets");g.page>=g.totalPages&&m(a);n(a,g)},f=function(a){var b=a.config;if(b.page<0||b.page>b.totalPages-1)b.page=0;h(a,b.rowsCopy)},m=function(a){var b=a.config;b.page=b.totalPages-1;f(a)};this.appender= function(a,b){var c=a.config;c.rowsCopy=b;c.totalRows=b.length;c.totalPages=Math.ceil(c.totalRows/c.size);h(a,b)};this.defaults={size:10,offset:0,page:0,totalRows:0,totalPages:0,container:null,cssNext:".next",cssPrev:".prev",cssFirst:".first",cssLast:".last",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssDisabled:"disabled",output:"{page}/{totalPages}",updateArrows:!1,positionFixed:!0,appender:this.appender};this.construct=function(a){return this.each(function(){var b=d.extend(this.config, d.tablesorterPager.defaults,a),c=this,e=b.container;d(this).trigger("appendCache");b.size=parseInt(d(".pagesize",e).val(),10);k(b);d(b.cssFirst,e).click(function(){c.config.page=0;f(c);return!1});d(b.cssNext,e).click(function(){var a=c.config;a.page++;if(a.page>=a.totalPages-1)a.page=a.totalPages-1;f(c);return!1});d(b.cssPrev,e).click(function(){var a=c.config;a.page--;if(a.page<=0)a.page=0;f(c);return!1});d(b.cssLast,e).click(function(){m(c);return!1});d(b.cssPageSize,e).change(function(){var a= parseInt(d(this).val(),10),b=c.config;b.size=a;b.totalPages=Math.ceil(b.totalRows/b.size);b.pagerPositionSet=!1;f(c);l(c);return!1});d(this).bind("destroy.pager",function(){var a=c.config;a.size=a.totalRows;a.totalPages=1;h(c,a.rowsCopy);a.container.hide();a.appender=null;d(c).unbind("destroy.pager")})})}}});d.fn.extend({tablesorterPager:d.tablesorterPager.construct})})(jQuery);
  