got rid of global variables
put W3C alternative last to overwrite prefixed version in browsers supporting both instead of the opposite