code: function( event ) {
  			var newEvent = new $.Event( "navigate" ),
  				beforeNavigate = new $.Event( "beforenavigate" ),
  				state = event.originalEvent.state || {},
  				href = location.href;
  
  			$win.trigger( beforeNavigate );
  
  			if( beforeNavigate.isDefaultPrevented() ){
  				return;
  			}
  
  			if( event.historyState ){
  				$.extend(state, event.historyState);
  			}
  
  			// Make sure the original event is tracked for the end
  			// user to inspect incase they want to do something special
  			newEvent.originalEvent = event;
  
  			// NOTE we let the current stack unwind because any assignment to
  			//      location.hash will stop the world and run this event handler. By
  			//      doing this we create a similar behavior to hashchange on hash
  			//      assignment
  			setTimeout(function() {
  				$win.trigger( newEvent, {
  					state: state
  				});
  			}, 0);
  		}
docs: TODO a lot of duplication between popstate and hashchange