Index: navigate/navigate.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/navigate/navigate.js,v
retrieving revision 1.5.4.2
diff -u -p -r1.5.4.2 navigate.js
--- navigate/navigate.js	6 Nov 2008 01:59:12 -0000	1.5.4.2
+++ navigate/navigate.js	8 Nov 2008 22:08:56 -0000
@@ -208,6 +208,19 @@ function navigate_load() {
     $(this).select();
   });
   
+  // Set our navigate_on variable
+  navigate_on == Drupal.settings.navigateOn;
+
+  // Set initial styling.
+  if (navigate_on == 0) {
+    $("body").css("padding-left", "0px");
+    $(".navigate").css("margin-left", "-550px");
+    $("#navigate-switch").css("margin-left", "-230px").css("margin-top", "-30px");
+    $(".navigate-loading").css("margin-left", "-550px");
+  } else {
+    $("body").css("padding-left", "210px");
+  }
+  
     // Bind events to switch button
   $("#navigate-switch").click(function () {
     // Close
Index: navigate/navigate.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/navigate/navigate.module,v
retrieving revision 1.5.4.7
diff -u -p -r1.5.4.7 navigate.module
--- navigate/navigate.module	8 Nov 2008 19:15:06 -0000	1.5.4.7
+++ navigate/navigate.module	8 Nov 2008 22:08:56 -0000
@@ -51,6 +51,15 @@ function navigate_init() {
     drupal_add_js(drupal_get_path('module', 'navigate') .'/jquery_plugins/jquery.tooltip.js', 'module', 'footer');
     drupal_add_js(drupal_get_path('module', 'navigate') .'/jquery_plugins/jquery-ui.js', 'module', 'footer');
     drupal_add_js(drupal_get_path('module', 'navigate') .'/jquery_plugins/jquery.pngFix.js', 'module', 'footer');
+    
+    $on = navigate_variable_get('on');
+
+    // Default to on
+    if ($on == '') {
+      $on = 0;
+    }
+
+    drupal_add_js(array('navigateOn' => $on), 'setting');
   }
 }
 
@@ -140,30 +149,12 @@ function navigate_footer() {
   if (user_access('navigate view')) {
     // Build navigate
     $output = navigate_build();
-    $on = navigate_variable_get('on');
-    
-    // Default to on
-    if ($on == '') {
-      $on = 0;
-    }
-    
-    // If off, set navigate outside of the current view
-    if ($on == 0) {
-      $style = 'body { padding-left:0px;} .navigate { margin-left:-550px;} #navigate-switch { margin-left:-230px; margin-top:-30px;} .navigate-loading { margin-left:-550px;}';
-      
-    // If on, add some padding to the body
-    }
-    else {
-      $style = 'body { padding-left:210px;}';
-    }
     
     // Theme navigate
     $output = theme('navigate_outer', $output);
     $output .= '
       <input type="hidden" id="navigate_process_url" value="'. url('navigate/process') .'" />
-      <input type="hidden" id="navigate_q" value="'. $_GET['q'] .'" />
-      <style>'. $style .'</style>
-      <script>var navigate_on = '. $on .';</script>';
+      <input type="hidden" id="navigate_q" value="'. $_GET['q'] .'" />';
   }
   
   return $output;
