$(function(){ // onload

	$("#boxes .aktiv").parent("ul").children("li").show("fast");

	$("#boxes .main a").mouseover(function(){
		$(this).addClass("over");
	}).mouseout(function(){
		$(this).removeClass("over");
	});

	$("#boxes .main").click(function(){
		if ($(this).children("li").css("display") == "none"){
			$(this).children("li").show("fast");
		}
		else{
			$(this).children("li").hide("fast");
		}
	});
	$("#content .cont table").attr("cellpadding","2");
	$("#content .cont table").attr("cellspacing","2");
	$("#content .cont table").attr("border","0");
	$("#content .cont .email").attr("cellpadding","0");
	$("#content .cont .email").attr("cellspacing","0");

});

function showform(){
	$("#vendegkonyvlink").hide();
	$("#hideform").show();
	$("#vendegkonyvform").fadeIn("normal");
}

function hideform(){
	$("#hideform").hide();
	$("#vendegkonyvform").hide();
	$("#vendegkonyvlink").show();
}

function doform(){
	if (!$("#mezo_1").val() || !$("#mezo_2").val() || !$("#mezo_3").val()){
		alert("Az összes mező kitöltése kötelező!");
	}
	else{
		$("#vendegkonyvform").submit();
	}
}

function ajanlatkeres(){
	if (!$("#mezo_1").val() || !$("#mezo_2").val() || !$("#mezo_3").val() || !$("#mezo_4").val()){
		alert("Az összes mező kitöltése kötelező!");
	}
	else{
		$("#ajanlatkeres").submit();
	}
}
