function init() {
	
	$$('div.rounded').each( function(div) {
		var radius = 5;
		roundCorners(div, radius, radius, radius, radius);
	});
	
	var height = 0;
	
	$$('div#main_content>div').each(function(div) {
		if(div.getHeight()>height) {
			height = div.getHeight();
		}
	});
	
	$('main_content').setStyle("height:" + height + "px");
}

function roundCorners(div, topLeft, topRight, bottomLeft, bottomRight) {
	var settings = {
	      tl: { radius: topLeft },
	      tr: { radius: topRight },
	      bl: { radius: bottomLeft },
	      br: { radius: bottomRight },
	      antiAlias: true,
	      autoPad: true
	    }
	
	var cornersObj = new curvyCorners(settings, div);
	
	cornersObj.applyCornersToAll();
}

document.observe("dom:loaded", init);