var initList = initList || []; 

initList.push(function(){
	var buttons1 = $(".buttons");
	var sections1 = $(".time_line");
    var stage1 = 1;
    var num_sections1 = 4;//sections.children().length;
    //var width_sections1 = 658;//1014;//parseInt (sections.children().css("width")) + parseInt(sections.children().css("marginRight") )  + parseInt(sections.children().css("marginLeft") );
    var width_sections1 = 1270;
	var time_factor1 = 1.5 * width_sections1;


	buttons1.click(function(){
			var variation;

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


			}else{
				variation = "-=";
				stage1++;
			}
			$(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();
			    	});		
			    });			
	  });

});