Module pattern/remove jquery dependency

Converted and cleaned up code to use the module pattern and removed the dependency on jQuery.

Signed-off-by: Kyle Zinter <kylezinter@live.com>