updated js for nav