!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),i(t),t}:i(jQuery)}(function(a){a.jGrowl=function(e,t){0===a("#jGrowl").length&&a('
').addClass(t&&t.position?t.position:a.jGrowl.defaults.position).appendTo(t&&t.appendTo?t.appendTo:a.jGrowl.defaults.appendTo),a("#jGrowl").jGrowl(e,t)},a.fn.jGrowl=function(e,t){if(void 0===t&&a.isPlainObject(e)&&(e=(t=e).message),a.isFunction(this.each)){var i=arguments;return this.each(function(){void 0===a(this).data("jGrowl.instance")&&(a(this).data("jGrowl.instance",a.extend(new a.fn.jGrowl,{notifications:[],element:null,interval:null})),a(this).data("jGrowl.instance").startup(this)),a.isFunction(a(this).data("jGrowl.instance")[e])?a(this).data("jGrowl.instance")[e].apply(a(this).data("jGrowl.instance"),a.makeArray(i).slice(1)):a(this).data("jGrowl.instance").create(e,t)})}},a.extend(a.fn.jGrowl.prototype,{defaults:{pool:0,header:"",group:"",sticky:!1,position:"top-right",appendTo:"body",glue:"after",theme:"default",themeState:"highlight",corners:"10px",check:250,life:3e3,closeDuration:"normal",openDuration:"normal",easing:"swing",closer:!0,closeTemplate:"×",closerTemplate:"[ close all ]
",log:function(){},beforeOpen:function(){},afterOpen:function(){},open:function(){},beforeClose:function(){},close:function(){},click:function(){},animateOpen:{opacity:"show"},animateClose:{opacity:"hide"}},notifications:[],element:null,interval:null,create:function(e,t){var i=a.extend({},this.defaults,t);void 0!==i.speed&&(i.openDuration=i.speed,i.closeDuration=i.speed),this.notifications.push({message:e,options:i}),i.log.apply(this.element,[this.element,e,i])},render:function(e){var t=this,i=e.message,n=e.options;n.themeState=""===n.themeState?"":"ui-state-"+n.themeState;var o=a("").addClass("jGrowl-notification alert "+n.themeState+" ui-corner-all"+(void 0!==n.group&&""!==n.group?" "+n.group:"")).append(a("").addClass("jGrowl-close").html(n.closeTemplate)).append(a("").addClass("jGrowl-header").html(n.header)).append(a("").addClass("jGrowl-message").html(i)).data("jGrowl",n).addClass(n.theme).children(".jGrowl-close").bind("click.jGrowl",function(){return a(this).parent().trigger("jGrowl.beforeClose"),!1}).parent();a(o).bind("mouseover.jGrowl",function(){a(".jGrowl-notification",t.element).data("jGrowl.pause",!0)}).bind("mouseout.jGrowl",function(){a(".jGrowl-notification",t.element).data("jGrowl.pause",!1)}).bind("jGrowl.beforeOpen",function(){!1!==n.beforeOpen.apply(o,[o,i,n,t.element])&&a(this).trigger("jGrowl.open")}).bind("jGrowl.open",function(){!1!==n.open.apply(o,[o,i,n,t.element])&&("after"==n.glue?a(".jGrowl-notification:last",t.element).after(o):a(".jGrowl-notification:first",t.element).before(o),a(this).animate(n.animateOpen,n.openDuration,n.easing,function(){!1===a.support.opacity&&this.style.removeAttribute("filter"),null!==a(this).data("jGrowl")&&void 0!==a(this).data("jGrowl")&&(a(this).data("jGrowl").created=new Date),a(this).trigger("jGrowl.afterOpen")}))}).bind("jGrowl.afterOpen",function(){n.afterOpen.apply(o,[o,i,n,t.element])}).bind("click",function(){n.click.apply(o,[o,i,n,t.element])}).bind("jGrowl.beforeClose",function(){!1!==n.beforeClose.apply(o,[o,i,n,t.element])&&a(this).trigger("jGrowl.close")}).bind("jGrowl.close",function(){a(this).data("jGrowl.pause",!0),a(this).animate(n.animateClose,n.closeDuration,n.easing,function(){a.isFunction(n.close)?!1!==n.close.apply(o,[o,i,n,t.element])&&a(this).remove():a(this).remove()})}).trigger("jGrowl.beforeOpen"),""!==n.corners&&void 0!==a.fn.corner&&a(o).corner(n.corners),1'),this.interval=setInterval(function(){var t=a(e).data("jGrowl.instance");if(void 0!==t)try{t.update()}catch(e){throw t.shutdown(),e}},parseInt(this.defaults.check,10))},shutdown:function(){try{a(this.element).removeClass("jGrowl").find(".jGrowl-notification").trigger("jGrowl.close").parent().empty()}catch(e){throw e}finally{clearInterval(this.interval)}},close:function(){a(this.element).find(".jGrowl-notification").each(function(){a(this).trigger("jGrowl.beforeClose")})}}),a.jGrowl.defaults=a.fn.jGrowl.prototype.defaults});
//# sourceMappingURL=jquery.jgrowl.map