//dimScreen()
//by Brandon Goldman
jQuery.extend({
    //dims the screen
    dimScreen: function(speed, opacity, callback) {
        opacity = opacity || 0.5;
        jQuery('<div></div>').attr('id', '__dimScreen').css({
            background: '#000'
            ,height: document.body.clientHeight + 'px'
            ,left: '0px'
            ,position: 'absolute'
            ,top: '0px'
            ,width: document.body.clientWidth + 'px'
            ,zIndex: 999
        }).appendTo(document.body).fadeTo(0, 0).fadeTo(opacity, speed, callback);
    },
   
    //stops current dimming of the screen
    dimScreenStop: function() {
        jQuery('#__dimScreen').remove();
    }
});


