diff --git a/js/radioactivity.js b/js/radioactivity.js
index 8032372..db81cda 100644
--- a/js/radioactivity.js
+++ b/js/radioactivity.js
@@ -5,14 +5,15 @@ Drupal.behaviors.radioactivity = {
   activeIncidents: Array(),
 
   attach: function (context, settings) {
+    if (context == document) {
 
-    // Do an ajax callback to the given callback address {
-    var data = settings.radioactivity.emitters;
-    var config = settings.radioactivity.config;
+      // Do an ajax callback to the given callback address {
+      var data = settings.radioactivity.emitters;
+      var config = settings.radioactivity.config;
 
-    this.config = config;
+      this.config = config;
 
-    $.each(data, function(callback, incidents) {
+      $.each(data, function(callback, incidents) {
 
       // Accuracy and  flood filtering
       $.each(incidents, function(index, incident) {
@@ -21,7 +22,7 @@ Drupal.behaviors.radioactivity = {
         var key = 'radioactivity_' + incident['checksum'];
 
         // Flood protection (cookie based)
-        if (config.fpEnabled) {  
+        if (config.fpEnabled) {
           if (Drupal.behaviors.radioactivity.fetch(key)) {
             // Filter
             return;
@@ -49,7 +50,8 @@ Drupal.behaviors.radioactivity = {
       if (Drupal.behaviors.radioactivity.activeIncidents.length > 0) {
         Drupal.behaviors.radioactivity[callback](Drupal.behaviors.radioactivity.activeIncidents);
       }
-    });
+      });
+    }
   },
 
   hardStore: function (key, value, exp) {
@@ -61,7 +63,7 @@ Drupal.behaviors.radioactivity = {
       sessionStorage.setItem(key, JSON.stringify({
         value: value,
         expire: exp.getTime()
-      }));      
+      }));
     }
     $.cookie(key, value, { expires: exp });
   },
