function showNotification(n){var t={showAfter:0,duration:0,autoClose:!1,type:"success",message:"",link_notification:"",description:"",imagepath:""},f,e,i,o,r,u;$.extend(!0,t,n),f="succ_bg",t.type=="error"?f="error_bg":t.type=="information"?f="info_bg":t.type=="warning"&&(f="warn_bg"),e="tick.png",t.type=="error"?e="error.png":t.type=="information"?e="information.png":t.type=="warning"&&(e="warning.png"),i='<div id="info_message" class="notification_background '+f+'" onclick="return closeNotification();" title="Click to Hide Notification"><div class="center_auto"><div class="info_message_text message_area">',i+='<img class="message_icon" src="'+t.imagepath+e+'" alt="'+t.type+'" title="'+t.type+'" />&nbsp;',i+=t.message.replaceAll("\\n","<br />"),i+='<\/div><div class="info_progress"><\/div><div class="clearboth"><\/div>',i+="<\/div>",$notification=$(i),$("body").append($notification),o=$("div#info_message").height(),$("div#info_message").css({top:"-"+o+"px"}),$("div#info_message").show(),slideDownNotification(t.showAfter,t.autoClose,t.duration),r=t.duration+"s",u=t.duration-1+"s",$("div#info_message").css("-webkit-animation-duration",r).css("-moz-animation-duration",r).css("-o-animation-duration",r).css("-ms-animation-duration",r).css("animation-duration",r),$("#info_message .info_progress").css("-webkit-animation-duration",u).css("-moz-animation-duration",u).css("-o-animation-duration",u).css("-ms-animation-duration",u).css("animation-duration",u);$("body").on("click",".link_notification",function(){$(".info_more_descrption").html(t.description).slideDown("fast")})}function closeNotification(n){var t=$("div#info_message").height();setTimeout(function(){$("div#info_message").animate({top:"-"+t}),setTimeout(function(){$("div#info_message").remove()},200)},parseInt(n*1e3))}function slideDownNotification(n,t,i){setTimeout(function(){$("div#info_message").animate({top:0}),t&&setTimeout(function(){closeNotification(i)},i)},parseInt(n*1e3))}String.prototype.replaceAll=function(n,t,i){var r,u=-1,f;if((r=this.toString())&&typeof n=="string")for(f=i===!0?n.toLowerCase():undefined;(u=f!==undefined?r.toLowerCase().indexOf(f,u>=0?u+t.length:0):r.indexOf(n,u>=0?u+t.length:0))!==-1;)r=r.substring(0,u).concat(t).concat(r.substring(u+n.length));return r};