diff --git domain.blocks.inc domain.blocks.inc
index 22915d4..83252f4 100644
--- domain.blocks.inc
+++ domain.blocks.inc
@@ -29,18 +29,25 @@ function domain_block_view_switcher() {
       }
     }
     if ($allow) {
-      $list[] = l($title, domain_get_uri($domain), array('absolute' => TRUE));
+      // Add a link as a renderable array
+      // Keep track of domain_id for each link
+      $list[] = array(
+        'title' => $title,
+        'href' => domain_get_uri($domain),
+        'absolute' => TRUE,
+        '#domain_id' => $domain['domain_id'],
+      );
     }
   }
-  $items = array('items' => $list);
-  $output = theme('item_list', $items);
-  $block = array(
+
+  // Return renderable array of block containing array of links
+  return array(
     'subject' => t('Domain switcher'),
     'content' => array(
-      '#markup' => $output,
+      '#theme' => 'links',
+      '#links' => $list,
     ),
   );
-  return $block;
 }
 
 /**
