consolidates JS and CSS for nav function, uses CSS translate2D