/*  ~~ Copyright 2010 jeblaisdell.com  All rights reserved. Licensed for use on unusualfund.com only. ~~  */

function a1() {
	document.getElementById('a1').style.display = 'block';
	document.getElementById('a2').style.display = 'block';
}

function a2() {
	document.getElementById('a1').style.display = 'block';
	document.getElementById('a2').style.display = 'block';
}

var aurl = window.location.href;
if (aurl.indexOf('index.php') != -1) document.getElementById('home').style.backgroundPosition = '0 -19px';
if (aurl.indexOf('contact.php') != -1) document.getElementById('contact').style.backgroundPosition = '0 -19px';
//if (aurl.indexOf('disclosures.php') != -1) document.getElementById('disc').style.backgroundPosition = '0 -19px';

if (aurl.indexOf('index.php#a1') != -1) { a1(); window.location.hash="a1"; }
if (aurl.indexOf('index.php#a2') != -1) { a2(); window.location.hash="a2"; }

/* Code below is free to use. */

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
