(function(a){a.fn.extend({leanModal:function(c){var d={top:100,bottom:100,overflow:"scroll",overlay:0.5};c=a.extend(d,c);return this.each(function(){var e=c;a(this).click(function(j){var f=a("
");var i=a(this).attr("href");a("body").append(f);a("#lean_overlay").click(function(){b(i)});var h=a(i).outerHeight();var g=a(i).outerWidth();a("#lean_overlay").css({display:"block",opacity:0});a("#lean_overlay").fadeTo(200,e.overlay);a(i).css({display:"block",position:"fixed",opacity:0,"z-index":11000,left:50+"%","margin-left":-(g/2)+"px",top:e.top+"px",bottom:e.bottom+"px",overflow:e.overflow});a(i).fadeTo(200,1);j.preventDefault()})});function b(e){a("#lean_overlay").fadeOut(200);a(e).css({display:"none"})}}})})(jQuery);