$(document).ready(function(){

    var ie = !!(window['ActiveXObject'] && window['XMLHttpRequest']);

    if(ie){
        initFix();
        updateCurvedCorners();
    }

});

function initFix(){
    //$("#Middle").corner();
    //$("#NavMenu #Menu").css("border", "0px");
}

function updateCurvedCorners(){

    var ie = !!(window['ActiveXObject'] && window['XMLHttpRequest']);

    if(ie){
        fixCurvedCorners();
    }
}

function fixCurvedCorners(){

    //alert( '$(".curved").length : '+$(".curved").length );
    //alert( $(".curvedTop").length );
    //alert( $(".curvedBottom").length );

//    var boundary = $('<div>');
//
//    boundary.css('padding', '1px');
//    boundary.css('background-color', '#000');
//
//    //$(".curved").wrap( boundary );
//
//    $(".curved").corner("cc:#faf5b6 keep");
//    $(".curvedTop").corner("top 10px cc:#faf5b6 keep");
//    $(".curvedBottom").corner("bottom 10px cc:#faf5b6 keep");
//
//    $(".curved"       ).attr("class", "curvedFixed"       );
//    $(".curvedTop"    ).attr("class", "curvedTopFixed"    );
//    $(".curvedBottom" ).attr("class", "curvedBottomFixed" );


//    $(".curvedBottom" ).each( function (index, elem ) {
//        alert(elem.html()+", "+index);
//        curvyCorners.adjust(elem, "background-position", "bottom");
//    });

    //curvyCorners.redraw();

    //$(".curved").corner("bevel 8px").parent().css('padding', '10px').corner("bevel 14px");
}

//$(this).corner("round 8px").parent().css('padding', '4px').corner("round 10px");

//$(".curved").corner("sc:faf5b6");
//$(".curvedTop").corner("sc:faf5b6");
//$(".curvedBottom").corner("sc:faf5b6");

//$(".curved").corner("round 10px").parent().css('padding', '4px').corner("round 10px");
//$(".curved").corner("round 10px").parent().css('padding', '4px').corner("round 10px");
//$(".curved").corner("round 10px").parent().css('padding', '4px').corner("round 10px");

