Make mod/map more functional using jQuery