adding javascript for selected menu items