$(document).ready(function() 
{
	var imgs = new Array(
	"/images/profiel/profiel2.png,/i_am_what_i_am/deelnemers/rian.html",
	"/images/profiel/profiel4.png,/i_am_what_i_am/deelnemers/henk.html",
	"/images/profiel/profiel1.png,/i_am_what_i_am/deelnemers/john.html",
	"/images/profiel/profiel3.png,/i_am_what_i_am/deelnemers/chery.html"
	);
			
	for(i = 0; i < imgs.length; i++)
	{
		data = imgs[i].split(",");
		img = data[0];
		link = data[1];
		div = document.createElement("DIV");
		div2 = document.createElement("DIV");
		div3 = document.createElement("DIV");
		div.className = "content-container-outer frontpage-photo";
		div2.className = "content-container-outer frontpage-photo";
		$(div2).css("border", "0");
		$(div).css({
		"background" : "url(" + img + ") no-repeat"
		});
		$(div2).append(div);
		$(div3).css({
			"top" : "0",
			"left" : "0",
			"margin" : "0",
			"padding" : "0",
			"display" : "none",
			"position" : "relative",
			"height" : "358px"
		});
		$(div3).attr('href', link);
		$(div3).css("display", "block");
		$(div3).append(div2);
		$("#images").append(div3);
	}
//	$('#images').children('div').removeAttr('style');
//	$('#images').children('div').css.("display", "block");
	
	$('#images').cycle({ 
		activePagerClass: 'activeSlide',
	    fx:    'fade', 
	    speed:  1000,
	    next: '.buttonRight',
	    prev: '.buttonLeft',
	    before: function(current, nextSlide) {
	    	$(".buttonReact").attr("href", $(nextSlide).attr('href'));
	    }
	 });
	 $('#images').cycle(1);
	 	
	 $(".buttonReact").click(function()
	 {
	 	document.location.href = $(this).attr('href');
	 });
	 
	 var emailtekst = "Vul hier je e-mailadres in";
	 $(".input-email").click(function()
	 {
	 	if($(this).attr("value") == emailtekst)
	 	{
	 		$(this).attr("value", "");
	 	}
	 });
	 
	 $(".input-email").blur(function()
	 {
	 	 if($(".input-email").attr('value') == "")
	 	 {
	 	 	$(".input-email").attr('value', emailtekst);
	 	 }
	 });
});
