$(document).ready(function () {
  $(function () {
    var tabContainers = $('div.tabs > div');
    tabContainers.hide().filter(':first').show();

    $('div.tabs ul.tabNavigation a').click(function () {
      // roundabout way to get multi tabs working (c)
      the_id = $(this).parents("div").get(0);
      the_id = $(the_id).children('span').get(0);
      the_id = $(the_id).attr("id");
   
      $("#" + the_id + " ~ div").hide();
      //tabContainers.hide();
      
      tabContainers.filter(this.hash).show();
      //$('div.tabs ul.tabNavigation a').removeClass('selected');
      $("#" + the_id + " ~ ul > li > a").removeClass('selected');  
      
      $(this).addClass('selected');
      return false;
    }).filter('.start').click();
  });
});
