(function($){$.fn.extend({easymodalbox:function(options){var defaults={bgColor:"#000",bgOpacity:0.5,lockScroll:false,contentAjax:true};var options=$.extend(defaults,options);return this.each(function(){var o=options;var modalObj=$(this);var modalObjWidth=modalObj.width();var modalObjHeight=modalObj.height();var documentWidth=$(document).width();var documentHeight=$(document).height();var cssHtmlRestore={overflowX:$("body").css("overflowX"),overflowY:$("body").css("overflowY")};var cssModalObj={position:"absolute",widht:modalObjWidth+"px",height:modalObjHeight+"px",marginLeft:"-"+modalObjWidth/2+"px",marginTop:"-"+modalObjHeight/2+"px",left:"50%",top:"50%",zIndex:"999"};var cssBoard={"background-color":o.bgColor,color:"rgb(0,40,244)",width:documentWidth+"px",height:documentHeight+"px",position:"absolute",display:"none",zIndex:"998",opacity:o.bgOpacity,top:"0px",left:"0px"};if(o.lockScroll==true){$("html").css("overflowX","hidden");$("html").css("overflowY","hidden")}$("body").prepend('<div id="modalBoard"></div>');$("#modalBoard").css(cssBoard).fadeIn("fast");$(modalObj).css(cssModalObj).fadeIn();$(".modalClose, div#modalBoard").click(function(){if(o.contentAjax){$(modalObj).fadeOut("fast")}else{$(modalObj).fadeOut("fast")}$("div#modalBoard").fadeOut("slow")})})}})})(jQuery);