/*
Cufon.replace('#menu a');
Cufon.replace('.contentblock h2');
Cufon.replace('#contentright h3');
Cufon.replace('#iframe h1');
Cufon.replace('#iframe h2');
*/

$(document).ready(function() {
	$('div#iframe iframe').load(function() {
		var newheight = this.contentWindow.document.body.offsetHeight + 25;
        this.style.height = newheight + 'px';
    });

	$('#contentright .steleenvraag input.text').attr({ 'value' : 'Uw vraag...' });
	$('#contentright .steleenvraag input.text').addClass('greytext');
	
	$('#contentright .steleenvraag input.text').click(function() {
		if($(this).attr('value') == 'Uw vraag...'){
			$(this).attr({ 'value' : '' });
			$(this).removeClass('greytext');
		}
	}).blur(function() {
		if($(this).attr('value') == ''){
			$(this).attr({ 'value' : 'Uw vraag...' });
			$(this).addClass('greytext');
		}
	});
	
	$('#contentright .nieuwsbrief input.text').attr({ 'value' : 'Uw e-mailadres...' });
	$('#contentright .nieuwsbrief input.text').addClass('greytext');
	
	$('#contentright .nieuwsbrief input.text').click(function() {
		if($(this).attr('value') == 'Uw e-mailadres...'){
			$(this).attr({ 'value' : '' });
			$(this).removeClass('greytext');
		}
	}).blur(function() {
		if($(this).attr('value') == ''){
			$(this).attr({ 'value' : 'Uw e-mailadres...' });
			$(this).addClass('greytext');
		}
	});
		
	$('ul.faqlist li div.faqa').css({ 'display' : 'none' });
	
	$('ul.faqlist li a.faqq').click(function() {		
		if($(this).parent('li').children('div.faqa').css('display') == 'block'){
			//$(this).parent('li').children('div.faqa').css({ 'display' : 'none' });
			$(this).parent('li').children('div.faqa').slideUp();
		} else {
			//$(this).parent('li').children('div.faqa').css({	'display' : 'block'	});
			$(this).parent('li').children('div.faqa').slideDown();
		}
		
		return false;
	});
				$.localScroll({
				
				offset:	{top:-25},
				duration: 150
				});			

	$( '#floatdiv' ).scrollFollow();
	$('a[rel=playvideo]').click(function() {
		var flashvars = {};
		var params = {};
		var attributes = {};
		attributes.id = "playerswf";
		swfobject.embedSWF("/img/video/player.swf", "playerswf", "716", "401", "9.0.0", "/img/video/expressInstall.swf", flashvars, params, attributes);
		$('#videopanel').slideDown();
		$('div#closebtn').click(function() {
			$('#videopanel').slideUp();
			$('#videopanel').html('<div id="closebtn">Sluiten</div><div id="playerswf"></div>');
		});
	});
});
