added ability for animation to reset when component is out of view
added ability to select type of event for starting animation