Index: deals.isengard/httpdocs/sites/all/modules/addthis/addthis.module
===================================================================
--- deals.isengard.orig/httpdocs/sites/all/modules/addthis/addthis.module	2009-11-29 21:06:24.000000000 +0000
+++ deals.isengard/httpdocs/sites/all/modules/addthis/addthis.module	2009-11-29 21:06:32.000000000 +0000
@@ -146,6 +146,7 @@
  * Theme the AddThis button.
  */
 function theme_addthis_button($node, $teaser) {
+  static $has_script = FALSE;
   // Fix IE's bug.
   if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
     drupal_add_link(array(
@@ -168,20 +169,24 @@
     ));
   }
   else {
+
+    if($has_script == FALSE)
+    {
+        $url = ($_SERVER['HTTPS'] == 'on' ? 'https://secure.addthis.com' : 'http://s7.addthis.com') . '/js/' . variable_get('addthis_widget_version', '152') . '/addthis_widget.js';
+        drupal_add_js('document.write(unescape("%3Cscript src=\''. $url .'\' type=\'text/javascript\'%3E%3C/script%3E"));', 'inline','header');
+        $has_script = TRUE;
+    }
     return ( sprintf('
       <a class="addthis-button" href="http://www.addthis.com/bookmark.php"
         onmouseover="return addthis_open(this, \'\', \'%s\', \'%s\')"
         onmouseout="addthis_close()"
-        onclick="return addthis_sendto()"><img src="%s" width="%d" height="%d" %s /></a>
-      <script type="text/javascript" src="%s/js/' . variable_get('addthis_widget_version', '152') . '/addthis_widget.js"></script>
-      ',
+        onclick="return addthis_sendto()"><img src="%s" width="%d" height="%d" %s /></a>',
       $teaser ? url('node/'. $node->nid, array('absolute' => 1) ) : '[URL]',
       $teaser ? addslashes($node->title) : '[TITLE]',
       $_SERVER['HTTPS'] == 'on' ? addslashes(variable_get('addthis_image_secure', 'https://secure.addthis.com/button1-share.gif')) : addslashes(variable_get('addthis_image', 'http://s9.addthis.com/button1-share.gif')),
       addslashes(variable_get('addthis_image_width', '125')),
       addslashes(variable_get('addthis_image_height', '16')),
-      variable_get('addthis_image_attributes', 'alt=""'),
-      $_SERVER['HTTPS'] == 'on' ? 'https://secure.addthis.com' : 'http://s7.addthis.com'
+      variable_get('addthis_image_attributes', 'alt=""')
     ));
   }
 }
