Adding some js functionality to search view