moving jQuery validation and autocomplete into the shared UI