$(document).ready(function() {
	
	$(".personal-trainer-left").click(function() {
		if($(this).css("height") == "100px") {
			$(".personal-trainer-left").css("height", "100px");
			$(this).css("height", "auto");
		} else {
			$(".personal-trainer-left").css("height", "100px");
			$(this).css("height", "100px");
		}
	});
	
	$(".personal-trainer-right").click(function() {
		if($(this).css("height") == "100px") {
			$(".personal-trainer-right").css("height", "100px");
			$(this).css("height", "auto");
		} else {
			$(".personal-trainer-right").css("height", "100px");
			$(this).css("height", "100px");
		}
	});
	
	$('#formsubject').bind('change', function(e) {
		if($(this).val() == 'Algemeen' || $(this).val() == 'Lidmaatschap') {
			$('#locationselect').hide(0);
		} else {
			$('#locationselect').show(0);
		}
	});
	
	$('#servicesubmit').bind('click', function(e) {
		var formname = $('#formname').val();
		var formemail = $('#formemail').val();
		var formphone = $('#formphone').val();
		var formcomments = $('#formcomments').val();
		
		if(formname == '' || formemail == '' || formphone == '' || formcomments == '') {
			alert('Vul a.u.b. alle velden in.')
		} else {
			$('#form').submit();
		}
	});


});

function checkSpecial() {
	var name = $("#name").val();
	var email = $("#email").val();
	var phone = $("#phone").val();
	var location = $("#location").val();
	var comment = $("#comment").val();
	if(name !== "" && email !== "" && phone !== "" && location !== "") {
		return true;
	} else {
		alert("Vul AUB alle verplichte velden in.");
		return false;
	}
}

function checkContact() {
	var name = $("#name").val();
	var email = $("#email").val();
	var phone = $("#phone").val();
	var location = $("#location").val();
	var comment = $("#comment").val();
	if(name !== "" && email !== "" && phone !== "" && location !== "") {
		return true;
	} else {
		alert("Vul AUB alle verplichte velden in.");
		return false;
	}
}

function checkNieuwsbrief() {
	var name = $("#name").val();
	var email = $("#email").val();
	if(name !== "" && email !== "") {
		return true;
	} else {
		alert("Vul AUB alle verplichte velden in.");
		return false;
	}
}

function checkLidworden()
{
	var name = $("#name").val();
	var email = $("#email").val();
	var phone = $("#phone").val();
	var location = $("#location").val();
	var day = $("#day").val();
	var month = $("#month").val();
	var year = $("#year").val();
	var comment = $("#comment").val();
	if(name !== "" && email !== "" && phone !== "" && location !== "" && day !== "" && month !== "" && year !== "") {
		return true;
	} else {
		alert("Vul AUB alle verplichte velden in.");
		return false;
	}
}

function toggleVestigingen() {
	$(".submenu").toggle();
}

function checkCampaign()
{
	var name = $("#name").val();
	var email = $("#email").val();
	var phone = $("#phone").val();
	var comment = $("#comment").val();
	if(name !== "" && email !== "" && phone !== "") {
		return true;
	} else {
		alert("Vul AUB alle verplichte velden in.");
		return false;
	}
}
