USE AUTOCOMPLETE FUNCTION IN SEARCH FORM

USE AUTOCOMPLETE FUNCTION IN SEARCH FORM

I would like to use the autocomplete widget as described in  http://jqueryui.com/autocomplete/
It would be on a form that I have a search page.  I am trying to use it with a search box that pulls back items from a text field.  Has anyone seen a good example of where to place the code?  Thanks in advance.