Generalize submenu jQueries