Added CSS-based transitions

The old fade() method, while functional, is nonetheless not that
customisable. This lays some groundwork for transition customisation by
making them entirely CSS-based, with their CSS being in a separate
<style> element. (IE8 will fallback to fade() naturally.)

Also fixed some IE8 bugs.