Add class in sub menu
Use theme_item_list function for it, see the below code

$title = 'Title';
$type = 'ol';
$items = array(
  'one',
  'two',
  'three',
  'four',
  'five',
);
$items[] = array(
  'data' =&gt; 'something',
  'class' =&gt; array('dummy'=&gt;'category'),
  'children' =&gt; array('1.1','1.2',array('data'=&gt;'1.3','class' =&gt; array('dummy'=&gt;'category'),'children'=&gt;array('1.3.1','1.3.2')))
);
$attributes = array('class' =&gt; array('test-class', 'demo-class'));

print theme_item_list(array(
  'items' =&gt; $items,
  'title' =&gt; $title,
  'type' =&gt; $type,
  'attributes' =&gt; $attributes
));


This will give you following HTML output: 

&lt;div class="item-list"&gt;&lt;h3&gt;Title&lt;/h3&gt;
  &lt;ol class="test-class demo-class"&gt;
    &lt;li class="first"&gt;one&lt;/li&gt;
    &lt;li&gt;two&lt;/li&gt;
    &lt;li&gt;three&lt;/li&gt;
    &lt;li&gt;four&lt;/li&gt;
    &lt;li&gt;five&lt;/li&gt;
    &lt;li class="category last"&gt;something
      &lt;div class="item-list"&gt;
        &lt;ol class="category"&gt;
          &lt;li class="first"&gt;1.1&lt;/li&gt;
          &lt;li&gt;1.2&lt;/li&gt;
          &lt;li class="category last"&gt;1.3
            &lt;div class="item-list"&gt;
              &lt;ol class="category"&gt;
                &lt;li class="first"&gt;1.3.1&lt;/li&gt;
                &lt;li class="last"&gt;1.3.2&lt;/li&gt;
              &lt;/ol&gt;
            &lt;/div&gt;
          &lt;/li&gt;
        &lt;/ol&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;