Try This:

function defaulttab( $atts, $content = null ) {
    $GLOBALS['tab_count'] = 0;
    do_shortcode($content)
    if( is_array( $GLOBALS['tabs'] ) ){
        $i = 1;
        foreach( $GLOBALS['tabs'] as $tab ){
            $tabs[] = '&lt;li&gt;&lt;a class="tab" href="#"&gt;'.$tab['title'].'&lt;/a&gt;&lt;/li&gt;';
            $panes[] = '&lt;div class="tab'.$i.'" class="tabcontent"&gt;' .$tab['content'].'&lt;/div&gt;';
            $i++;
        }
        $return = '&lt;div class="tabcontainer"&gt;&lt;ul class="selector"&gt;'.implode( "\n", $tabs ).'&lt;/ul&gt;
            &lt;div class="clear"&gt;&lt;/div&gt;'.implode( "\n", $panes ).'&lt;/div&gt;';
    }
    return $return;
}


add_shortcode('tab', 'defaulttab');

function defaulttabs( $atts, $content = null ) {
    extract( shortcode_atts( array(
    'title' =&gt; '',
    'tab' =&gt; '1',
    ), $atts ) );

    $i = $GLOBALS['tab_count'];
    $GLOBALS['tabs'][$i] = array( 'title' =&gt; sprintf( $title, $GLOBALS['tab_count'] ), 'content' =&gt;  $content );
    $GLOBALS['tab_count']++;
}

add_shortcode('tabs', 'defaulttabs');


jQuery Tabs in Shortcode API
For a given container made of an extremely reflective surface, is it possible to shine a beam of light in, and with no 'fiddling' (i.e. closing the hole, tilting the object) to contain the beam for an infinite amount of time (not a very long time, but such that it will never escape). Consider the following



Something like this. Except I feel like the light will escape given enough time. Also, the object has to be finite in size (infinite is cheating). If there's a proof that no such container exists then that's fine too.

Ignore factors such as dissipation by heat, or quantum tunneling, and just assume a perfect environment with perfect materials.
