$(document).ready(function(){
$('.loading').hide();


	$('#image_rotate').innerfade({ 
		speed: 'slow', 
		timeout: 6000, 
		type: 'sequence', 
		containerheight: '200px'
	});
	
	$(".send_foto").click(function(){
		$('.loading').show();
	});

$('input[type=file]').change(function(e){
	$('.show_input').removeClass("show_input").addClass("show_input_file");
});


	$("#voetnoot_schrijver").DefaultValue("Je naam");
	$("#voetnoot_tekst").DefaultValue("Je reactie");
	
	$("#nieuwtje_onderwerp").DefaultValue("Je onderwerp");
	$("#nieuwtje_link").DefaultValue("Link naar bron");
	$("#nieuwtje_opmerking").DefaultValue("Korte beschrijving");
	
	$("#contact_naam").DefaultValue("Je naam");
	$("#contact_mail").DefaultValue("Je e-mailadres");
	$("#contact_onderwerp").DefaultValue("Het onderwerp");
	$("#contact_bericht").DefaultValue("Je bericht");
	
	$('.links ul > li ul').click(function(e){
		e.stopPropagation();
	})
	//.filter(':not(:first)')
	.hide();
		
	$('.links ul > li').click(function(){
		

		var selfClick = $(this).find('ul:first').is(':visible');
		if(selfClick) {  return; } //gaat terug naar begin
		
		$(this).parent().find('> li ul:visible').slideToggle(); //zorgt ervoor dat hij terug klapt
		$(this).find('ul:first').stop(true, true).slideToggle(); //de gewonen toggle
		
	});
	
});

