new animation function for search bar