Refactor

Hi,

I think you've got a great Bootstrap plugin here, but I noticed quite a lot of code duplication and other areas that could be improved in the javascript file.

I've removed the duplicate logic, moved the global function ApplySortability() to jQuery's $ namespace, and cached some jQuery objects which were being instantiated multiple times.