hiding the search window on click and upon search result