changed tables to simple divs
used $(document).ready to load all jquery and typeahead.