added placeholder to index.html
wrapped autocomplete code in a anonymous function