Selecting tab as default jquery
<p>Thanks to  JAAulde for update. Sitll having some issues.</p>

<pre><code>$( function()
{
var tabs = $( 'ul.sideMenu a' ),
    selected,
    hashes = [],
    tabContainers;

tabs.each( function()
{
    var locationhash, linkhash, selectthis;

    locationhash = ( window.location.hash !== '' ) ? window.location.hash : '#index';
    linkhash = this.hash;

    if( this.pathname === window.location.pathname )
    {
        hashes.push( linkhash );

        selectthis = ( linkhash === locationhash );

        $( this ).toggleClass( 'selected', selectthis );
        $( linkhash ).toggle( selectthis );
    }
} );

tabContainers = $( hashes.join( ', ' ) );

tabs.bind( 'click', function( e )
{
    // hide all tabs
    tabContainers
        .hide()
        .filter( this.hash )
            .show();

    // set up the selected class
    tabs.removeClass( 'selected bluecolor' );
    $( this ).addClass( 'selected bluecolor' );

    e.preventDefault()
} );
} );
</code></pre>

<p>Menu --
    
       
           URL
       </li>
       
           URL
       </li>
    

<p>Content -- </p>

<pre><code>&lt;div id="URL"&gt;content&lt;/div&gt;
&lt;div id="Content2"&gt;content2&lt;/div&gt;
</code></pre>

<p>So I still can't get it to select the first tab on page load. Instead its loading a blank page. </p>

<p>I am also having bugs in IE "Message: 'this.style' is null or not an object
Line: 30
Char: 9"
In IE the whole page loads and when I click links it only acts like an anchor. This is driving me crazy. Any help greatly appreciated. If I get it working I'll update here.</p>
