jQuery-Pluginnified the code. Add License.

- Moved all the functionality in to a jQuery plugin.
- Added a license.