updated to make better use of css3 transitions