adding event listeners to nav links