
function AdjustHeight()
{
    var multiplier = 224;
    var totalEndPieces = 224;
    var minHeight = 896; // stupid web 2.0 crap doesn't load until later.
	// 800 pixels isn't enough for chrome's font.. :(

    var ptop = parseInt($("#main").css('padding-top'));
    var pbot = parseInt($("#main").css('padding-bottom'));
    var mainheight = $("#main").height() + ptop + pbot;
    var totalheight = mainheight;
    if (mainheight < minHeight) {
        totalheight = minHeight;
    }

    var adjustedheight = totalheight + multiplier - (totalheight - totalEndPieces) % multiplier - ptop - pbot;
    $(".bar_container_left_middle").css("height", adjustedheight - totalEndPieces);
    $(".bar_container_right_middle").css("height", adjustedheight - totalEndPieces);

    $("#main_center").css("height", adjustedheight);
    $("#sidebar_center").css("height", adjustedheight);
}

function OnReady()
{
	AdjustHeight();
    $(".tweet").tweet({
        join_text: "",
        username: "24CaretGames",
        count: 5,
        auto_join_text_default: "",
        auto_join_text_ed: "",
        auto_join_text_ing: "",
        auto_join_text_reply: "",
        auto_join_text_url: "",
        loading_text: "loading tweets..."
    });
}

function OnLoad()
{
	AdjustHeight();
}
