/**
 *	Control for Tabs bases on jQuery.
 *	@author		Christian Würker <Christian.Wuerker@CeuS-Media.de>
 *	@version	0.3
 */
function TabControl( tabs, prefix ){
  if($(tabs).length==1)
    $("#tabs").hide();

  this.hideTabs = function(){
    $(tabs).each(function(i){
      id = tabs[i];
      $("#"+prefix+id).hide();
      $("#tab"+id).removeClass( "current" );
    });
  }

  this.switchTab = function( id ){
    this.hideTabs();
    $("#"+prefix+id).show();
    $("#tab"+id).toggleClass( "current" );
  }
}

