added JS to navigation code