Refactor raver nav js