adding javascript behavior for menu