JavaScript plugin for a search page