Fix event microformats to work properly in Chrome and Firefox

The microformats weren't working properly with either the Chrome or Firefox parsers, so I fixed them. I also added some Jasmine specs and refactored the code a bit. More improvements coming!

(This supersedes pull request #1.)