--- magic_tabs.module 2008-05-25 21:45:50.000000000 -0700
+++ magic_tabs.module 2008-05-26 00:26:35.000000000 -0700
@@ -27,11 +27,12 @@ function magic_tabs_get($callback, $acti
   // extract titles and contents
   foreach ($tabs as $tab) {
     $title = $tab['title'] ? $tab['title'] : t('Tab %index', array('%index' => $index));
+    $class = strtolower(preg_replace('/[^a-zA-Z0-9]+/ ', '-', $tab['title']));
     $items[] = l(
       '<span>'. $title .'</span>',
       $_GET['q'], // REFACTOR maybe use a configurable page here?
       array(
-        'class' => ($index == $active) ? 'selected' : '',
+        'class' => ($index == $active) ? 'selected '. $class .'-active' : $class,
         'onclick' => "$('#$callback').load('/magic_tabs/$callback?${callback}_tab=$index'); return false",
       ),
       magic_tabs_query_string(array($callback . '_tab' => $index)),
@@ -46,7 +47,6 @@ function magic_tabs_get($callback, $acti
     // default theme for tabs
     $theme_func = 'magic_tabs';
   }
-
   $output = theme($theme_func, $callback, $items, $tabs[$active]['content']);
   if (!$_ajax) {
     $output = "<div id='$callback' class='magic_tabs'>". $output .'</div>';
