//Add Load Events to the onload property



function addLoadEvent(func) {



  var oldonload = window.onload;

  if (typeof window.onload != 'function') {

	

    window.onload = func;

    

  } else {

	

    window.onload = function() {

  	  oldonload();

  	  func();

  	}

  	

  }

}



//Toggle dummy text for searches

function search() {

    

    if($('search_field')) {



        $('search_field').onfocus = function() {

  			

  			// if already cleared, do nothing

			if (this._cleared) return

			

			  // when this code is executed, "this" keyword will in fact be the field itself

			  this.clear()

			  this._cleared = true

		}

		

	}



}



//attach events on mouseover/mouseout

sfHover = function() {

 

    if($("nav")) { 

    

        var sfEls = $("nav").getElementsByTagName("li");

        nodes = $A(sfEls);   

        

        nodes.each(function(node){

            node.onmouseover = function() { this.className+= " sfhover"; };

            node.onmouseout = function() { this.className = this.className.replace(new RegExp("sfhover+"), ""); };

	    });  

    

    }

    

}



FastInit.addOnLoad(search,sfHover);

//addLoadEvent(sfHover);  










