(function(c){function d(e,f){e.onCleanup.call(this);f.fadeOut("fast",function(){c(this).remove();e.onClosed()})}function a(e,f){return c(document.createElement(e)).addClass(f)}var b={resize:function(f){var e=f.data("notification");e.east.add(e.west).add(e.center).animate({height:e.content.outerHeight()},250)}};c.extend({notify:function(t,i){if(b[t]){return b[t].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof t==="object"||!t){var j={inline:false,href:"",html:"",close:"",onStart:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){}},q,l=false,g,f=c("
  • ").addClass("notification"),k,o,p,r,e,n;t=c.extend(j,t);t.onStart.call(this);if(c("ul#notification_area").length){g=c("ul#notification_area")}else{g=c("").attr("id","notification_area");c("body").append(g)}if(t.href){if(t.inline){q=c(t.href).clone()}else{l=true;q=c("").attr("src",t.href).css({width:"100%",height:"100%"})}}else{if(t.html){q=c(t.html)}}f.append(a("div","notify_top").append(a("div","notify_nw"),k=a("div","notify_n"),a("div","notify_ne")),e=a("div","notify_center").append(p=a("div","notify_w"),n=a("div","notify_content").append(q),r=a("div","notify_e")),a("div","notify_bottom").append(a("div","notify_se"),o=a("div","notify_s"),a("div","notify_sw")));f.data("notification",{north:k,south:o,east:p,west:r,content:n,center:e}).css("visibility","hidden").appendTo(g);if(t.close){if(typeof t.close==="object"){var m="live";s=t.close}else{var s=c("").addClass("cl").html(t.close),m="bind";n.append(s)}}var h=0-parseInt(f.outerHeight());f.css("marginBottom",h);if(l){n.height(parseInt(n.find("iframe").height()+16))}k.width(parseInt(f.width())-40);o.width(parseInt(f.width())-40);p.height(parseInt(n.outerHeight()));r.height(parseInt(n.outerHeight()));e.height(parseInt(n.outerHeight())).css("overflow","hidden");f.animate({marginBottom:0},"fast",function(){f.hide().css("visibility","visible").fadeIn("fast");if(i){setTimeout(function(){d(t,f)},i)}if(!t.close){f.live("click",function(u){u.preventDefault();d(t,f)})}else{if(m=="bind"){s.bind("click",function(u){u.preventDefault();d(t,f)})}else{s.live("click",function(u){u.preventDefault();d(t,f)})}}t.onComplete.call(this)})}else{console.error('Method "'+t+"\" doesn't exist.")}}}})})(jQuery);