Minor jquery fixes and sort function fixes for IE.