Move search javascript code to search partial view