refactor coffeescript to unobtrusive js