Fix sort issue and IE compatibility issue.

For all headers it would only sort first column.
IE8 and below don't support indexOf on an array in javascript.  Updated to use jquery.