(function(a){var c;a.fn.showMessage=function(g){var b=a.extend({thisMessage:[""],className:"notification",position:"top",zIndex:1001,opacity:90,useEsc:!0,displayNavigation:!0,autoClose:!1,delayTime:5E3,closeText:"close",escText:"Esc Key or"},g);this.each(function(){a("#showMessage",window.parent.document).length&&a("#showMessage",window.parent.document).remove();var d=a("<div></div>").css({display:"none",position:"fixed","z-index":b.zIndex,left:0,width:"100%",margin:0,filter:"Alpha(Opacity="+b.opacity+
")",opacity:b.opacity/100}).attr("id","showMessage").addClass(b.className);b.position=="top"?a(d).css("top",0):a(d).css("bottom",0);b.useEsc?a(window).keydown(function(b){if((b===null?window.event.keyCode:b.which)==27)a("#showMessage",window.parent.document).fadeOut(),typeof c!="undefined"&&clearTimeout(c)}):a(window).unbind("keydown");if(b.displayNavigation){var e=a("<span></span>").css({"float":"right","padding-right":"1em","font-weight":"bold","font-size":"small"});b.useEsc&&a(e).html(b.escText+
" ");var f=a("<a></a>").attr({href:"",title:b.closeText}).css("text-decoration","underline").click(function(){a("#showMessage",window.parent.document).fadeOut();clearTimeout(c);return!1}).text(b.closeText);a(e).append(f);a(d).append(e)}else a(window).click(function(){a("#showMessage",window.parent.document).length&&(a("#showMessage",window.parent.document).fadeOut(),a(window).unbind("click"),typeof c!="undefined"&&clearTimeout(c))});for(var e=a("<div></div>").css({width:"90%",margin:"1em auto",padding:"0.5em"}),
f=a("<ul></ul>").css({"font-weight":"bold","margin-left":0,"padding-left":0}),h=0;h<b.thisMessage.length;h++){var g=a("<li></li>").html(b.thisMessage[h]).css({"list-style-image":"none","list-style-position":"outside","list-style-type":"none"});a(f).append(g)}a(e).append(f);a(d).append(e);b.position=="top"?a(this,window.parent.document).prepend(d):a(this,window.parent.document).append(d);a(d).fadeIn();b.autoClose&&(typeof c!="undefined"&&clearTimeout(c),c=setTimeout(function(){a("#showMessage",
window.parent.document).fadeOut()},b.delayTime))})};a.fn.showMessage.closeMessage=function(){a("#showMessage",window.parent.document).length&&(clearTimeout(c),a("#showMessage",window.parent.document).fadeOut())}})(jQuery);