
	
		$(document).ready(function() {
		
			$('#addsummer').click(function(){
				$('#overlay').css({'display':'block'});
			}); 
		
			$('#overlay').click(function(){
				$('#overlay').css({'display':'none'});
			}); 
		
		var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
	$('#logo').css({"z-index":"1100"});
	$('#overlay').css({"z-index":"1100"});

			$('input[type=file]').change(function(e){
				waarde=$(this).val();
  				$('#filename').html(waarde);


			})
			
			$("#uurrooster a").hover(function(){
				$(this).children('span').css({'display':'block'});
				$(this).css({"z-index":"8888"});
				$('#header').css({"z-index":"1", "position":"relative"});
			});
			$("#uurrooster a").mouseleave(function(){
				$(this).children('span').css({'display':'none'});
				$(this).css({"z-index":"1"});
				$('#header').css({"z-index":"1"});
			});
			
			
			var slideshow = 3;
			
			function playslideshow(){
				if(slideshow == 3){ next = 0; } else { next = slideshow + 1; }
				
				$('.play img:eq('+ slideshow +')').css({'z-index':'3'}).fadeTo(1500,0);
				$('.play img:eq('+ next +')').css({'z-index':'2','display':'block'}).fadeTo(1500,1);
				
				slideshow = next;
			}
			playslideshow();
			setInterval(playslideshow, 5500);
			
			//Auto clear text fields
			$('.autoclear').live('click',function(){ if($(this).attr('title') == $(this).val()){ $(this).val(''); } }); 
			$('.autoclear').live('blur',function(){ if($(this).val() == ''){ $(this).val($(this).attr('title')); $(this).removeClass('userinput'); } else { $(this).addClass('userinput'); } });
			
			$("#map").gMap({ markers: [{ latitude: 51.221461, longitude: 4.67029}], zoom: 14})
			
			
			
		});
