Adds animation classes and remove when animation ends. Also provides callbacks for `animationend` and `animationiteration`