$(document).ready(function(){

    var autoRun = 1;
    jQuery('#sectie1').fadeIn(500);
    setTimeout(autoSlide0,3500);
    
	function autoSlide0() {
	if (autoRun==1) {
		$('#sectie1').fadeOut(1500);
	    setTimeout(autoSlide1,300);
	    return false;
    };
    };
	
	function autoSlide1() {
	if (autoRun==1) {
        jQuery('#sectie2').animate({ 
		height: '430px'
        }, 2000);
		jQuery('#sectie2').attr('overflow', 'visible');
	    return false;
    };
    };

  
   $('.verderButton').click(function(){
		

		$('#sectie1').fadeOut(1500);
   
        setTimeout(verderButtonFunction,300);
		autoRun=0;

        return false;
  });
    
	function verderButtonFunction() {
	
        jQuery('#sectie2').animate({ 
		height: '430px'
        }, 2000);
	
	    return false;
    };
  
  
     $('.verderButton2').click(function(){
        jQuery('#sectie2').animate({ 
	    height: '0px'
        }, 2000);
	    setTimeout(verderButton2Function,1000);
	    autoRun=0;
        return false;
    });
	
    function verderButton2Function() {
  			
	    $('#sectie3').fadeIn(1500);
        return false;

	};
	
	
    $('.verderButton3').click(function(){
        jQuery('#sectie3').fadeOut(1500); 
        jQuery('#sectie1').fadeIn(1500);		
        autoRun=0;
        return false;
    });

});

