added JS to set the active state of menu items