added closure to protect $ alias

Without the `(function ($) { ... }( jQuery ));` this plugin only worked when the jQuery `$` was maintained.