if animation is defined - use visibility, otherwise use display:none