Update

Moved JS code to a separate file, also made it easier to edit and
secured the jQuery selection.