(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 g(){var e=a(this),f=e.next();f.css({top:parseInt(e.css("top"))+"px",left:parseInt(e.css("left"))+"px"});a(">*",f).css({height:this.offsetHeight+"px",width:this.offsetWidth+"px"})}c.bind("DOMAttrModified",g);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);