(function (global) {
	var
	hash = global.location.hash,
	func = function () {
		if (hash !== global.location.hash) {
			hash = global.location.hash;

			global.dispatchEvent(new Event('hashchange'));
		}

		setTimeout(func, 200);
	};

	// Can't set window properties to undefined in IE7/8: "Not implemented"
	global.onhashchange = function() {};

	func();
})(this);

(function (global) {
	var
	hash = global.location.hash,
	func = function () {
		if (hash !== global.location.hash) {
			hash = global.location.hash;

			global.dispatchEvent(new Event('hashchange'));
		}

		setTimeout(func, 200);
	};

	// Make sure a check for 'onhashchange' in window will pass (note: setting to undefined IE<9 causes 'Not implemented' error)
	global.onhashchange = function() {};

	func();
})(this);

Clarify reason for assignment