Add search function and related animation