For more detail and discussion on this example, see the blog post: Event Handling with the jQuery Autocomplete Combobox.
Google Hosted Libraries - Developer's Guide