function initTableSorter(a){var b,c;switch(a){case"statustabs_queries":b=$("#serverstatusqueriesdetails");c={sortList:[[3,1]],widgets:["fast-zebra"],headers:{1:{sorter:"fancyNumber"},2:{sorter:"fancyNumber"}}};break;case"statustabs_allvars":b=$("#serverstatusvariables");c={sortList:[[0,0]],widgets:["fast-zebra"],headers:{1:{sorter:"withinSpanNumber"}}};break}b.tablesorter(c);b.find("tr:first th").append('<img class="icon sortableIcon" src="themes/dot.gif" alt="">')}$(function(){$.tablesorter.addParser({id:"fancyNumber",is:function(a){return/^[0-9]?[0-9,\.]*\s?(k|M|G|T|%)?$/.test(a)},format:function(c){var a=jQuery.tablesorter.formatFloat(c.replace(PMA_messages.strThousandsSeparator,"").replace(PMA_messages.strDecimalSeparator,"."));var b=1;switch(c.charAt(c.length-1)){case"%":b=-2;break;case"k":b=3;break;case"M":b=6;break;case"G":b=9;break;case"T":b=12;break}return a*Math.pow(10,b)},type:"numeric"});$.tablesorter.addParser({id:"withinSpanNumber",is:function(a){return/<span class="original"/.test(a)},format:function(c,d,b){var a=b.innerHTML.match(/<span(\s*style="display:none;"\s*)?\s*class="original">(.*)?<\/span>/);return(a&&a.length>=3)?a[2]:0},type:"numeric"});$.tablesorter.addWidget({id:"fast-zebra",format:function(a){if(a.config.debug){var b=new Date()}$("tr:even",a.tBodies[0]).removeClass(a.config.widgetZebra.css[0]).addClass(a.config.widgetZebra.css[1]);$("tr:odd",a.tBodies[0]).removeClass(a.config.widgetZebra.css[1]).addClass(a.config.widgetZebra.css[0]);if(a.config.debug){$.tablesorter.benchmark("Applying Fast-Zebra widget",b)}}})});