Transition support

Added transition support. If it's available, use transitions instead of
jQuery animate.