How to generate a plugin for JQuery