Substitute collection_select for an ajax autocomplete

I want to substitute my collection_select for an autocomplete field. The
problem is that I need the id of the record found afterwards in order to
save my current form to the database.
I can do it by hand but is there a plugin that does this already? Maybe
a good post that will give me good tips on it?
Thanks for your help.