Trying to beef up my front-end skills, so any help is greatly appreciated!

I have two links in a horizontal navigation bar, 'WORK' 'ABOUT ME' I would like those to change to 'TOP' once the user scrolls down 500px. The navigation bar is fixed to the top so users can jump back up to top when they are in the 'WORK' 'ABOUT ME' sections.

What is the simplest way to go about coding this?

Thanks for your help!