rewrite most jQuery event handlers to not be within a $(function(){ ... }); block

this will make it significantly simpler to start using rails/turbolinks