--- node_embed.js.old	2011-04-17 20:34:32.000000000 +0200
+++ node_embed.js	2011-04-17 20:34:44.000000000 +0200
@@ -36,8 +36,8 @@
     var iframeSrc = Drupal.settings.basePath + 'ckeditor-node-embed';
     var dialogMarkup = '<div id="nodeEmbedDialog" title="Embed a Node" style="width:100%; height:100%">' + 
       '<iframe frameborder="no" style="width:500px; height:325px; border:0" src="'+iframeSrc+'"></iframe>' + 
-      '<div class="nodeEmbedButtons"><button id="buttonEmbedFromDialog">Embed</button><button id="buttonCancelDialog">Cancel</button></div>'
-      '</div>'
+      '<div class="nodeEmbedButtons"><button id="buttonEmbedFromDialog">Embed</button><button id="buttonCancelDialog">Cancel</button></div>'+
+      '</div>';
     var dialog = $(dialogMarkup).dialog(
       {
         autoOpen: false,
@@ -54,21 +54,19 @@
     
     $('#buttonEmbedFromDialog').click(function(e) {
       var node_id = window.currentActiveNid; //set or updated whenever a node is selected
-      if( node_id != null && node_id != "" ) {
+      if( node_id !== null && node_id !== "" ) {
         dialog.editor_content = '[[nid:' + node_id + ']]';
       }
 
-      if(window.currentActiveNid && window.currentActiveNid != ""){
+      if(window.currentActiveNid && window.currentActiveNid !== ""){
         var edit_content = "[[nid:"+window.currentActiveNid+"]]";
+        var my_content = edit_content;
         if (data.format == 'html') {
-          var content = '<div class="embed">'+edit_content+'</div>';
-        }
-        else {
-          var content = edit_content;
+          my_content = '<div class="embed">'+edit_content+'</div>';
         }
         //write the content to the editor
-        if (typeof content != 'undefined') {
-          Drupal.wysiwyg.instances[instanceId].insert(content);
+        if (typeof my_content != 'undefined') {
+          Drupal.wysiwyg.instances[instanceId].insert(my_content);
         }
       }
 
@@ -82,6 +80,6 @@
     $(dialog).dialog('open');
     // Generate HTML markup.
     
-  },
+  }
 };
 })(jQuery);
