/*/start to web GmbH 2010*/

jQuery(document).ready(function() {
	/*$(".layeropen").click(function(){
		$(this).addClass("show");
	)};*/
	//$(".layeropen").addClass("show");
	jQuery(".layeropen:first").click(function () {
		jQuery(".cv_layer:first, .closelayer").show();
	});
	jQuery(".layeropen:gt(0)").click(function () {
		jQuery(".cv_layer:gt(0), .closelayer").show();
	});
	jQuery(".closelayer").click(function () {
		jQuery(".cv_layer, .closelayer").hide();
	});
	
	//Contact form validation
	jQuery(".required input").addClass("required");
	jQuery(".required textarea").addClass("required");
	
	jQuery("form#kontakt :input").blur(function(){
		jQuery(this).css("border","1px solid #F0F0F0").removeClass("warning");
		if (jQuery(this).is(".required")){
			if (this.value == ""){
					jQuery(this).css("border","1px solid red").addClass("warning");
				};
			};
	});
	jQuery("form#kontakt").submit(function(){
		jQuery(":input.required").trigger("blur");
		var countWarnings = jQuery(".warning", this).length;
		if (countWarnings) {
			return false;
		};
	});
});
