cleaned js

abstracted away having to write .click(function(){});