/*
$(document).ready(function(){
	
	// Suche
	var suche = $('#s');
	suche.click(function(){
		if($(this).val() == 'Suche'){
			$(this).val('');
		}
	});
	
	suche.blur(function(){
		if($(this).val() == '' || $(this).val() == ' ') {
			$(this).val('Suche');
		}
	});
	
	// Username
	var user = $('#user_login');
	user.click(function(){
		if($(this).val() == 'username'){
			$(this).val('');
		}
	});
	
	user.blur(function(){
		if($(this).val() == '' || $(this).val() == ' ') {
			$(this).val('username');
		}
	});
	
	// Password
	var pass = $('#user_pass');
	pass.click(function(){
		if($(this).val() == 'password'){
			$(this).val('');
		}
	});
	
	pass.blur(function(){
		if($(this).val() == '' || $(this).val() == ' ') {
			$(this).val('password');
		}
	});
});

*/

window.addEvent('domready', function() {
	
	// Suche
	var suche = $('s');
	if($chk(suche) == true) {
		suche.addEvent('click', function(event){
			if(suche.getProperty('value') == 'Suche'){
				suche.setProperty('value','');
			}
		});
	}
	
	if($chk(suche) == true) {
		suche.addEvent('blur', function(event){
			if(suche.getProperty('value') == '' || suche.getProperty('value') == ' '){
				suche.setProperty('value','Suche');
			}
		});
	}
	
	// USER
	var user = $('user_login');
	if($chk(user) == true) {
		user.addEvent('click', function(event){
			if(user.getProperty('value') == 'username'){
				user.setProperty('value','');
			}
		});
	}
	
	if($chk(user) == true) {
		user.addEvent('blur', function(event){
			if(user.getProperty('value') == '' || suche.getProperty('value') == ' '){
				user.setProperty('value','username');
			}
		});
	}
	
	// PASS
	var pass = $('user_pass');
	if($chk(pass) == true) {
		pass.addEvent('click', function(event){
			if(pass.getProperty('value') == 'password'){
				pass.setProperty('value','');
			}
		});
	}
	
	if($chk(pass) == true) {
		pass.addEvent('blur', function(event){
			if(pass.getProperty('value') == '' || suche.getProperty('value') == ' '){
				pass.setProperty('value','password');
			}
		});
	}
	
	
	
});