Javascript functions for controlling navbar transition directions and active button highlighting. Functions not yet hooked up to any event, so they won't work.