--- js/mc.js	2009-10-05 19:38:33.000000000 -0400
+++ js/mc.js.new	2010-02-22 10:35:54.000000000 -0500
@@ -56,8 +56,13 @@
 
     // Get our dimensions
 
-    // Get the docHeight and (ugly hack) add 50 pixels to make sure we dont have a *visible* border below our div
-    var docHeight = $(document).outerHeight() + 50;
+    // Reliably determine document height cross-browser - credit to James Padolsey (http://james.padolsey.com/javascript/get-document-height-cross-browser)
+    D = document;
+    var docHeight = Math.max(
+        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
+        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
+        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
+    );
     var docWidth = $(document).innerWidth();
     var winHeight = $(window).height();
     var winWidth = $(window).innerWidth();
@@ -120,7 +125,13 @@
     // Move and resize the modalBackdrop and modalContent on resize of the window
      modalContentResize = function(){
       // Get our heights
-      var docHeight = $(document).outerHeight();
+      // Reliably determine document height cross-browser - credit to James Padolsey (http://james.padolsey.com/javascript/get-document-height-cross-browser)
+      D = document;
+      var docHeight = Math.max(
+        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
+        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
+        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
+      );
       var docWidth = $(document).innerWidth();
       var winHeight = $(window).height();
       var winWidth = $(window).width();
