Changed animation code to use classes on parent div