moved to top to avoid $.Autocomplete issues