comments added for IE8 specific code
changed addEvent polyfill to John Resig's winning entry in the quirksmode.org contest