﻿function scvb_body_onload() {

    if ($.browser.msie && $.browser.version < 8) {
        scvb_fix_ie();
    }


    /* Bring background Image select button to foreground in Admin */

    if ($('#background .EditableImageEdit').length > 0) {
        $('#background .EditableImageEdit').wrap('<div id="EDITABLE_BACKGROUND" />');
        $('#EDITABLE_BACKGROUND').appendTo($('form'));
    }
    
}

// Function that moves inner #background DIV outside of all other DIVs.  This overcomes
// a z-index bug in earlier versions of IE. 
function scvb_fix_ie() {
       
    if ($('#background').length > 0) {
        $('#background').appendTo($('form'));
    } 
}

$(document).ready(function () { scvb_body_onload(); });
