Horizontal NavBar and JQuery

Scrolling automatically changes the nav bar.
JS Error catching