base for jquery menu and other func