javascript working within aaplication.html.erb
js converted to coffeescript and working