adding animation to the nav bar