window.onload = loadScript;

function loadScript() {
	loadjscssfile("scripts/jquery.js", "js")
	loadjscssfile("scripts/jquery.bgpos.js", "js")
}

function loadjscssfile(filename, filetype){
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
	if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref)
}
document.write('<ul id="topMenu">');
document.write('<li><a href="services.php" id="menu1" alt="Services" title="Services" class="hoverswap" border="0" onmouseover="changeNav(this)" onmouseout="changeNav1(this)">SERVICES</a></li>');
document.write('<li><a href="approach.php" id="menu2" alt="Approach" title="Approach" class="hoverswap" border="0" onmouseover="changeNav(this)" onmouseout="changeNav1(this)">APPROACH</a></li>')
document.write('<li><a href="media.php" id="menu3" alt="Media" title="Media" class="hoverswap" border="0" onmouseover="changeNav(this)" onmouseout="changeNav1(this)">MEDIA</a></li>');
document.write('<li><a href="consultants.php" id="menu4" alt="Consultants" title="Consultants" class="hoverswap" border="0" onmouseover="changeNav(this)" onmouseout="changeNav1(this)">CONSULTANTS</a></li>')
document.write('<li><a href="contact.php" id="menu5" alt="Contact" title="Contact" class="hoverswap" border="0" onmouseover="changeNav(this)" onmouseout="changeNav1(this)">CONTACT</a></li>');
document.write('</ul>');

function changeNav(obj) {
		$(obj).stop().animate({ backgroundPosition: "(0px -13px)"}, {duration:300});
}

function changeNav1(obj) {
		$(obj).stop().animate({ backgroundPosition: "(0 0)"}, {duration:0});
}
