function addLoadEvent(fnc){
  if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", fnc, false );
  else if ( typeof window.attachEvent != "undefined" ) {
    window.attachEvent( "onload", fnc );
  }
  else {
    if ( window.onload != null ) {
      var oldOnload = window.onload;
      window.onload = function ( e ) {
        oldOnload( e );
        window[fnc]();
      };
    }
    else
      window.onload = fnc;
  }
}

<!--//--><![CDATA[//><!--
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
			this.id="sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.id="";
		}
	}
}
addLoadEvent(sfHover);
//--><!]]>


jQuery(document).ready(function(){

	// Preload all rollovers
	jQuery(".rollover").each(function() {
		// Set the original src
		rollsrc = jQuery(this).attr("src");
		rollON = rollsrc.replace(/.gif$/ig,"_on.gif");
		jQuery("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	jQuery(".rollover").mouseover(function(){
		imgsrc = jQuery(this).attr("src");
		matches = imgsrc.match(/_on/);
		// don't do the rollover if state is already ON
		if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_on.gif"); // strip off extension
			jQuery(this).attr("src", imgsrcON);
		}
		
	}).mouseout(function(){
		jQuery(this).attr("src", imgsrc);
	});


});



