$(function() {
    /*
    var tmis = $('#top ul li');
    if(tmis !== undefined){
        tmis.hide();
        animate(0,tmis,false);
    }
    */
    
    var rmis = $('#right ul li');
    if(rmis !== undefined){
        rmis.hide();
        animate(0,rmis,true);
    }
});

function animate(index,items,hide){
    if(index < items.length){
        $(items[index]).fadeIn(700 , function(){
            animate(index + 1,items,hide);
        });
    } else {
        if(hide){
            items.fadeOut(1000 , function(){
                $("#right img.logo").toggle(
                    function(){ items.show(); }
                   ,function(){ items.hide(); }
                ).css('cursor','pointer');
            });
	    }
    }
}

