$.tablesorter.addParser({
  id: 'position',
  is: function(s) { return false; },
  format: function(s) {if (s.length == 0) {s = 999;} return s;},
  type: 'numeric'
});
$.tablesorter.addParser({
  id: 'name',
  is: function(s) { return false; },
  format: function(s) {return s.replace(/^([a-z ]+) ([a-z\-]+)/gi,"$2 $1");},
  type: 'text'
});
$.tablesorter.addParser({
  id: 'vehicle',
  is: function(s) { return false; },
  format: function(s) {
    return s.toLowerCase().replace(/^([0-9]+) (.+)/gi,"$2 $1");
  }, type: 'text'
});
$.tablesorter.addParser({
  id: 'SS',
  is: function(s) { return false;},
  format: function(s) { return s.replace(/SS([0-9]+):.*$/gi, "$1"); },
  type: 'numeric'
});
$.tablesorter.addParser({
  id: 'entryClass',
  is: function(s) { return false; },
  format: function(s) {
    return s.toLowerCase().replace(/open light/,11).replace(/open/,1)
    .replace(/production gt/,3).replace(/overall/,8)
    .replace(/group n/,4).replace(/2-wheel drive/,5)
    .replace(/group 5/,6).replace(/group 2/,7)
    .replace(/overall/,8).replace(/super production/,2)
    .replace(/historic/,10).replace(/production/,9)
    .replace(/o/,1).replace(/sp/,2)
    .replace(/pgt/,3).replace(/gn/,4)
    .replace(/2wd/,5).replace(/g5/,6)
    .replace(/g2/,7).replace(/l/,11)
    .replace(/p/,9).replace(/h/,10);
  },type: 'numeric'});

