﻿
// add parser through the tablesorter addParser method
$.tablesorter.addParser({
    id: 'TimeResult',
    is: function(s) { return false; },
    format: function(s) {
        var time = s.replace(" s", "");
        var t = parseFloat(time);
        return t == 0 ? 1000 : t;
    },
    type: 'numeric'
});

// add parser through the tablesorter addParser method
$.tablesorter.addParser({
    id: 'BenchResult',
    is: function(s) { return false; },
    format: function(s) {
        var reps = s.replace("reps", "");
        return parseFloat(reps);
    },
    type: 'numeric'
});

// add parser through the tablesorter addParser method
$.tablesorter.addParser({
    id: 'LinkTextResult',
    is: function(s) { return false; },
    format: function(s) { return $(s).html(); },
    type: 'text'
});