Clientside router with fallbacks for browsers that don't support pushState. Mostly lifted from Backbone.js.