diff --git a/live_person.js b/live_person.js
index cde950a..8814101 100644
--- a/live_person.js
+++ b/live_person.js
@@ -15,10 +15,13 @@ Drupal.behaviors.livePerson = {
       url = livePersonGetUrl(params.url);
       var windowName = 'chat' + params.accountId;
       var specs = 'width=' + params.width + ',height=' + params.height + ',resizable=yes';
-      return "window.open('" + url + "', '" + windowName + "', '" + specs + "'); return false;";
+      window.open(url, windowName, specs);
+      return false;
     }
 
-    $('a#live-person', context).attr('onclick', livePersonPopUp(settings.livePerson));
+    $('a#live-person', context).click(function() {
+      livePersonPopUp(Drupal.settings.livePerson);
+    }); 
   }
 }
 }(jQuery));
\ No newline at end of file
