window.addEvent('domready',function(){
var suchwort = " suchen ";
function suchfeld(element){
	$$(element).removeClass('fokus').setProperty('value',suchwort).addEvents({
		'focus': function(){
			if(this.value == suchwort){this.removeProperty('value');}
		},
		'blur': function(){
			if(this.value == ''){this.setProperty('value',suchwort);}
		}
	});
}
if($defined($$('input#suchbox'))){
	suchfeld('input#suchbox');
}
if($defined($$("ul#nav ul"))){
	$$("ul#nav li").addEvents({
		mouseover:function(){this.addClass("over");},
		mouseout:function(){this.removeClass("over");}
	});
}
function einblenden(element,time,out,over){
	$$(element).setOpacity(out).removeClass('trans').addEvents({
		'mouseover': function(){(new Fx.Style(this,'opacity',{duration:time})).start(over);},
		'mouseout': function(){(new Fx.Style(this, 'opacity', {duration:time})).start(out);}
	});
}
function gibFokus(element){
	$$(element).removeClass('fokus').addEvents({
		'focus': function(){
			this.addClass('fokus');
		},
		'blur': function(){
			this.removeClass('fokus');
		}
	});
}
if($defined($$('input'))){gibFokus('input');}
if($defined($$('select'))){gibFokus('select');}
if($defined($$('select'))){gibFokus('select');}
});