...
Take a look at the source code at jquerysearchdialog
You can download the sample module source that includes the jquery plugin at openmrs-modules/devexamples/jquerysearchdialog, just download the source, build the .omod and install it through the openmrs module installer.
...