Cleanup the Javascript a bit

- normalize indentation. 2-space and 4-space were in use, everything is
  now 2-space
- normalize quotes. " and ' were in use, everything is now single-quoted
- use location.hash to refer to the hash part of the current URL
- use location.replace to navigate. This can handle relative
  URLs/anchors/full URLs/etc
- Only add a click handler to navigation links starting with '#', this
  removes the need for an if statement previously used there
- Don't run all this on ready, but right away. By the time this script
  is parsed, the DOM will have been parsed. I think that means we can
  attach handlers and stuff. In my little bit of manual testing this has
  worked fine. I kept the closure in place to avoid leaking those
  functions into the global namespace
Fix the broken back/forward browser buttons

They were broken on this site because the 'onpopstate' event wasn't
being handled.

See
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history
for more info.
Merge pull request #5 from losingkeys/cleanup-js-and-fix-navigation

Cleanup js and fix navigation