$(document).ready(function() {
	
	$("#main_menu>li").hover(
	function() {
		almenuid="#";
		almenuid+=this.id.replace("menu_","almenu_");
		if (almenuid.length>1) {
			$(".dropline").hide();
			$(almenuid).show();
		};
	},
	function() {
		almenuid="#";
		almenuid+=this.id.replace("menu_","almenu_");
		if (almenuid.length>1 && !$(this).hasClass("active")) {
			$(almenuid).hide();        
		};
		$(".active>ul").show();
	});  	
	
	$("#m_1").hover(
		function() {
			$("#m_1>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_1>div").css("background","none #ffffee");
		}
	);

	$("#m_1").click(function(){
		document.location="/cegunkrol/kornyezetiranyitasi-rendszerek";
		return false;
	});

	$("#m_2").hover(
		function() {
			$("#m_2>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_2>div").css("background","none #ffffee");
		}
	);

	$("#m_2").click(function(){
		document.location="/kepzes-es-munkahelyek/tovabbkepzes";
		return false;
	});

	$("#m_3").hover(
		function() {
			$("#m_3>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_3>div").css("background","none #ffffee");
		}
	);

	$("#m_3").click(function(){
		document.location="/termekek/geppark";
		return false;
	});

	$("#m_4").hover(
		function() {
			$("#m_4>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_4>div").css("background","none #ffffee");
		}
	);

	$("#m_4").click(function(){
		document.location="/cegunkrol/tortenelem";
		return false;
	});

	$("#m_5").hover(
		function() {
			$("#m_5>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_5>div").css("background","none #ffffee");
		}
	);

	$("#m_5").click(function(){
		document.location="/de/das-unternehmen/umweltmanagement";
		return false;
	});

	$("#m_6").hover(
		function() {
			$("#m_6>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_6>div").css("background","none #ffffee");
		}
	);

	$("#m_6").click(function(){
		document.location="/de/beruf-und-ausbildung/weiterbildung";
		return false;
	});

	$("#m_7").hover(
		function() {
			$("#m_7>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_7>div").css("background","none #ffffee");
		}
	);

	$("#m_7").click(function(){
		document.location="/de/produkte-und-services/maschinenpark";
		return false;
	});

	$("#m_8").hover(
		function() {
			$("#m_8>div").css("background","url(/img/li_bg.png) repeat-x 0 bottom #ffffee");
		},
		function() {
			$("#m_8>div").css("background","none #ffffee");
		}
	);

	$("#m_8").click(function(){
		document.location="/de/das-unternehmen/historie";
		return false;
	});
	
  $('a[rel*=lightbox], a.lightbox').fancybox();
	
});
