+ }); */
+}
+
+Editor.prototype.showPopup = function(name, text)
+{
+ var self = this;
+ self.popupQueue.push( [name, text] )
+
+ if( self.popupQueue.length > 1)
+ return;
+
+ var box = $('#message-box > #' + name);
+ $('*.data', box).html(text);
+ box.fadeIn();
+
+ self._nextPopup = function() {
+ var elem = self.popupQueue.pop()
+ if(elem) {
+ var box = $('#message-box > #' + elem[0]);
+
+ box.fadeOut(300, function() {
+ $('*.data', box).html();
+
+ if( self.popupQueue.length > 0) {
+ box = $('#message-box > #' + self.popupQueue[0][0]);
+ $('*.data', box).html(self.popupQueue[0][1]);
+ box.fadeIn();
+ setTimeout(self._nextPopup, 5000);
+ }
+ });
+ }
+ }
+
+ setTimeout(self._nextPopup, 5000);