Events and shims.

Should theoretically support IE 7+ now.