jquery.noty.packaged.min.js
23.5 KB
/*!
@package noty - jQuery Notification Plugin
@version version: 2.3.4
@contributors https://github.com/needim/noty/graphs/contributors
@documentation Examples and Documentation - http://needim.github.com/noty/
@license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php
*/
!function(e,t){if(typeof define==="function"&&define.amd){define(["jquery"],t)}else{t(e.jQuery)}}(this,function(e){if(typeof Object.create!=="function"){Object.create=function(e){function t(){}t.prototype=e;return new t}}var t={init:function(t){this.options=e.extend({},e.noty.defaults,t);this.options.layout=this.options.custom?e.noty.layouts["inline"]:e.noty.layouts[this.options.layout];if(e.noty.themes[this.options.theme])this.options.theme=e.noty.themes[this.options.theme];else t.themeClassName=this.options.theme;delete t.layout;delete t.theme;this.options=e.extend({},this.options,this.options.layout.options);this.options.id="noty_"+(new Date).getTime()*Math.floor(Math.random()*1e6);this.options=e.extend({},this.options,t);this._build();return this},_build:function(){var t=e('<div class="noty_bar noty_type_'+this.options.type+'"></div>').attr("id",this.options.id);t.append(this.options.template).find(".noty_text").html(this.options.text);this.$bar=this.options.layout.parent.object!==null?e(this.options.layout.parent.object).css(this.options.layout.parent.css).append(t):t;if(this.options.themeClassName)this.$bar.addClass(this.options.themeClassName).addClass("noty_container_type_"+this.options.type);if(this.options.buttons){this.options.closeWith=[];this.options.timeout=false;var n=e("<div/>").addClass("noty_buttons");this.options.layout.parent.object!==null?this.$bar.find(".alert").append(n):this.$bar.append(n);var r=this;e.each(this.options.buttons,function(t,n){var i=e("<button/>").addClass(n.addClass?n.addClass:"gray").html(n.text).attr("id",n.id?n.id:"button-"+t).appendTo(r.$bar.find(".noty_buttons")).on("click",function(t){if(e.isFunction(n.onClick)){n.onClick.call(i,r,t)}})})}this.$message=this.$bar.find(".noty_message");this.$closeButton=this.$bar.find(".noty_close");this.$buttons=this.$bar.find(".noty_buttons");e.noty.store[this.options.id]=this},show:function(){var t=this;t.options.custom?t.options.custom.find(t.options.layout.container.selector).append(t.$bar):e(t.options.layout.container.selector).append(t.$bar);if(t.options.theme&&t.options.theme.style)t.options.theme.style.apply(t);e.type(t.options.layout.css)==="function"?this.options.layout.css.apply(t.$bar):t.$bar.css(this.options.layout.css||{});t.$bar.addClass(t.options.layout.addClass);t.options.layout.container.style.apply(e(t.options.layout.container.selector));t.showing=true;if(t.options.theme&&t.options.theme.style)t.options.theme.callback.onShow.apply(this);if(e.inArray("click",t.options.closeWith)>-1)t.$bar.css("cursor","pointer").one("click",function(e){t.stopPropagation(e);if(t.options.callback.onCloseClick){t.options.callback.onCloseClick.apply(t)}t.close()});if(e.inArray("hover",t.options.closeWith)>-1)t.$bar.one("mouseenter",function(){t.close()});if(e.inArray("button",t.options.closeWith)>-1)t.$closeButton.one("click",function(e){t.stopPropagation(e);t.close()});if(e.inArray("button",t.options.closeWith)==-1)t.$closeButton.remove();if(t.options.callback.onShow)t.options.callback.onShow.apply(t);if(typeof t.options.animation.open=="string"){t.$bar.css("height",t.$bar.innerHeight());t.$bar.show().addClass(t.options.animation.open).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){if(t.options.callback.afterShow)t.options.callback.afterShow.apply(t);t.showing=false;t.shown=true})}else{t.$bar.animate(t.options.animation.open,t.options.animation.speed,t.options.animation.easing,function(){if(t.options.callback.afterShow)t.options.callback.afterShow.apply(t);t.showing=false;t.shown=true})}if(t.options.timeout)t.$bar.delay(t.options.timeout).promise().done(function(){t.close()});return this},close:function(){if(this.closed)return;if(this.$bar&&this.$bar.hasClass("i-am-closing-now"))return;var t=this;if(this.showing){t.$bar.queue(function(){t.close.apply(t)});return}if(!this.shown&&!this.showing){var n=[];e.each(e.noty.queue,function(e,r){if(r.options.id!=t.options.id){n.push(r)}});e.noty.queue=n;return}t.$bar.addClass("i-am-closing-now");if(t.options.callback.onClose){t.options.callback.onClose.apply(t)}if(typeof t.options.animation.close=="string"){t.$bar.addClass(t.options.animation.close).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){if(t.options.callback.afterClose)t.options.callback.afterClose.apply(t);t.closeCleanUp()})}else{t.$bar.clearQueue().stop().animate(t.options.animation.close,t.options.animation.speed,t.options.animation.easing,function(){if(t.options.callback.afterClose)t.options.callback.afterClose.apply(t)}).promise().done(function(){t.closeCleanUp()})}},closeCleanUp:function(){var t=this;if(t.options.modal){e.notyRenderer.setModalCount(-1);if(e.notyRenderer.getModalCount()==0)e(".noty_modal").fadeOut("fast",function(){e(this).remove()})}e.notyRenderer.setLayoutCountFor(t,-1);if(e.notyRenderer.getLayoutCountFor(t)==0)e(t.options.layout.container.selector).remove();if(typeof t.$bar!=="undefined"&&t.$bar!==null){if(typeof t.options.animation.close=="string"){t.$bar.css("transition","all 100ms ease").css("border",0).css("margin",0).height(0);t.$bar.one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){t.$bar.remove();t.$bar=null;t.closed=true;if(t.options.theme.callback&&t.options.theme.callback.onClose){t.options.theme.callback.onClose.apply(t)}})}else{t.$bar.remove();t.$bar=null;t.closed=true}}delete e.noty.store[t.options.id];if(t.options.theme.callback&&t.options.theme.callback.onClose){t.options.theme.callback.onClose.apply(t)}if(!t.options.dismissQueue){e.noty.ontap=true;e.notyRenderer.render()}if(t.options.maxVisible>0&&t.options.dismissQueue){e.notyRenderer.render()}},setText:function(e){if(!this.closed){this.options.text=e;this.$bar.find(".noty_text").html(e)}return this},setType:function(e){if(!this.closed){this.options.type=e;this.options.theme.style.apply(this);this.options.theme.callback.onShow.apply(this)}return this},setTimeout:function(e){if(!this.closed){var t=this;this.options.timeout=e;t.$bar.delay(t.options.timeout).promise().done(function(){t.close()})}return this},stopPropagation:function(e){e=e||window.event;if(typeof e.stopPropagation!=="undefined"){e.stopPropagation()}else{e.cancelBubble=true}},closed:false,showing:false,shown:false};e.notyRenderer={};e.notyRenderer.init=function(n){var r=Object.create(t).init(n);if(r.options.killer)e.noty.closeAll();r.options.force?e.noty.queue.unshift(r):e.noty.queue.push(r);e.notyRenderer.render();return e.noty.returns=="object"?r:r.options.id};e.notyRenderer.render=function(){var t=e.noty.queue[0];if(e.type(t)==="object"){if(t.options.dismissQueue){if(t.options.maxVisible>0){if(e(t.options.layout.container.selector+" li").length<t.options.maxVisible){e.notyRenderer.show(e.noty.queue.shift())}else{}}else{e.notyRenderer.show(e.noty.queue.shift())}}else{if(e.noty.ontap){e.notyRenderer.show(e.noty.queue.shift());e.noty.ontap=false}}}else{e.noty.ontap=true}};e.notyRenderer.show=function(t){if(t.options.modal){e.notyRenderer.createModalFor(t);e.notyRenderer.setModalCount(+1)}if(t.options.custom){if(t.options.custom.find(t.options.layout.container.selector).length==0){t.options.custom.append(e(t.options.layout.container.object).addClass("i-am-new"))}else{t.options.custom.find(t.options.layout.container.selector).removeClass("i-am-new")}}else{if(e(t.options.layout.container.selector).length==0){e("body").append(e(t.options.layout.container.object).addClass("i-am-new"))}else{e(t.options.layout.container.selector).removeClass("i-am-new")}}e.notyRenderer.setLayoutCountFor(t,+1);t.show()};e.notyRenderer.createModalFor=function(t){if(e(".noty_modal").length==0){var n=e("<div/>").addClass("noty_modal").addClass(t.options.theme).data("noty_modal_count",0);if(t.options.theme.modal&&t.options.theme.modal.css)n.css(t.options.theme.modal.css);n.prependTo(e("body")).fadeIn("fast");if(e.inArray("backdrop",t.options.closeWith)>-1)n.on("click",function(t){e.noty.closeAll()})}};e.notyRenderer.getLayoutCountFor=function(t){return e(t.options.layout.container.selector).data("noty_layout_count")||0};e.notyRenderer.setLayoutCountFor=function(t,n){return e(t.options.layout.container.selector).data("noty_layout_count",e.notyRenderer.getLayoutCountFor(t)+n)};e.notyRenderer.getModalCount=function(){return e(".noty_modal").data("noty_modal_count")||0};e.notyRenderer.setModalCount=function(t){return e(".noty_modal").data("noty_modal_count",e.notyRenderer.getModalCount()+t)};e.fn.noty=function(t){t.custom=e(this);return e.notyRenderer.init(t)};e.noty={};e.noty.queue=[];e.noty.ontap=true;e.noty.layouts={};e.noty.themes={};e.noty.returns="object";e.noty.store={};e.noty.get=function(t){return e.noty.store.hasOwnProperty(t)?e.noty.store[t]:false};e.noty.close=function(t){return e.noty.get(t)?e.noty.get(t).close():false};e.noty.setText=function(t,n){return e.noty.get(t)?e.noty.get(t).setText(n):false};e.noty.setType=function(t,n){return e.noty.get(t)?e.noty.get(t).setType(n):false};e.noty.clearQueue=function(){e.noty.queue=[]};e.noty.closeAll=function(){e.noty.clearQueue();e.each(e.noty.store,function(e,t){t.close()})};var n=window.alert;e.noty.consumeAlert=function(t){window.alert=function(n){if(t)t.text=n;else t={text:n};e.notyRenderer.init(t)}};e.noty.stopConsumeAlert=function(){window.alert=n};e.noty.defaults={layout:"top",theme:"defaultTheme",type:"alert",text:"",dismissQueue:true,template:'<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',animation:{open:{height:"toggle"},close:{height:"toggle"},easing:"swing",speed:500},timeout:false,force:false,modal:false,maxVisible:5,killer:false,closeWith:["click"],callback:{onShow:function(){},afterShow:function(){},onClose:function(){},afterClose:function(){},onCloseClick:function(){}},buttons:false};e(window).on("resize",function(){e.each(e.noty.layouts,function(t,n){n.container.style.apply(e(n.container.selector))})});window.noty=function(t){return jQuery.notyRenderer.init(t)};e.noty.layouts.bottom={name:"bottom",options:{},container:{object:'<ul id="noty_bottom_layout_container" />',selector:"ul#noty_bottom_layout_container",style:function(){e(this).css({bottom:0,left:"0",position:"fixed",width:"auto",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""};e.noty.layouts.bottomCenter={name:"bottomCenter",options:{},container:{object:'<ul id="noty_bottomCenter_layout_container" />',selector:"ul#noty_bottomCenter_layout_container",style:function(){e(this).css({bottom:20,left:0,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});e(this).css({left:(e(window).width()-e(this).outerWidth(false))/2+"px"})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.bottomLeft={name:"bottomLeft",options:{},container:{object:'<ul id="noty_bottomLeft_layout_container" />',selector:"ul#noty_bottomLeft_layout_container",style:function(){e(this).css({bottom:20,left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});if(window.innerWidth<600){e(this).css({left:5})}}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.bottomRight={name:"bottomRight",options:{},container:{object:'<ul id="noty_bottomRight_layout_container" />',selector:"ul#noty_bottomRight_layout_container",style:function(){e(this).css({bottom:20,right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});if(window.innerWidth<600){e(this).css({right:5})}}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.center={name:"center",options:{},container:{object:'<ul id="noty_center_layout_container" />',selector:"ul#noty_center_layout_container",style:function(){e(this).css({position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var t=e(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");e("body").append(t);t.find(".i-am-closing-now").remove();t.find("li").css("display","block");var n=t.height();t.remove();if(e(this).hasClass("i-am-new")){e(this).css({left:(e(window).width()-e(this).outerWidth(false))/2+"px",top:(e(window).height()-n)/2+"px"})}else{e(this).animate({left:(e(window).width()-e(this).outerWidth(false))/2+"px",top:(e(window).height()-n)/2+"px"},500)}}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.centerLeft={name:"centerLeft",options:{},container:{object:'<ul id="noty_centerLeft_layout_container" />',selector:"ul#noty_centerLeft_layout_container",style:function(){e(this).css({left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var t=e(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");e("body").append(t);t.find(".i-am-closing-now").remove();t.find("li").css("display","block");var n=t.height();t.remove();if(e(this).hasClass("i-am-new")){e(this).css({top:(e(window).height()-n)/2+"px"})}else{e(this).animate({top:(e(window).height()-n)/2+"px"},500)}if(window.innerWidth<600){e(this).css({left:5})}}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.centerRight={name:"centerRight",options:{},container:{object:'<ul id="noty_centerRight_layout_container" />',selector:"ul#noty_centerRight_layout_container",style:function(){e(this).css({right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var t=e(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");e("body").append(t);t.find(".i-am-closing-now").remove();t.find("li").css("display","block");var n=t.height();t.remove();if(e(this).hasClass("i-am-new")){e(this).css({top:(e(window).height()-n)/2+"px"})}else{e(this).animate({top:(e(window).height()-n)/2+"px"},500)}if(window.innerWidth<600){e(this).css({right:5})}}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.inline={name:"inline",options:{},container:{object:'<ul class="noty_inline_layout_container" />',selector:"ul.noty_inline_layout_container",style:function(){e(this).css({width:"auto",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""};e.noty.layouts.top={name:"top",options:{},container:{object:'<ul id="noty_top_layout_container" />',selector:"ul#noty_top_layout_container",style:function(){e(this).css({top:0,left:"0",position:"fixed",width:"auto",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""};e.noty.layouts.topCenter={name:"topCenter",options:{},container:{object:'<ul id="noty_topCenter_layout_container" />',selector:"ul#noty_topCenter_layout_container",style:function(){e(this).css({top:20,left:0,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});e(this).css({left:(e(window).width()-e(this).outerWidth(false))/2+"px"})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.topLeft={name:"topLeft",options:{},container:{object:'<ul id="noty_topLeft_layout_container" />',selector:"ul#noty_topLeft_layout_container",style:function(){e(this).css({top:20,left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});if(window.innerWidth<600){e(this).css({left:5})}}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.layouts.topRight={name:"topRight",options:{},container:{object:'<ul id="noty_topRight_layout_container" />',selector:"ul#noty_topRight_layout_container",style:function(){e(this).css({top:20,right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});if(window.innerWidth<600){e(this).css({right:5})}}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""};e.noty.themes.bootstrapTheme={name:"bootstrapTheme",modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e4,opacity:.6,display:"none",left:0,top:0}},style:function(){var t=this.options.layout.container.selector;e(t).addClass("list-group");this.$closeButton.append('<span aria-hidden="true">×</span><span class="sr-only">Close</span>');this.$closeButton.addClass("close");this.$bar.addClass("list-group-item").css("padding","0px");switch(this.options.type){case"alert":case"notification":this.$bar.addClass("list-group-item-info");break;case"warning":this.$bar.addClass("list-group-item-warning");break;case"error":this.$bar.addClass("list-group-item-danger");break;case"information":this.$bar.addClass("list-group-item-info");break;case"success":this.$bar.addClass("list-group-item-success");break}this.$message.css({fontSize:"13px",lineHeight:"16px",textAlign:"center",padding:"8px 10px 9px",width:"auto",position:"relative"})},callback:{onShow:function(){},onClose:function(){}}};e.noty.themes.defaultTheme={name:"defaultTheme",helpers:{borderFix:function(){if(this.options.dismissQueue){var t=this.options.layout.container.selector+" "+this.options.layout.parent.selector;switch(this.options.layout.name){case"top":e(t).css({borderRadius:"0px 0px 0px 0px"});e(t).last().css({borderRadius:"0px 0px 0px 0px"});break;case"topCenter":case"topLeft":case"topRight":case"bottomCenter":case"bottomLeft":case"bottomRight":case"center":case"centerLeft":case"centerRight":case"inline":e(t).css({borderRadius:"0px 0px 0px 0px"});e(t).first().css({"border-top-left-radius":"0","border-top-right-radius":"0"});e(t).last().css({"border-bottom-left-radius":"0","border-bottom-right-radius":"0"});break;case"bottom":e(t).css({borderRadius:"0px 0px 0px 0px"});e(t).first().css({borderRadius:"0px 0px 0px 0px"});break;default:break}}}},modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e4,opacity:.6,display:"none",left:0,top:0}},style:function(){this.$bar.css({overflow:"hidden"});this.$message.css({fontSize:"13px",lineHeight:"16px",textAlign:"center",padding:"8px 10px 9px",width:"auto",position:"relative"});this.$closeButton.css({position:"absolute",top:4,right:4,width:10,height:10,display:"none",cursor:"pointer"});this.$buttons.css({padding:5,textAlign:"right",borderTop:"1px solid #ccc",backgroundColor:"#fff"});this.$buttons.find("button").css({marginLeft:5});this.$buttons.find("button:first").css({marginLeft:0});this.$bar.on({mouseenter:function(){e(this).find(".noty_close").stop().fadeTo("normal",1)},mouseleave:function(){e(this).find(".noty_close").stop().fadeTo("normal",0)}});switch(this.options.layout.name){case"top":this.$bar.css({borderRadius:"0px 0px 5px 5px",borderBottom:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});break;case"topCenter":case"center":case"bottomCenter":case"inline":this.$bar.css({borderRadius:"5px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});this.$message.css({fontSize:"13px",textAlign:"center"});break;case"topLeft":case"topRight":case"bottomLeft":case"bottomRight":case"centerLeft":case"centerRight":this.$bar.css({borderRadius:"5px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});this.$message.css({fontSize:"13px",textAlign:"left"});break;case"bottom":this.$bar.css({borderRadius:"5px 5px 0px 0px",borderTop:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",boxShadow:"0 -2px 4px rgba(0, 0, 0, 0.1)"});break;default:this.$bar.css({border:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});break}switch(this.options.type){case"alert":case"notification":this.$bar.css({backgroundColor:"#FFF",border:"none",padding:"10px",borderRadius:0,borderColor:"#CCC",color:"#444"});break;case"warning":this.$bar.css({backgroundColor:"#FFEAA8",border:"none",padding:"10px",borderColor:"#EAD1AC",color:"#373737"});break;case"error":this.$bar.css({backgroundColor:"#FDBDBA",border:"none",padding:"10px",borderRadius:0,borderColor:"#FDBDBA",color:"#373737"});this.$message.css({fontWeight:"bold"});break;case"information":this.$bar.css({backgroundColor:"#B5D2DB",border:"none",padding:"10px",borderRadius:0,borderColor:"#B5D2DB",color:"#373737"});break;case"success":this.$bar.css({backgroundColor:"#A5DCD1",border:"none",padding:"10px",borderRadius:0,borderColor:"#A5DCD1",color:"#373737"});this.$buttons.css({borderTop:"1px solid #A5DCD1"});break;default:this.$bar.css({backgroundColor:"#FFF",border:"none",padding:"10px",borderRadius:0,borderColor:"#CCC",color:"#444"});break}},callback:{onShow:function(){e.noty.themes.defaultTheme.helpers.borderFix.apply(this)},onClose:function(){e.noty.themes.defaultTheme.helpers.borderFix.apply(this)}}};e.noty.themes.relax={name:"relax",helpers:{},modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e4,opacity:.6,display:"none",left:0,top:0}},style:function(){this.$bar.css({overflow:"hidden",margin:"4px 0",borderRadius:"2px"});this.$message.css({fontSize:"14px",lineHeight:"16px",textAlign:"center",padding:"10px",width:"auto",position:"relative"});this.$closeButton.css({position:"absolute",top:4,right:4,width:10,height:10,background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",display:"none",cursor:"pointer"});this.$buttons.css({padding:5,textAlign:"right",backgroundColor:"#fff"});this.$buttons.find("button").css({marginLeft:5});this.$buttons.find("button:first").css({marginLeft:0});this.$bar.on({mouseenter:function(){e(this).find(".noty_close").stop().fadeTo("normal",1)},mouseleave:function(){e(this).find(".noty_close").stop().fadeTo("normal",0)}});switch(this.options.layout.name){case"top":this.$bar.css({boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});break;case"topCenter":case"center":case"bottomCenter":case"inline":this.$message.css({fontSize:"13px",textAlign:"center"});break;case"topLeft":case"topRight":case"bottomLeft":case"bottomRight":case"centerLeft":case"centerRight":this.$message.css({fontSize:"13px",textAlign:"left"});break;case"bottom":break;default:break}switch(this.options.type){case"alert":case"notification":this.$bar.css({backgroundColor:"#FFF",borderColor:"#dedede",color:"#444"});break;case"warning":this.$bar.css({backgroundColor:"#FFEAA8",borderColor:"#FFC237",color:"#826200"});this.$buttons.css({borderTop:"1px solid #FFC237"});break;case"error":this.$bar.css({backgroundColor:"#FF8181",borderColor:"#e25353",color:"#FFF"});this.$message.css({fontWeight:"bold"});this.$buttons.css({borderTop:"1px solid darkred"});break;case"information":this.$bar.css({backgroundColor:"#78C5E7",borderColor:"#3badd6",color:"#FFF"});this.$buttons.css({borderTop:"1px solid #0B90C4"});break;case"success":this.$bar.css({backgroundColor:"#BCF5BC",borderColor:"#7cdd77",color:"darkgreen"});this.$buttons.css({borderTop:"1px solid #50C24E"});break;default:this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"});break}},callback:{onShow:function(){},onClose:function(){}}}})