javascript document ready fix (because turbolinks in rails)
Sorting for tables