var submit;

$(document).ready(function(){
	$('.gen-form').submit(function(){
		submit = true;
		$('.verplicht').removeClass('niet-ingevuld');
		$('.verplicht').each(function(){
			if ($(this).val() == '') {
				$(this).addClass('niet-ingevuld');
				submit = false;
			}
		});
		if (submit == true) {
			return true;
		} else {
			return false;
		}
	});
	$('table').each(function(){
		if ($(this).attr('border') && $(this).attr('border') != 0) {
			$(this).addClass('tabel-met-border');
			//$(this).css('background','red');
		}
	});
	$('td').each(function(){
		if ($(this).attr('valign') == 'bottom') {
			$(this).addClass('align-bottom');
		}
	});
	$('#column-small-a .sfeerfoto').css('cursor','pointer').mouseover(function(){
		$(this).css('opacity',0.5);
	});
	$('#column-small-a .sfeerfoto').css('cursor','pointer').mouseout(function(){
		$(this).css('opacity',1);
	});
	$('#column-small-b .sfeerfoto').css('cursor','pointer').mouseover(function(){
		$(this).css('opacity',0.5);
	});
	$('#column-small-b .sfeerfoto').css('cursor','pointer').mouseout(function(){
		$(this).css('opacity',1);
	});
	$('#column-small-c .sfeerfoto').css('cursor','pointer').mouseover(function(){
		$(this).css('opacity',0.5);
	});
	$('#column-small-c .sfeerfoto').css('cursor','pointer').mouseout(function(){
		$(this).css('opacity',1);
	});
	$('#column-a .homelinks').css('cursor','pointer').mouseover(function(){
		$(this).css('opacity',0.5);
	}).mouseout(function(){
		$(this).css('opacity',1);
	}).click(function(){
		location.href = '/nl/174/gas/'
	});
	$('#column-b .homelinks').css('cursor','pointer').mouseover(function(){
		$(this).css('opacity',0.5);
	}).mouseout(function(){
		$(this).css('opacity',1);
	}).click(function(){
		location.href = '/nl/175/water/'
	});
	$('#column-c .homelinks').css('cursor','pointer').mouseover(function(){
		$(this).css('opacity',0.5);
	}).mouseout(function(){
		$(this).css('opacity',1);
	}).click(function(){
		location.href = '/nl/176/warmte/'
	});
	$('.switch-medewerker-klant').click(function(){
		if ($(this).val() == 'medewerker') {
			$('#hide-when-medewerker').hide();
		} else {
			$('#hide-when-medewerker').show();
		}
	})
});
