window.addEvent('domready', function() {

	// reset search field
	$('searchfield').clearFocusResetBlur('alt'); 

	// li hover
	$$('a.section').each(function(obj, i) {        
		obj.addEvent('mouseover', function(){ obj.getParent().setStyle('background-color', '#104E73'); });
		obj.addEvent('mouseout', function(){ obj.getParent().setStyle('background-color', '#41809e'); });
	});

});

// function clearFocusResetBlur
Element.implement({
    clearFocusResetBlur: function(attr){
        var valueString = this.get(attr);
        this.addEvents({
            'focus': function(){
                if( this.get('value') == valueString ) this.set('value','');
            },
            'blur': function(){
                if( this.get('value') == "" ) this.set('value',valueString);
            }
        });
    }
});