var conf_div_nb = 4
var conf_div_w = 300
var conf_first = 1

var current_opened = null

function init()
{
    current_opened = conf_first

	$("#content div").css({"width" : conf_div_w+"px", "display" : "none"});
	
    switchTo(conf_first)
}

function switchTo(n) 
{
    new_opened = n
    
    $("#d"+current_opened).animate({ height: 'hide', opacity: 'hide' }, 'slow')
    $("#d"+new_opened).animate({ height: 'show', opacity: 'show' }, 'slow')
    
    $("#open"+current_opened).removeClass('active')
    $("#open"+current_opened).animate({ marginLeft: '0'}, 'slow')
    
    $("#open"+new_opened).addClass('active')
    $("#open"+new_opened).animate({ marginLeft: '10'}, 'slow')
    
    current_opened = new_opened
}



