(function(A){A.fn.shadowEnable=function(){return A(this).find("+ .fx-shadow").show().end()};A.fn.shadowDisable=function(){return A(this).find("+ .fx-shadow").hide().end()};A.fn.shadowDestroy=function(){return A(this).find("+ .fx-shadow").remove().end()};A.fn.shadow=function(B){B=A.extend({offset:1,opacity:0.2,color:"#000",monitor:false},B||{});B.offset-=1;return this.each(function(){var C=A(this).shadowDestroy(),D=A("<div class='fx-shadow' style='position: relative;'></div>").hide().insertAfter(C);baseWidth=C.outerWidth(),baseHeight=C.outerHeight(),position=C.position(),zIndex=parseInt(C.css("zIndex"))||0;A('<div class="fx-shadow-color fx-shadow-layer-1"></div>').css({position:"absolute",opacity:B.opacity-0.05,left:B.offset,top:B.offset,width:baseWidth+1,height:baseHeight+1}).appendTo(D);A('<div class="fx-shadow-color fx-shadow-layer-2"></div>').css({position:"absolute",opacity:B.opacity-0.1,left:B.offset+2,top:B.offset+2,width:baseWidth,height:baseHeight-3}).appendTo(D);A('<div class="fx-shadow-color fx-shadow-layer-3"></div>').css({position:"absolute",opacity:B.opacity-0.1,left:B.offset+2,top:B.offset+2,width:baseWidth-3,height:baseHeight}).appendTo(D);A('<div class="fx-shadow-color fx-shadow-layer-4"></div>').css({position:"absolute",opacity:B.opacity,left:B.offset+1,top:B.offset+1,width:baseWidth-1,height:baseHeight-1}).appendTo(D);A("div.fx-shadow-color",D).css("background-color",B.color);C.css({zIndex:zIndex+1,position:(C.css("position")=="static"?"relative":"")});D.css({position:"absolute",zIndex:zIndex,top:position.top+"px",left:position.left+"px",width:baseWidth,height:baseHeight,marginLeft:C.css("marginLeft"),marginRight:C.css("marginRight"),marginBottom:C.css("marginBottom"),marginTop:C.css("marginTop")}).fadeIn();if(B.monitor){function E(){var F=A(this),G=F.next();G.css({top:parseInt(F.css("top"))+"px",left:parseInt(F.css("left"))+"px"});A(">*",G).css({height:this.offsetHeight+"px",width:this.offsetWidth+"px"})}C.bind("DOMAttrModified",E);if(D[0].style.setExpression){D[0].style.setExpression("top","parseInt(this.previousSibling.currentStyle.top ) + 'px'");D[0].style.setExpression("left","parseInt(this.previousSibling.currentStyle.left) + 'px'")}}})}})(jQuery)