Search with typeahead

Switched everything over to use Typeahead.js and Bloodhound.js. Tried to keep proper formatting intact, but a second look would be appreciated. Will post screenshots as well. 
This is the same code as above. Please extract into a function.