(function($){$.fn.shadowEnable=function(){return $(this).find("+ .fx-shadow").show().end();};$.fn.shadowDisable=function(){return $(this).find("+ .fx-shadow").hide().end();};$.fn.shadowDestroy=function(){return $(this).find("+ .fx-shadow").remove().end();};$.fn.shadow=function(options){options=$.extend({offset:5,opacity:0.2,color:"#000"},options||{});return this.each(function(){var $element=$(this).shadowDestroy(),$shadow=$("<div class='fx-shadow' style='position: relative;'></div>").insertAfter($element);baseWidth=$element.outerWidth(),baseHeight=$element.outerHeight(),position=$element.position(),zIndex=parseInt($element.css("zIndex"))||0;$('<div class="fx-shadow-color"></div>').css({position:'absolute',opacity:options.opacity,left:options.offset,top:options.offset,width:baseWidth-1,height:baseHeight-1}).appendTo($shadow);$("div.fx-shadow-color",$shadow).css("background-color",options.color);$element.css({zIndex:zIndex+1,position:($element.css("position")=="static"?"relative":"")});$shadow.css({position:"absolute",zIndex:zIndex,top:position.top+"px",left:position.left+"px",width:baseWidth,height:baseHeight,marginLeft:$element.css("marginLeft"),marginRight:$element.css("marginRight"),marginBottom:$element.css("marginBottom"),marginTop:$element.css("marginTop")});});};})(jQuery);

