function Notification(){this.$bar=$j('<div class="notification-bar"></div>');this.$barContainer=$j('<div class="notification-bar-container"></div>');this.$barContents=$j('<div class="notification-bar-contents"></div>');this.$barBackground=$j('<div class="notification-bar-bkg"></div>');this.$message=$j('<div class="message"></div>');this.$bar.hide();this.$barBackground.hide();this.$bar.click(function(a){this.removeAfterEvent(a)});this.className="message-info";this.timeoutInMilliseconds=3000}Notification.SLIDE_SPEED_IN_MS=300;Notification.prototype.remove=function(){var a=this;this.slideUp(function(){a.$bar.remove();a.$barBackground.remove();window.clearTimeout(a.timeout)})};Notification.prototype.removeAfterEvent=function(a){var b=$(a.target);if(b.get(0).nodeName.toLowerCase()=="a"&&b.hasParent(this.$message)){return}this.remove()};Notification.prototype.setMessage=function(a){this.msg=a;return this};Notification.prototype.show=function(){this.$message.addClass(this.className).html(this.msg);this.$barContainer.append(this.$barBackground).append(this.$bar.append(this.$barContents.append(this.$message)));$j("#notifications").append(this.$barContainer);this.$barBackground.height(this.$bar.height());this.showBar();if(this.onShow){this.onShow()}return this};Notification.prototype.removeInMilliseconds=function(){var a=this;a.timeout=window.setTimeout(function(){a.remove()},a.timeoutInMilliseconds)};Notification.prototype.showBar=function(){this.$bar.show();this.$barBackground.show();this.$bar.slideDown(Notification.SLIDE_SPEED_IN_MS);this.$barBackground.slideDown(Notification.SLIDE_SPEED_IN_MS)};Notification.prototype.onShow=function(){this.removeInMilliseconds()};Notification.prototype.slideUp=function(a){this.$bar.slideUp(Notification.SLIDE_SPEED_IN_MS);this.$barBackground.slideUp(Notification.SLIDE_SPEED_IN_MS,a)};