// ##### Default TAB
function DT_ActionSet( obj )
{
    var i;
    for( i = 1 ; i <= obj.total ; i++ )
    {
        obj.bindTab( i );
    }
}


function _defaultTab( tab, content, total, timeout, defaultContent, contentBox )
{
    var thisObj = this;
    this.defaultContent = "#"+defaultContent;
    this.currentContent = null;
    this.tab = "#"+tab;
    this.content = "#"+content;
    this.total = total;
    this.timeout = timeout;
    this.timer = null;
    this.contentBox = "#"+contentBox;
    
    this.goDefault = function()
    {
        thisObj.currentContent = thisObj.defaultContent;
        thisObj.dispCurr();
    }
    
    this.hideAll = function()
    {
        var i;
        for( i = 1 ; i <= this.total ; i++ )
        {
            $(thisObj.content+i).css("display","none");
        }
    }
    
    this.dispCurr = function()
    {
        thisObj.hideAll();
        $(thisObj.currentContent).css("display","block");
    }
    
    this.bindTab = function( n )
    {
        $(thisObj.tab+n).hover(function(){
            clearInterval(thisObj.timer);
            thisObj.currentContent = thisObj.content+n;
            thisObj.dispCurr();
        },function(){
            thisObj.timer = setTimeout( thisObj.goDefault, thisObj.timeout );
        });
        
        $(thisObj.content+n).hover(function(){
            clearInterval(thisObj.timer);
        },function(){
            thisObj.timer = setTimeout( thisObj.goDefault, thisObj.timeout );
        });
    }
}