Refactor bootstrap-sortable.js

Removed duplication, cached jQuery objects, moved global function to $ namespace.