var TabSet = Class.create({

    currentTab: null,
    name: null,
    
    initialize: function (name, currentTab){
        this.name = name;
        this.currentTab = currentTab;
    },
    
    click: function (tabName){
        
        if(tabName != this.currentTab){
            
            this.change(tabName, this.currentTab);
            this.currentTab = tabName;
            
        }
        
    },
    
    change: function (to, from){
        
        var newTabId = 'tab_'+this.name+'_'+to;
        var oldTabId = 'tab_'+this.name+'_'+from;
        
        var newTab = $(newTabId);
        newTab.className = 'front';
        
        var oldTab = $(oldTabId);
        oldTab.className = '';
        
        var newTabContents = $(to);
        var oldTabContents = $(from);
        
        oldTabContents.blindUp({duration: 0.3});
        newTabContents.blindDown({duration: 0.3});
        
    }

});