moved inline js for typeahead out