Index: open_flash_chart_api.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/open_flash_chart_api/open_flash_chart_api.module,v
retrieving revision 1.12
diff -u -r1.12 open_flash_chart_api.module
--- open_flash_chart_api.module	6 Jun 2008 16:54:04 -0000	1.12
+++ open_flash_chart_api.module	6 Jun 2008 16:55:20 -0000
@@ -879,7 +879,8 @@
 						$this->set_unique_id();
 						$tmp .= '<div id="' . $this->unique_id . '"></div> 
                  <script type="text/javascript" src="'. $this->js_path . 'swfobject.js"></script> 
-                 <script type="text/javascript"> 
+                 <script type="text/javascript">
+                    $(document).ready(function(){
                     var so = new SWFObject("'. $this->swf_path . 'open-flash-chart.swf", "ofc", "'. $this->width . '", "' . $this->height . '", "9", "#FFFFFF"); 
                     so.addVariable("variables","true");';
 				}
@@ -1013,7 +1014,8 @@
 						
 				if($this->output_type == 'js')
 				{
-						$tmp .= 'so.write("' . $this->unique_id . '"); 
+						$tmp .= 'so.write("' . $this->unique_id . '");
+                    });
                  </script>';
 				}
 

