jQuery(function(){
	positionContent();
})

jQuery(window).resize(function(){
	positionContent();
})

function positionContent() {
	
	var windowHeight = jQuery(window).height();
	var contentHeight = jQuery('#container').height();
	var positionFromTop = (windowHeight - contentHeight) / 2;
	
	if (positionFromTop <= 50) {
		jQuery('#container').css('margin-top', '50px');
	} else {
		jQuery('#container').css('margin-top', positionFromTop);
	}
}
