This page is an example of how to handle search in the site.
To add auto comeplete functionality to the search box you must include jquery and a plugin.
In this example we have used jQuery UI Autocomplete .
In the layout we have checked for GET param ajax and if set then we have return the results in json.
On the page we have included js to bind the textbox to autocomplete with source as the same page with GET param ajax set.