Event handlers for popstate, hashchange and clicks

- if pushstate is enabled listen for popstate events otherwise
  listen for hashchange events.
- listen for all clicks (this will later be used to change the url)
Merge pull request #3 from swipely/setup

Event handlers for popstate, hashchange and clicks