move menu JS to layout