//
function calcnewheight() {
	// For use within iPad developer UIWebView
	// Thanks to Andrew Hedges!
	var ua = navigator.userAgent;
	var isiPad = /iPad/i.test(ua) || /iPhone OS 3_1_2/i.test(ua) || /iPhone OS 3_2_2/i.test(ua);

	//
	if(!isiPad) {
		//
		var spaceLeft = ($(window).width() - $('#body > .mitte').width()) / 2;
		var elementsWidth = $('#body > .links').width()+2;
		//
		$('#body, #footer').css(
			'margin-left',
			(spaceLeft - elementsWidth) + 'px'
		);
		//
		$('#head, #navigation').css(
			'margin-left',
			(spaceLeft) + 'px'
		);
		// ende
	} else {
		// $('#headline').css('margin-left', $('#body > .links').width()+'px');
	}


	// hoehe setzen
	$('#body > .mitte, #body > .links, #body > .rechts').height($('#body > .mitte').height());
	$('#footer > .mitte, #footer > .links, #footer > .rechts').height($('#footer > .mitte').height());
	// ende
}

$(window).resize(function() {calcnewheight();});
$(document).ready(function() {calcnewheight()});
