Index: popup.js
===================================================================
--- popup.js	(revision 2893)
+++ popup.js	(working copy)
@@ -79,7 +79,7 @@
 
 
 PopupElement = function(element){
-
+  
   var thisObject = this;
 
   // Gather elements
@@ -176,27 +176,30 @@
 /* ---- DOM preparation ---- */
 
 
-
 PopupElement.dom = function(){
-
-  this.body.appendTo('#popup-active-overlay');
-
-  var classAttr = this.element.attr('class');
-  var styleClass = classAttr.match(/popup-style-[^'\s]+/);
-
-  this.body.wrap(
-      '<div id="' +
-        this.elementId +
-      '-active" class="popup-element-wrapper' + (styleClass ? ' ' + styleClass : '') + '">'
-    );
-
-  this.wrapper = this.body.parent();
-  this.wrapper.css('position', 'absolute');
-
-  // Wrap in origin element
-  this.body.wrap('<div class="popup-element-origin">');
-  this.origin = this.body.parent();
-  this.origin.css('position', 'absolute');
+  try{
+    this.body.appendTo('#popup-active-overlay');
+  
+    var classAttr = this.element.attr('class');
+    var styleClass = classAttr.match(/popup-style-[^'\s]+/);
+  
+    this.body.wrap(
+        '<div id="' +
+          this.elementId +
+        '-active" class="popup-element-wrapper' + (styleClass ? ' ' + styleClass : '') + '">'
+      );
+  
+    this.wrapper = this.body.parent();
+    this.wrapper.css('position', 'absolute');
+  
+    // Wrap in origin element
+    this.body.wrap('<div class="popup-element-origin">');
+    this.origin = this.body.parent();
+    this.origin.css('position', 'absolute');
+  }
+  catch(err){
+    //alert(err.message);
+  }
 }
 
 
@@ -502,5 +505,3 @@
   }
 
 }
-
-
