added crossbrowser support for adding event listeners
Merge pull request #3 from jbadeau/master

Added IE 8 support