// Only do this stuff if Flash is present
if (swfobject.hasFlashPlayerVersion("9.0")) {
	// Full path including hash
	path = location.href.split(location.host)[1];

	// Ensure trailing slash in hashpath
	if (path.match(/^\/#(.*[^/])?$/)) {
	    location.hash += "/";
	}

	// Redirect regular path to its hashpath
	if (!location.hash && !path.match(/^\/#?$/)) {
	    location.replace(location.href.replace(path, "/#" + path));
	}
}
