$(function(){
	/*Remove .fold_out class to not have the fold out effect*/
	$('li a.fold_out').click(function() {
  		$(this).parent().find('ul').slideToggle('fast', function() {
    		// Animation complete.
  		});
	});
	
		$(window).load(function() {
     /*Makes navigation and content copy div 
	same height so dashed border would be 
	displayed right*/
	var contentHeight = $('#content_copy').height();
	var navHeight =  $('#navigation').height();
	
	if(navHeight < contentHeight){
		$('#navigation').height(contentHeight);
	}else if(contentHeight < navHeight){
		$('#content_copy').height(navHeight);
	}
});
	
	/*Navigation follow down when scrolling*/
	var top = $('#nav_follow_down').offset().top - parseFloat($('#nav_follow_down').css('marginTop').replace(/auto/,0));
	
	$(window).scroll(function () {
    	// what the y position of the scroll is
    	var y = $(this).scrollTop();
  		
    	// whether that's below the form
    	if (y >= top) {
    	  // if so, ad the fixed class
    	  $('#nav_follow_down').addClass('fixed');
    	} else {
    	  // otherwise remove it
    	  $('#nav_follow_down').removeClass('fixed');
    	}
  	});
	
});

