$(document).ready(function(){
	
	initialize();
	
	$("a[rel=lightbox]").lightBox({
		fixedNavigation:true,
		imageLoading:images.loading,
		imageBtnPrev:images.prev,
		imageBtnNext:images.next,
		imageBtnClose:images.close,
		imageBlank:images.blank,
		txtImage:"Bild",
		txtOf:" von "
	});
	
	$(".map_canvas").click(function(){
		window.print();
		return false;
		var height = $("body").height();
		
		if($(".page").height() > height)
			height = $(".page").height();
		
		$('<div class="popup_background"></div>').appendTo("body").click(function(){
			$("#map_canvas").insertBefore(".map_canvas");
			$(this).remove();
			$(".popup").remove();
		}).css({
			height:height,
			opacity:"0.8"
		});
		$('<div class="popup"><div class="popup_close">Schliessen X</div></div>')
			.appendTo("body").css({
				marginTop:"0px",
				top:getScrollY()+50+"px"
			}).find(".popup_close").click(function(){
				$("#map_canvas").insertBefore(".map_canvas");
				$(this).parents(".popup").remove();
				$(".popup_background").remove();
			});
		$("#map_canvas").appendTo(".popup");
		return false;
	});
});

function getScrollY(){
	var scrOfY = 0;
	if(typeof(window.pageYOffset) == 'number'){
		/* Für Netscape */
		scrOfY = window.pageYOffset;
	}else if(document.body && document.body.scrollTop){
		/* Für DOM */
		scrOfY = document.body.scrollTop;
	}else if(document.documentElement && document.documentElement.scrollTop){
		/* Für IE6 */
		scrOfY = document.documentElement.scrollTop;
	}
	return scrOfY;
}
