Inspired by https://github.com/yearofmoo/ngAnimate-animate.css