var values	=	new Array();

$(document).ready(function(){
	
	$(".form-title-switch").click(function (e) {
		if (this.value && !values[this.id]) {
			values[this.id] = this.value;
			this.value = '';
		}		
	});
	
	$(".form-title-switch").blur(function (e) {
		if (!this.value) {
			this.value		=	values[this.id];
			values[this.id]	=	'';
		}
	});
	
	
	$("input.check-fields").click(function (e) {
		
		var returnValue	=	true;
		
		jQuery.each($(".required-field"), function(index, field) {
			if (!values[field.id]) {
				if (returnValue) {
					alert("Bitte alle benötigten Felder ausfüllen!");
					returnValue = false;
				}
			}
 		});
 
		return returnValue;
	});

});
