--- menu_block.module.old	2008-12-03 23:35:34.000000000 -0500
+++ menu_block.module	2008-12-22 03:29:25.000000000 -0500
@@ -60,6 +60,17 @@
       'template' => 'menu-block-wrapper',
       'arguments' => array('content' => NULL, 'settings' => NULL),
     ),
+    
+    'menu_block_item_link' => array(
+      'arguments' => array('item' => NULL, 'delta' => 0),
+    ),
+    'menu_block_tree' => array(
+      'arguments' => array('tree' => NULL, 'delta' => 0),
+    ),
+    'menu_block_item' => array(
+      'arguments' => array('link' => NULL, 'has_children' => NULL, 'menu' => '',
+        'in_active_trail' => FALSE, 'extra_class' => NULL, 'delta' => 0),
+    ),
   );
 }
 
@@ -190,7 +201,7 @@
   }
 
   // Render the tree.
-  $data['content'] = menu_block_tree_output($tree);
+  $data['content'] = menu_block_tree_output($tree, $delta);
   if ($data['content']) {
     $settings = array(
       'menu_name' => $menu_name,
@@ -426,7 +437,7 @@
  * @return
  *   string The rendered HTML of that data structure.
  */
-function menu_block_tree_output(&$tree) {
+function menu_block_tree_output(&$tree, $delta) {
   $output = '';
   $items = array();
 
@@ -456,7 +467,7 @@
     if (!empty($link_class)) {
       $items[$key]['link']['localized_options']['attributes']['class'] = implode(' ', $link_class);
     }
-    $link = theme('menu_item_link', $items[$key]['link']);
+    $link = theme('menu_block_item_link', $items[$key]['link'], $delta);
     // Render the menu item.
     $extra_class = array();
     if ($i == 1) {
@@ -473,8 +484,20 @@
       $extra_class[] = 'active';
     }
     $extra_class = !empty($extra_class) ? implode(' ', $extra_class) : NULL;
-    $output .= theme('menu_item', $link, $items[$key]['link']['has_children'], $items[$key]['below'], $items[$key]['link']['in_active_trail'], $extra_class);
+    $output .= theme('menu_block_item', $link, $items[$key]['link']['has_children'], $items[$key]['below'], $items[$key]['link']['in_active_trail'], $extra_class, $delta);
     $i++;
   }
-  return $output ? theme('menu_tree', $output) : '';
+  return $output ? theme('menu_block_tree', $output, $delta) : '';
+}
+
+function theme_menu_block_item_link($link, $delta = 0) {
+  return theme('menu_item_link', $link);
+}
+
+function theme_menu_block_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL, $delta = 0) {
+  return theme('menu_item', $link, $has_children, $menu, $in_active_trail, $extra_class);
+}
+
+function theme_menu_block_tree($tree, $delta = 0) {
+  return theme('menu_tree', $tree);
 }
