jQuery(document).ready(function($){
	$("#sidebar .widget-container:eq(0)").removeClass().addClass('widget-container-last');
	$("#sidebar .widget-container:eq(2)").removeClass().addClass('widget-container-last');
	$(".nieuws .entry_nieuws:first").removeClass().addClass('entry_nieuws_first');
	$('#text-4').removeClass('widget-container');
	$(".persooninfo").hover(function () {
    		$(this).children('.persoon-hover').fadeIn();
  	});
	$(".persooninfo").mouseleave(function () {
    		$(this).children('.persoon-hover').fadeOut('slow');
  	});
	$(".stap .right").hover(function () {
    		$(this).children('.image-hover').fadeIn();
  	});
	$(".stap .right").mouseleave(function () {
    		$(this).children('.image-hover').fadeOut('slow');
  	});	
	$('#idee a').click(function () {
		$('#feedback-content_1').show();	
	});
	$('#idee a').click(function () {
		$('#feedback-content_2').hide();	
	});
	$('#idee a').click(function () {
		$('#feedback-content_3').hide();	
	});
	$('#vraag a').click(function () {
		$('#feedback-content_2').show();	
	});
	$('#vraag a').click(function () {
		$('#feedback-content_1').hide();	
	});
	$('#vraag a').click(function () {
		$('#feedback-content_3').hide();	
	});
	$('#probleem a').click(function () {
		$('#feedback-content_3').show();	
	});
	$('#probleem a').click(function () {
		$('#feedback-content_1').hide();	
	});
	$('#probleem a').click(function () {
		$('#feedback-content_2').hide();	
	});
	$('#idee').click(function() {
		$('li.active').removeClass('active');
		$(this).addClass('active');
	});
	$('#vraag').click(function() {
		$('li.active').removeClass('active');
		$(this).addClass('active');
	});
	$('#probleem').click(function() {
		$('li.active').removeClass('active');
		$(this).addClass('active');
	});
	$('img[title]').each(function() { 
		$(this).removeAttr('title');
	});
	setTimeout(function() {
    	$('.wpcf7-response-output').fadeOut('slow');
	});
});

$(document).ready(function() {
	swapValue = [];
	$("#s").each(function(i){
		swapValue[i] = $(this).val();
		$(this).focus(function(){
		   	if ($(this).val() == swapValue[i]) {
			 $(this).val("");
			}
			$(this).addClass("focus");
		}).blur(function(){
			if ($.trim($(this).val()) == "") {
		    	$(this).val(swapValue[i]);
		       	$(this).removeClass("focus");
	        }
		 });
	});
});

$(document).ready(function () {

	// if user clicked on button, the overlay layer or the dialogbox, close the dialog	
	$('a.button, #dialog-overlay').click(function () {		
		$('#dialog-overlay, #dialog-box').hide();		
		return false;
	});
	
	// if user resize the window, call the same function again
	// to make sure the overlay fills the screen and dialogbox aligned to center	
	$(window).resize(function () {
		
		//only do it if the dialog box is not hidden
		if (!$('#dialog-box').is(':hidden')) popup();		
	});	
	
	
});

//Popup dialog
function popup() {
		
	// get the screen height and width  
	var maskHeight = $(document).height();  
	var maskWidth = $(window).width();
	
	// calculate the values for center alignment
	var dialogTop =  (maskHeight/3) - ($('#dialog-box').height());  
	var dialogLeft = (maskWidth/2) - ($('#dialog-box').width()/2); 
	
	// assign values to the overlay and dialog box
	$('#dialog-overlay').css({height:maskHeight, width:maskWidth}).show();
	$('#dialog-box').css({top:dialogTop, left:dialogLeft}).show();			
}

$(document).ready(function() {
	swapValue = [];
	$("#s").each(function(i){
		swapValue[i] = $(this).val();
		$(this).focus(function(){
		   	if ($(this).val() == swapValue[i]) {
			 $(this).val("");
			}
			$(this).addClass("focus");
		}).blur(function(){
			if ($.trim($(this).val()) == "") {
		    	$(this).val(swapValue[i]);
		       	$(this).removeClass("focus");
	        }
		 });
	});
});

$(document).ready(function () {

	// if user clicked on button, the overlay layer or the dialogbox, close the dialog	
	$('a.button, #dialog-overlay1').click(function () {		
		$('#dialog-overlay1, #dialog-box1').hide();		
		return false;
	});
	
	// if user resize the window, call the same function again
	// to make sure the overlay fills the screen and dialogbox aligned to center	
	$(window).resize(function () {
		
		//only do it if the dialog box is not hidden
		if (!$('#dialog-box1').is(':hidden')) popup();		
	});	
	
	
});

//Popup dialog
function popup1() {
		
	// get the screen height and width  
	var maskHeight = $(document).height();  
	var maskWidth = $(window).width();
	
	// calculate the values for center alignment
	var dialogTop =  (maskHeight/3) - ($('#dialog-box1').height());  
	var dialogLeft = (maskWidth/2) - ($('#dialog-box1').width()/2); 
	
	// assign values to the overlay and dialog box
	$('#dialog-overlay1').css({height:maskHeight, width:maskWidth}).show();
	$('#dialog-box1').css({top:dialogTop, left:dialogLeft}).show();			
}

$(document).ready(function () {

	// if user clicked on button, the overlay layer or the dialogbox, close the dialog	
	$('a.button, #dialog-overlay2').click(function () {		
		$('#dialog-overlay2, #dialog-box2').hide();		
		return false;
	});
	
	// if user resize the window, call the same function again
	// to make sure the overlay fills the screen and dialogbox aligned to center	
	$(window).resize(function () {
		
		//only do it if the dialog box is not hidden
		if (!$('#dialog-box2').is(':hidden')) popup();		
	});	
	
	
});

//Popup dialog
function popup2() {
		
	// get the screen height and width  
	var maskHeight = $(document).height();  
	var maskWidth = $(window).width();
	
	// calculate the values for center alignment
	var dialogTop =  (maskHeight/3) - ($('#dialog-box2').height());  
	var dialogLeft = (maskWidth/2) - ($('#dialog-box2').width()/2); 
	
	// assign values to the overlay and dialog box
	$('#dialog-overlay2').css({height:maskHeight, width:maskWidth}).show();
	$('#dialog-box2').css({top:dialogTop, left:dialogLeft}).show();			
}

$(document).ready(function () {

	// if user clicked on button, the overlay layer or the dialogbox, close the dialog	
	$('a.button, #dialog-overlay3').click(function () {		
		$('#dialog-overlay3, #dialog-box3').hide();		
		return false;
	});
	
	// if user resize the window, call the same function again
	// to make sure the overlay fills the screen and dialogbox aligned to center	
	$(window).resize(function () {
		
		//only do it if the dialog box is not hidden
		if (!$('#dialog-box3').is(':hidden')) popup();		
	});	
	
	
});

//Popup dialog
function popup3() {
		
	// get the screen height and width  
	var maskHeight = $(document).height();  
	var maskWidth = $(window).width();
	
	// calculate the values for center alignment
	var dialogTop =  (maskHeight/3) - ($('#dialog-box3').height());  
	var dialogLeft = (maskWidth/2) - ($('#dialog-box3').width()/2); 
	
	// assign values to the overlay and dialog box
	$('#dialog-overlay3').css({height:maskHeight, width:maskWidth}).show();
	$('#dialog-box3').css({top:dialogTop, left:dialogLeft}).show();			
}
