$(document).ready(function(){
	$(".more_info_button").click(function(){
		$("body").append("<div id='info_overlay'></div>");
		var doc_height = $(document).height();
		$("#info_overlay").css({
			position:"absolute",
			top:0,
			left:0,
			backgroundColor:"#000",
			opacity:0.7,
			width:"100%",
			height:doc_height
		});
		var lightbox_content = "<div id='lightbox'>"+$(this).next("div").html()+"<div style='text-align:right; width:100%;'><a href='#'>Schlie&szlig;en</a></div></div>";
		$("body").append(lightbox_content);
		$("#lightbox a").click(function(){
			$("#lightbox").remove();
			$("#info_overlay").remove();
		});
	});
	$("#container").height(getDocHeight());
	$(".navi_unselected").click(function(){
		document.location.href = $(this).attr('name');
	});
});
$(document).resize(getDocHeight());
function getDocHeight() {
    var D = document;
    if(D.body!=null){
	return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );}
}
function archiv(){
	var x;
	var label;
	if(document.getElementById('archiv').style.display=="block"){
		x="none";
		label="Archiv anzeigen";
	}
	if(document.getElementById('archiv').style.display=="none"){
		x="block";
		label="Archiv verbergen";
	}
	document.getElementById('archiv').style.display=x;
	document.getElementById('show').value=label;
}
