(function(){var b,c,a=function(d,e){return function(){return d.apply(e,arguments)}};b=(function(){function d(f,i,h,g,e){this.type=f;this.text=i;this.timeout=h;this.notificator=g;this.position=e;this.moveUp=a(this.moveUp,this);this.remove=a(this.remove,this);this.dom=$('<div class="notification '+this.type+'">\n    '+this.text+"\n</div>");this.active=true;this.position=0;this.dom.css({top:this.position+"px",left:"300px"});this.dom.animate({left:"0px"},500,"swing");setTimeout(this.remove,this.timeout)}d.prototype.remove=function(){return this.dom.fadeTo(500,0,(function(e){return function(){e.notificator.notifications.pop(e);return e.dom.remove()}})(this))};d.prototype.moveUp=function(e){this.position-=e;return this.dom.animate({top:this.position+"px"},500,"swing")};return d})();c=(function(){function d(){this.notifications=[]}d.prototype.notify=function(f,k,i){var j,l,h,e,g;if(i==null){i=7000}g=this.notifications;l=(function(m){return function(n){return n.moveUp(-50)}})(this);for(h=0,e=g.length;h<e;h++){j=g[h];l(j)}j=new b(f,k,i,this,0);this.notifications.push(j);return $("#notifications").append(j.dom)};return d})();window.Notificator=new c()}).call(this);