// add parser through the tablesorter addParser method 
    $.tablesorter.addParser({ 
        // set a unique id 
        id: 'grades', 
        is: function(s) { 
            // return false so this parser is not auto detected 
            return false; 
        }, 
        format: function(s) { 
            // format your data for normalization 
            return s.toLowerCase().replace(/good/,2).replace(/medium/,1).replace(/bad/,0); 
        }, 
        // set type, either numeric or text 
        type: 'numeric' 
    }); 

var regexp_datefr = /([0-9]{2})\/([0-9]{2})\/([0-9]{4})/;
// add parser through the tablesorter addParser method 
    $.tablesorter.addParser({ 
        // set a unique id 
        id: 'datefr', 
        is: function(s) { 
            // return false so this parser is not auto detected 
            return false; 
        }, 
        format: function(s) { 
            // format your data for normalization 
	    regexp_datefr.exec(s);
	    return RegExp.$3+RegExp.$2+RegExp.$1;
        }, 
        // set type, either numeric or text 
        type: 'numeric' 
    }); 
    
// add parser through the tablesorter addParser method 
    $.tablesorter.addParser({ 
        // set a unique id 
        id: 'sizes', 
        is: function(s) { 
            // return false so this parser is not auto detected 
            return false; 
        }, 
        format: function(s) { 
            // format your data for normalization 
            return s.replace(/XL/,5).replace(/L/,4).replace(/M/,3).replace(/XS/,1).replace(/S/,2);
        }, 
        // set type, either numeric or text 
        type: 'numeric' 
    }); 
    
// add parser through the tablesorter addParser method 
    $.tablesorter.addParser({ 
        // set a unique id 
        id: 'cpd', 
        is: function(s) { 
            // return false so this parser is not auto detected 
            return false; 
        }, 
        format: function(s) { 
            // format your data for normalization 
            return parseFloat(s);
        }, 
        // set type, either numeric or text 
        type: 'text' 
    });  

var regexp_datetimefr = /([0-9]{2})\/([0-9]{2})\/([0-9]{4}) ([0-9]{2}):([0-9]{2}):([0-9]{2})/;
// add parser through the tablesorter addParser method 
    $.tablesorter.addParser({ 
        // set a unique id 
        id: 'datetimefr', 
        is: function(s) { 
            // return false so this parser is not auto detected 
            return false; 
        }, 
        format: function(s) { 
            // format your data for normalization 
	    regexp_datetimefr.exec(s);
	   return RegExp.$3+RegExp.$2+RegExp.$1+RegExp.$4+RegExp.$5+RegExp.$6;
        }, 
        // set type, either numeric or text 
        type: 'text' 
    });   
    
// add parser through the tablesorter addParser method 
    $.tablesorter.addParser({ 
        // set a unique id 
        id: 'credits', 
        is: function(s) { 
            // return false so this parser is not auto detected 
            return false; 
        }, 
        format: function(s) { 
            // format your data for normalization 
            return s.replace(/\+ /, '').replace(/- /, '-').replace(/ \xA2/,'');
        }, 
        // set type, either numeric or text 
        type: 'numeric' 
    });       
