jQuery widget rewrite

Rewrote the entire application to use the jQuery ui widget factory.