Updated JS to add active class to the navigation