jQuery(document).ready(function() {
	var baseurl = window.location.href.split('/');
	baseurl.pop();
	baseurl = baseurl.join('/');

	function agency28History(hash)
	{
		if (hash === '') {
			jQuery('#content').load(baseurl + '/ajax/splash.html');
		} else {
			jQuery('#content').load(baseurl + '/ajax/' + hash + '.html');
		}
	}

	jQuery.history.init(agency28History);
    jQuery('#nav a').click(function() {
		var matches = this.href.match(/^.*\/((.*)\.html)(.*)$/);
		if (matches && matches.length && matches[2] !== '') {
			jQuery.history.load(matches[2]);
		}
		return false;
	});
});
