var initList = initList || [];
initList.push(function() {

    var buttons1 = $(".buttons");
    var sections1 = $(".content_nav .time_line");
    var stage1 = 1;
    var num_sections1 = 4;//sections.children().length;
    var width_sections1 = 1183;//1014;//parseInt (sections.children().css("width")) + parseInt(sections.children().css("marginRight") )  + parseInt(sections.children().css("marginLeft") );
    var time_factor1 = 1.5 * width_sections1;

    buttons1.click(function(){
            var variation;

            if ($(this).hasClass("prev")){
                variation = "+=";
                stage1--;
            }else{
                variation = "-=";
                stage1++;               
            }

            $('.act_subtitle').hide();
            switch(stage1){
                case 1:
                    $('#sub1').show();
                    break;
                case 2:
                    $('#sub2').show();
                    break;
                case 3:
                    $('#sub3').show();
                    break;
                case 4:
                    $('#sub4').show();
                    break;
            }

            $(this).fadeOut(50,
                function(){ 
                    sections1.animate({
                        marginLeft: variation+width_sections1
                    }, time_factor1, function(){
                                if (stage1 < 4) buttons1.last().fadeIn();
                                if (stage1 < num_sections1 && stage1 > 1)buttons1.first().fadeIn();
                    });     
                });         
      });
});