simplified jquery-based main.coffee