jQuery.fn.shadow = function(options){
          
  var boxOuter        = $('<div style="position:relative" />');         
  var boxInner        = $('<div style="background-color:white;" />');
            
  var boxOuter1       = $('<div style="margin-left:4px;margin-right:4px;position:relative;"><div style="height:' + options.width + 'px"><div style="background-image:url(/wLayout/wGlobal/layout/images/shadows/bg-h.png);background-position:top left;left:0;position:absolute;width:50%;height:' + options.width + 'px"/><div style="background-image:url(/wLayout/wGlobal/layout/images/shadows/bg-h.png);background-position:top right;right:0;position:absolute;width:50%;height:' + options.width + 'px"/></div></div>');                
  var boxOuter2       = $('<div style="margin-right:4px;background-image:url(/wLayout/wGlobal/layout/images/shadows/bg-v.png);background-repeat:no-repeat;background-position:right center;padding-right:' + options.width + 'px"/>');
  var boxOuter3       = $('<div style="margin-left:4px;margin-right:4px;position:relative;"><div style="width:100%;height:' + options.width + 'px"><div style="background-image:url(/wLayout/wGlobal/layout/images/shadows/bg-h.png);background-position:bottom left;left:0;position:absolute;width:50%;height:' + options.width + 'px"/><div style="background-image:url(/wLayout/wGlobal/layout/images/shadows/bg-h.png);background-position:bottom right;right:0;position:absolute;width:50%;height:' + options.width + 'px"/></div></div>');   	
  var boxOuter4       = $('<div style="margin-left:4px;background-image:url(/wLayout/wGlobal/layout/images/shadows/bg-v.png);background-repeat:no-repeat;background-position:left center;padding-left:' + options.width + 'px"/>');
              	
  $(this).wrap(boxOuter);
  
  boxOuter1.insertBefore($(this));
  boxOuter3.insertAfter($(this));
  
  $(this).wrap(boxOuter2);
  $(this).wrap(boxOuter4);
  $(this).wrap(boxInner);
  
  if($(this).css('marginTop') != ''){
    boxOuter.css('marginTop', String(parseInt($(this).css('marginTop')) - options.width) + 'px');
    $(this).css('marginTop', '0');
  } 
  if($(this).css('marginRight') != ''){
    boxOuter2.css('margin-right', String(parseInt($(this).css('marginRight')) - options.width) + 'px');
    $(this).css('marginRight', '0');
  }      
  if($(this).css('marginBottom') != ''){
    boxOuter.css('marginBottom', String(parseInt($(this).css('marginBottom')) - options.width));
    $(this).css('marginBottom', '0');
  }
  if($(this).css('marginLeft') != ''){
    //alert(String(parseInt($(this).css('marginLeft')) - options.width) + 'px');
    boxOuter4.css('margin-left', String(parseInt($(this).css('marginLeft')) - options.width) + 'px');
    //alert(boxOuter4.css('margin-left'));
    $(this).css('marginLeft', '0');
  }  
  
  //if($(this).attr('id') != ''){
  //  var id = $(this).attr('id');
  //  $(this).attr('id', '');
  //  boxOuter.attr('id', id);
  //}                         	
}
