// default.layout.js

$(document).ready(function() {
	resizeContent();
	resize(); // Bild in Sidebar
});

$(window).resize(function() {
	resizeContent();
});


function resizeContent() {
	// Größe von #stage und #layout an Fenstergröße anpassen
	if($('#stage')) {
		newHeightS = $(window).height() - 30;
		$('#stage').css("height",newHeightS+"px");
	}
	if($('#layout')) {
		newHeightL = $(window).height() - 275;
		
		if(newHeightL < 425) {
			$('#layout').css("height","425px");
		} else {
			$('#layout').css("height",newHeightL+"px");
		}
	}
	
	// #sidebar soll mit #content abschließen
	if($('.imageOver').length > 0) {
		
	} else {
		contentHeight = $('#content').height();
		sidebarHeight = $('#sidebar').height();
		
		bottom = contentHeight - sidebarHeight;
		
		bottom = bottom + 25;
		//alert(bottom+'px');
		
		$('#sidebar').css("bottom",bottom+"px");
	}
}