Improved the code for the sortable tables.
Moved the javascript function to applicaiton.js and bound it to a class
name instead of id, so that it's one function for all tables with
tablesorter class.