function unfoldForHash() {
	var hash = window.location.hash;
	// only run on changes
	if (hash != window._forum_unfold_hash) {
		window._forum_unfold_hash = hash;
		if ('undefined' != typeof(hash) && "" != hash) {
			hash = hash.replace(/^#/, '');
			var targets = document.getElementsByName(hash);
			if (0 == targets.length) {
				var asingle = document.getElementsByName('singlepage');
				if (asingle.length > 0) {
					try {
						// display message
						var para = document.createElement('p');
						para.style.position = 'absolute';
						para.style.padding = '1em';
						para.style.top = '25%';
						para.style.left = '25%';
						para.style.background = 'red';
						para.style.color = 'white';
						para.style.fontSize = '125%';
						para.style.border = 'black 2px solid';
						para.appendChild(document.createTextNode('Searching for comment. Please wait...'));
						document.body.appendChild(para);
					} catch (e) {
						if ('undefined' != typeof(console)) {
							console.log(e);
						}
					}
					window.location.href = asingle[0].href + '#' + hash;
				}
			}
		}
	}

	// run again soon
	window.setTimeout(unfoldForHash, 1000);
}
