// site specific functions

createMailto = function(pers, domain, customText) {
	var email = pers + '@' + domain;
	(customText == null) ? lnk = email : lnk = customText;
	document.write('<a href="mailto:'+email+'">'+lnk+'</a>');
}

initNav = function() {
	$('.nav img, img.button').bind("mouseenter", function(e) {
		src = this.src;
		ext = src.substring(src.lastIndexOf('.'), src.length);
		if (src.indexOf('-s' + ext) == -1) this.src = src.replace(ext, '-s'+ext);
	});
	$('.nav img, img.button').bind("mouseleave", function(e) {
		src = this.src;
		ext = src.substring(src.lastIndexOf('.'), src.length);
		if (src.indexOf('-s' + ext) != -1) this.src = src.replace('-s'+ext, ext);
	});
	$('.nav img.active').unbind();
	
	$('.mail-link').attr('href', 'mailto:info@sidenliv.nl');
}

$(document).ready(function() {
	initNav();
	$('#main').fadeIn('slow');
});




