﻿$.tablesorter.addWidget({id:"assignColumns",format:function(table){ac_cfg=table.config;ac_h=ac_cfg.headers;ac_hl=ac_cfg.headerList;if(!this.ejec && ac_hl){for(var i=0;i<ac_hl.length;i++){if(ac_h[i]&&ac_h[i].column)ac_hl[i].column=ac_h[i].column;if(ac_h[i]&&ac_h[i].sortDisabled===true){ac_hl[i].sortDisabled=true;$(ac_hl[i]).removeClass(ac_cfg.cssHeader);}};this.ejec = true;}}});
$.tablesorter.addParser({id:'european',is:function(s){return false;},format:function(s){return s.replace(/\./,'').replace(/\,/,'.').replace(/%/g,'');},type:'numeric'});
$.tablesorter.addParser({id:'innerText',is:function(s){return false;},format:function(s){return s.toLowerCase().replace(/<[^>]*>/g,' ');},type:'text'});
$(document).ready(function(){$("#tabla_valores").tablesorter({
headers:{0:{sorter:"innerText"},1:{sorter:"european"},2:{sorter:"european"},3:{sorter:"european"},4:{sorter:"european",column:6},5:{sorter:"european",column:7},6:{sorter:"european",column:8},7:{sorter:"european",sortDisabled:true},8:{sorter:"european"}},
widgets:["assignColumns","zebra"],widgetZebra:{css:["impar","par"]},decimal:',',sortList:[[0,0]]});});
