imgFldr = 'images/header/';
$(document).ready(function(){

	$("ul#header_options > li > img").click(function() {
		//$('#achtergrond-plaatje > img').fadeOut('fast');
		var header_img = imgFldr+$(this).attr("alt")+".jpg";
		
		$('#header_img > img').animate({opacity: 0}, 200).attr('src', header_img).animate({opacity: 1}, 999);
		var header_text = $(this).next("div").html();
		//$('#header_text').animate({opacity: 0}, 10).text(text_title).animate({opacity: 1}, 1000);
		$('#header_text').html(header_text);
		//$('#header-bericht > p').animate({opacity: 0}, 10).text(text_banner).animate({opacity: 1}, 1000);
	//$('#banner_img'+this.name).attr('src', imgFldr+this.value).attr('alt', 'newattribute');
	});

  $("a.lightbox").lightBox(); // Select all links with lightbox class

	$("h2.vraag").click(function () {
		if ($(this).next("div.antwoord").is(":hidden")) {
			$("div.antwoord").hide(400);
			$(this).next("div.antwoord").slideDown(400);
		} else {
			$(this).next("div.antwoord").hide(400);
		}
	});
	

	$('#header_slideshow').galleryView({
		panel_width: 692,
		panel_height: 350,
		frame_width: 95,
		frame_height: 39,
		filmstrip_position: 'left',
		pause_on_hover: true,
		paused: true,
		nav_theme: ''
	});


	$('#zoekveldinput').autofill({
		value: 'Uw zoekterm',
		defaultTextColor: '#948d66',
		activeTextColor: '#666',
		prePopulate: ''
	});
	$('#Naam').autofill({
		value: 'Uw naam',
		defaultTextColor: '#ccc',
		activeTextColor: '#666',
		prePopulate: ''
	});
	$('#Email').autofill({
		value: 'Uw e-mailadres',
		defaultTextColor: '#ccc',
		activeTextColor: '#666',
		prePopulate: ''
	});
	$('#Telefoon').autofill({
		value: 'Uw telefoonnummer',
		defaultTextColor: '#ccc',
		activeTextColor: '#666',
		prePopulate: ''
	});
	$('#Leeftijd').autofill({
		value: 'Uw leeftijd',
		defaultTextColor: '#ccc',
		activeTextColor: '#666',
		prePopulate: ''
	});
	$('.scroll').vTicker({
	   speed: 300,
	   pause: 3000,
	   showItems: 3,
	   animation: 'fade',
	   mousePause: false,
	   height: 250,
	   direction: 'up'
	});
});