(function($){$.fn.modernBox=function(d){d=$.extend({contentWrapper:"",applyPngFix:true},d);var e=false;if(window.Modernizr){e=!Modernizr.borderradius||!Modernizr.boxshadow}if(e){if(window.DD_belatedPNG){$("#container").css({position:"relative",left:0})}this.each(function(){var t=$(this),wrap;if(t.parents(".with-fallback").length>0){return}if(t.data("modernBox")===true){t.children(".boxfix").remove()}if(typeof d.contentWrapper=="string"&&d.contentWrapper.length>0){wrap=$(d.contentWrapper);wrap.append(t.children());t.prepend(wrap)}var a=[$("<div/>").addClass("boxfix").get(0),$("<div/>").addClass("boxfix1").get(0),$("<div/>").addClass("boxfix2").get(0),$("<div/>").addClass("boxfix3").get(0)];t.data("modernBox",true).append($(a[0]).append($(a.slice(1))));if(window.DD_belatedPNG||$("html.msie-7-down").length>0){var b=!!this.currentStyle?this.currentStyle.marginBottom:"0";if(b!="0"){t.css("margin-bottom",0).next().css("margin-top",b)}var r=function(s){return(s||"0").replace(/px$/i,"")};var c={top:Number(!!this.currentStyle?r(this.currentStyle.paddingTop):"0"),right:Number(!!this.currentStyle?r(this.currentStyle.paddingRight):"0"),bottom:Number(!!this.currentStyle?r(this.currentStyle.paddingBottom):"0"),left:Number(!!this.currentStyle?r(this.currentStyle.paddingLeft):"0")};t.children(".boxfix").width(t.width()+c.left+c.right-$(a[2]).width()).height(t.height()+c.top+c.bottom-$(a[1]).height());$([a[2],a[3]]).css("left",$(a[0]).width());$([a[1],a[3]]).css("top",$(a[0]).height());if(d.applyPngFix){$(a).belatedPNG()}}})}return this}})(jQuery);
