jQuery(document).ready(function() {
    jQuery.tablesorter.addParser({ 
        // set a unique id 
        id: 'asFechas', 
        is: function(s) { 
            // return false so this parser is not auto detected 
            return false; 
        }, 
        format: function(s) { 
            // format your data for normalization 
            var fecha = s.split(" ");
            var dia = parseInt(fecha[1]);
            var nombremes = fecha[3];
            var mes = parseInt(
                nombremes.replace(/enero/,32)
                .replace(/febrero/,64)
                .replace(/marzo/,96)
                .replace(/abril/,128)
                .replace(/mayo/,160)
                .replace(/junio/,192)
                .replace(/julio/,224)
                .replace(/agosto/,256)
                .replace(/septiembre/,288)
                .replace(/octubre/,320)
                .replace(/noviembre/,352)
                .replace(/diciembre/,384)
                )
            var anio = parseInt(fecha[5]) * 512;
            return dia + mes + anio;
        }, 
        // set type, either numeric or text 
        type: 'numeric' 
    }); 

    jQuery("table.tablesorter").tablesorter({
        widgets: ['zebra'],
        headers: { 
                    0: { sorter:'asFechas' },
                    2: { sorter: false },
                 } 
        }); 
});



