updated opacity animation to work with safari