(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:“header”,cssAsc:“headerSortUp”,cssDesc:“headerSortDown”,cssChildRow:“expand-child”,sortInitialOrder:“asc”,sortMultiSortKey:“shiftKey”,sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:“simple”,parsers:{},widgets:[],widgetZebra:{css:[“even”,“odd”]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:“us”,decimal:‘/.|,/g’,onRenderHeader:null,selectorHeaders:‘thead th’,debug:false};function benchmark(s,d){log(s+“,”+(new Date().getTime()-d.getTime())+“ms”);}this.benchmark=benchmark;function log(s){if(typeof console!=“undefined”&&typeof console.debug!=“undefined”){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug=“”;}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;ip.id
“n”;}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==”&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log(‘Checking if value was empty on row:’+rowIndex);}}else{keepLooking=false;}}for(var i=1;ie
“) { return ”e
“; } ”;dynamicExp+=“else { ”;}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+=“return a[”orgOrderCol
“]-b[”orgOrderCol
“];”;for(var i=0;iindex
“]”,b=“b[”index
“]”;if(type==‘text’&&direction==‘asc’){return“(”a
“ == ”b
“ ? 0 : (”a
“ === null ? Number.POSITIVE_INFINITY : (”b
“ === null ? Number.NEGATIVE_INFINITY : (”a
“ < "b
”) ? -1 : 1 )));“;}else if(type==‘text’&&direction==‘desc’){return”(“a
” == “b
” ? 0 : (“a
” === null ? Number.POSITIVE_INFINITY : (“b
” === null ? Number.NEGATIVE_INFINITY : (“b
” < "a
“) ? -1 : 1 )));”;}else if(type==‘numeric’&&direction==‘asc’){return“(”a
“ === null && ”b
“ === null) ? 0 :(”a
“ === null ? Number.POSITIVE_INFINITY : (”b
“ === null ? Number.NEGATIVE_INFINITY : ”a
“ - ”b
“));”;}else if(type==‘numeric’&&direction==‘desc’){return“(”a
“ === null && ”b
“ === null) ? 0 :(”a
“ === null ? Number.POSITIVE_INFINITY : (”b
“ === null ? Number.NEGATIVE_INFINITY : ”b
“ - ”a
“));”;}};function makeSortText(i){return“((a[”i
“] < b["i
”]) ? -1 : ((a[“i
”] > b[“i
”]) ? 1 : 0));“;};function makeSortTextDesc(i){return”((b[“i
”] < a["i
“]) ? -1 : ((b[”i
“] > a[”i
“]) ? 1 : 0));”;};function makeSortNumeric(i){return“a[”i
“]-b[”i
“];”;};function makeSortNumericDesc(i){return“b[”i
“]-a[”i
“];”;};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((ab)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,“tablesorter”,config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger(“sortStart”);var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j