var BlipOverlay=(function(){var i=function(a){a=a||'overlay';this.wrapper=$('#'+a);if(!this.wrapper.length){$('body').append('<div id="'+a+'"></div>');this.wrapper=$('#'+a)}this.updateHeight()};i.prototype.duration=500;i.prototype.show=function(b,c,d){if(b&&typeof(c)=='number'){var e=this,ms=c*1000;c=function(){setTimeout(function(){e.hide(b,null)},ms)}}var f=20;if(b&&d){var g=$(window);b=$(b);f=Math.max(20,g.scrollTop()+(g.height()-d)/2);b.css({top:f}).show()}this.updateHeight(d+f+10);this.wrapper.fadeIn(this.duration,b||c?function(){if(b&&!d){b=$(b);var a=$(window);b.css({top:Math.max(20,a.scrollTop()+(a.height()-b.height())/2)}).show()}if(c){c()}}:null)};i.prototype.updateHeight=function(h){this.wrapper.height(Math.max(h||0,$(document).height()))};i.prototype.hide=function(a,b){if(a){$(a).hide()}this.wrapper.fadeOut(this.duration,b)};return i})();
