/**
 * $Id: jquery.history.init.js 5406 2011-08-25 15:42:33Z smacaule $
 */

(function(window, undefined) {
	/**
	 * Note: An uppercase "H" is used, instead of a lowercase "h".
	 */
	var History = window.History;
	
	if (!History.enabled) {
		/**
		 * History.js is disabled for this browser, since it is optional
		 * to support HTML4 browsers or not.
		 */
		return false;
	}

	/**
	 * Bind to StateChange Event.
	 *
	 * Note: "statechange" is used, instead of "popstate".
	 */
	History.Adapter.bind(window, 'statechange', function() {
		/**
		 * Note: "History.getState()" is used, instead of "event.state".
		 */
		// Uncomment lines below for debugging purposes only.
		// var State = History.getState();
		// History.log(State.data, State.title, State.url);
	});
})(window);

