Added jQuery
Refactored code to use jQuery