Index: simplemenu.js
===================================================================
RCS file: /cvs/drupal/contributions/modules/simplemenu/simplemenu.js,v
retrieving revision 1.5
diff -u -p -r1.5 simplemenu.js
--- simplemenu.js	11 Jan 2007 03:25:24 -0000	1.5
+++ simplemenu.js	29 Jan 2007 23:50:10 -0000
@@ -3,9 +3,22 @@
 $(document).ready(function() {
   // get the Drupal basepath
   var basePath = Drupal.settings.simplemenu.basePath;
-  
+  // get our element to add the menu to
+  var element = Drupal.settings.simplemenu.element;
   // insert extra <br /> so menu doesn't overlap theme
-  $('<ul id="simplemenu" class="clear-block"></ul>').prependTo('body').slideDown(400);
+  var menu = '<ul id="simplemenu" class="clear-block"></ul>';
+  
+  switch (Drupal.settings.simplemenu.placement) {
+    case 'prepend':
+    $(menu).prependTo(element).slideDown(400);
+      break;
+    case 'append':
+    $(menu).appendTo(element).slideDown(400);
+      break;
+    case 'replace':
+    $(element).html(menu).slideDown(400);
+      break;
+  }
   
   // Drupal menu callback
   $('#simplemenu').load(basePath + 'simplemenu/menu', function() {
Index: simplemenu.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/simplemenu/simplemenu.module,v
retrieving revision 1.6
diff -u -p -r1.6 simplemenu.module
--- simplemenu.module	16 Jan 2007 06:47:15 -0000	1.6
+++ simplemenu.module	29 Jan 2007 23:50:10 -0000
@@ -37,7 +37,12 @@ function simplemenu_menu($may_cache) {
   
     // pass in base path to the JS file
     // url() handles appending ?q= but in this case, we need to pass in the variable so the menus work when mod_rewrite is off
-    drupal_add_js(array('simplemenu' => array('basePath' => base_path() . (variable_get('clean_url', 0) ? '' : '?q='))), 'setting');
+    $settings = array(
+      'basePath' => base_path() . (variable_get('clean_url', 0) ? '' : '?q='),
+      'placement' => variable_get('simplemenu_element_method', 'prepend'),
+      'element' => variable_get('simplemenu_element', 'body')
+    );
+    drupal_add_js(array('simplemenu' => $settings), 'setting');
     drupal_add_js($path .'/simplemenu.js');
   }
 
@@ -70,6 +75,27 @@ function simplemenu_admin_settings() {
     '#description' => t('Add devel module links for those users that can access the devel module.')
   );
   
+  $form['default_menu']['placement'] = array(
+  '#type' => 'fieldset', 
+  '#title' => t('SimpleMenu Placement'),
+  '#collapsible' => true
+  );
+  $form['default_menu']['placement']['simplemenu_element'] = array(
+  '#type' => 'textfield',
+  '#title' => t('Add SimpleMenu To'),
+  '#default_value' => variable_get('simplemenu_element', 'body'),
+  '#description' => t('Provide a CSS selector to append or prepend SimpleMenu to.'),
+  '#required' => true
+  );
+  $form['default_menu']['placement']['simplemenu_element_method'] = array(
+  '#type' => 'radios',
+  '#title' => 'Method', 
+  '#options' => drupal_map_assoc(array('prepend', 'append', 'replace')),
+  '#default_value' => variable_get('simplemenu_element_method', 'prepend'),
+  '#description' => t('Choose whether to append or prepend SimpleMenu to the CSS selector above.'),
+  '#required' => true
+  );
+  
   return system_settings_form($form);
 }
 
