$(document).ready(function(){
	$(".terminmachen label + .text").each(function (type) {
		$(this).focus(function () {
			$(this).prev(".terminmachen label").addClass("focus");
		});
		$(this).keypress(function () {
			$(this).prev(".terminmachen label").addClass("has-text").removeClass("focus");
		});
		$(this).blur(function () {
			if($(this).val() == "") {
				$(this).prev(".terminmachen label").removeClass("has-text").removeClass("focus");
			}
		});
	});
	
	$(".terminmachen label + .textarea").each(function (type) {
		$(this).focus(function () {
			$(this).prev(".terminmachen label").addClass("focus");
		});
		$(this).keypress(function () {
			$(this).prev(".terminmachen label").addClass("has-text").removeClass("focus");
		});
		$(this).blur(function () {
			if($(this).val() == "") {
				$(this).prev(".terminmachen label").removeClass("has-text").removeClass("focus");
			}
		});
	});
	
});	


$(document).ready(function(){
	$(".feedback label + .text").each(function (type) {
		$(this).focus(function () {
			$(this).prev(".feedback label").addClass("focus");
		});
		$(this).keypress(function () {
			$(this).prev(".feedback label").addClass("has-text").removeClass("focus");
		});
		$(this).blur(function () {
			if($(this).val() == "") {
				$(this).prev(".feedback label").removeClass("has-text").removeClass("focus");
			}
		});
	});
	
	$(".feedback label + .textarea").each(function (type) {
		$(this).focus(function () {
			$(this).prev(".feedback label").addClass("focus");
		});
		$(this).keypress(function () {
			$(this).prev(".feedback label").addClass("has-text").removeClass("focus");
		});
		$(this).blur(function () {
			if($(this).val() == "") {
				$(this).prev(".feedback label").removeClass("has-text").removeClass("focus");
			}
		});
	});
	
});	
