fixed the search and cleand up the jquery code.  Also switched from depr...

...ecated

complete to done function