Refactored code to use jQuery.
Removed redundant functions.
Removed clickOn(), replaced by jQuery's .click().
removed gmi
Removed testing fluff.