rewrite of jQuery fadeIn() and fadeOut() using CSS3 animations