function roundTopCorners(){
	var i;
	var cn = 'r';
	var d = document.createElement("span");
	d.className = "rtop";
	var lim = 4;
	for(i=1;i<=lim;i++){
	    var x = document.createElement("span");
	    x.className=cn + i;
	    d.appendChild(x);
	}
	$(".roundedTop").wrap("<div class='extRoundTop' />");
	$(d).prependTo(".extRoundTop");
	$(".extRoundTop").each(function(i) {
		//$(this).outerWidth($(this).children("div").outerWidth());
		$(this).children(".rtop").children().css("background-color", $(this).children("div").css("background-color"));
		
		$(this).css("margin-top", $(this).children("div").css("margin-top"));
		$(this).children("div").css("margin-top", "0");
		$(this).css("float", $(this).children("div").css("float"));
	});
	
}

function roundBottomCorners(){
	var i;
	var cn = 'r';
	var lim = 4;
	
	var b = document.createElement("span");
	b.className = "rbottom";
	for(i=lim;i>0;i--){
	    var x = document.createElement("span");
	    x.className=cn + i;
	    b.appendChild(x);
	}
	$(".roundedBottom").wrap("<div class='extRoundBottom' />");
	$(b).appendTo(".extRoundBottom");
	$(".extRoundBottom").each(function(i) {
		//$(this).outerWidth($(this).children("div").outerWidth());
		$(this).children(".rbottom").children().css("background-color", $(this).children("div").css("background-color"));

		$(this).css("margin-bottom", $(this).children("div").css("margin-bottom"));
		$(this).children("div").css("margin-bottom", "0");
		$(this).css("float", $(this).children("div").css("float"));
	});
}

function roundCorners() {
	roundBottomCorners();
	roundTopCorners();
	$("#rightbar").height($("#contentbody").innerHeight() - 90);
}

