Refactored navbar transition into CoffeeScript