diff -Nup google_admanager.old/google_admanager.js google_admanager/google_admanager.js
--- google_admanager.old/google_admanager.js	1970-01-01 07:00:00.000000000 +0700
+++ google_admanager/google_admanager.js	2010-04-09 03:32:00.000000000 +0700
@@ -0,0 +1,6 @@
+Drupal.behaviors.googleAdmanager = function (context) {
+  $("div.gam-banner").each(function() {
+    var holder = $(this).attr("id").replace(/content/, "block");
+    $(this).css("position", "absolute").css($("#" + holder + " .content").offset());
+  });
+};
+$(window).load(function() {Drupal.behaviors.googleAdmanager();});
diff -Nup google_admanager.old/google_admanager.module google_admanager/google_admanager.module
--- google_admanager.old/google_admanager.module	2009-12-31 19:00:36.000000000 +0700
+++ google_admanager/google_admanager.module	2010-04-08 23:59:40.000000000 +0700
@@ -4,6 +4,8 @@
  * https://www.google.com/admanager/
  */ 
 
+define('GAM_LAZY', true); 
+
 /**
  * Implementing hook_block
  */
@@ -144,7 +146,14 @@ function google_admanager_theme() {
  */ 
 function theme_google_admanager_block($id, $ad_slot) {
   google_admanager_add_js('GA_googleAddSlot("'. $id .'", "'. $ad_slot .'");');
-  return '<script type="text/javascript">GA_googleFillSlot("'. $ad_slot .'");</script>';
+  $script = '<script type="text/javascript">GA_googleFillSlot("'. $ad_slot .'");</script>';
+  if (GAM_LAZY) {
+    google_admanager_add_block('<div id="content-google_admanager-'. $ad_slot .'" class="gam-banner">'. $script .'</div>');
+    return '&nbsp;';
+  }
+  else {
+    return $script;
+  }
 }
 
 /**
@@ -190,6 +199,14 @@ function google_admanager_add_js($js = N
   }
 }
 
+function google_admanager_add_block($text = NULL) {
+  static $ga_block = array();
+  if (! $text) {
+    return $ga_block;
+  }
+  $ga_block[] = $text;
+}
+
 /** 
 * Output the Google Admanager scripts by way of drupal_add_js().
 *  
@@ -214,6 +231,11 @@ function google_admanager_get_js($scope 
  * Implementation of hook_preprocess_page().
  */
 function google_admanager_preprocess_page(&$vars) {
+  if (google_admanager_add_block()) {
+    // lazy loading
+    return;
+  }
+
   //output the scripts through drupal_add_js()
   google_admanager_get_js();
  
@@ -222,6 +244,29 @@ function google_admanager_preprocess_pag
 }
 
 /**
+ * Implementation of hook_footer().
+ */
+function google_admanager_footer($main) {
+  if ($lazy = google_admanager_add_block()) {
+    if($ga_js = google_admanager_add_js()) {
+      $output_order = array('init', 'service', 'slot', 'close');
+      $gam_script = '';
+      foreach ($output_order as $type) {
+        $output = "\n";
+        foreach($ga_js[$type] as $js) {
+          $output .= $js . "\n";
+        }
+        $gam_script .= '<script type="text/javascript">'.$output.'</script>';
+      }
+      array_unshift($lazy, $gam_script);
+    } 
+    drupal_add_js(drupal_get_path('module', 'google_admanager') .'/google_admanager.js');
+    return implode("\n", $lazy);
+  }
+}
+
+
+/**
  * Implementation of hook_filter().
  *
  * Filter option to enable Google Admanager filter [google_ad:ad_slot]
