﻿var domein		= 'varwijk';
var extentie	= 'nl';
function mail_link(ontvanger) {
	var adres = ontvanger + '@' + domein + '.' + extentie;
	document.write('<a href="mailto:' + adres + '">' + adres + '</a>');
}


$(document).ready(function() {
	
//	MENU
	$('ul.menu li.lvl1_s').mouseover(function() { 
		$('ul.menu li.lvl1_c ul').hide();
		$('ul', this).show();
		$('span, a', this).addClass('menu_lvl1_hover');
	}).mouseout(function() { 
		$('ul.menu li.lvl1_c ul').show();
		$('ul', this).hide();
		$('span, a', this).removeClass('menu_lvl1_hover');				
	});
	$('ul.menu li.lvl1_n').mouseover(function() { 
		$('ul.menu li.lvl1_c ul').hide();
	}).mouseout(function() {
		$('ul.menu li.lvl1_c ul').show();
	});
	
//	ZOEKFORMULIER	
	$('#header form a').click(function() {
		if ($('#zoekterm').val() == '') return false;
		$(this).attr('href', $(this).attr('href') + '?zoekterm='+$('#zoekterm').val());
	});
	
//	REFERENTIE OVERZICHT
	if ($('#ref_overzicht p a').length) {
		$('#ref_overzicht p').css('cursor', 'pointer').click(function() {
			window.location = $(this).find("a").attr("href");
			return false;
		}).hover(
			function() {
				$(this).css('background-color', '#f8f8f8');
			},
			function() {
				$(this).css('background-color', '');
			}
		);
	}
	
	
	$(document).pngFix();
});
