var maxContentHeight = 1200;
var minContentHeight = 512;

$(document).ready(function() {
	$(".imgHover")
		.bind("mouseover", function() {
			var imgNode = $(this).children("img");
			// store old
			if(this.mouseoutSrc == null) {
				this.mouseoutSrc = imgNode.attr("src");
				this.mouseoverSrc = this.mouseoutSrc.replace(/\.(gif|jpg|png)/, '_f2.$1');
			}
			imgNode.attr("src", this.mouseoverSrc);
		})
		.bind("mouseout", function() {
			$(this).children("img").attr("src", this.mouseoutSrc);
		});

	resizeFunction();

	// create the subnav
	var sn = new subnav("subMenu", seiteMenu);
	
});

var resizeFunction = function() {
	// var h = $(window).height();

	// var totalHeaderHeight = $("#head").outerHeight() + $("#lanMenu").outerHeight() + $("#mainMenu").outerHeight() + $("#subMenu").outerHeight();
	// var totalFooterHeight = $("#foot").outerHeight();

	// $("#mainContainer").height(h + 'px');
	
	// var contentHeight = h - totalHeaderHeight - totalFooterHeight;

	// if(contentHeight > maxContentHeight) contentHeight = maxContentHeight;
	// if(contentHeight < minContentHeight) contentHeight = minContentHeight;

	// $("#contentTable,#contentText").height(contentHeight + 'px');
	// $("#contentDividerImage").height((contentHeight-48) + 'px');
	$("#contentDividerImage").height((minContentHeight-48) + 'px');
}

$(window).bind("resize", resizeFunction);