jQueryfied the JavaScript