$(document).ready(function() {
	$(".spotlightloop.nieuw > div:gt(0)").hide();
	setInterval(function() {
	  $('.spotlightloop.nieuw > div:first')
	    .fadeOut(1000)
	    .next()
	    .fadeIn(1000)
	    .end()
	    .appendTo('.spotlightloop.nieuw');
	},  5000);	
	
	$(".spotlightloop.bestaand > div:gt(0)").hide();
	setInterval(function() {
	  $('.spotlightloop.bestaand > div:first')
	    .fadeOut(1000)
	    .next()
	    .fadeIn(1000)
	    .end()
	    .appendTo('.spotlightloop.bestaand');
	},  5000);	
	
	
	$(".rightContainer .vorige").append("<<");
	$(".rightContainer .volgende").append(">>");
	setTimeout(initFancybox, 100);
}); 


function initFancybox() {
	jQuery('.main_image').click(function() {});
	$('.main_image img').wrap(function() {
		return '<a href="' + $(this).attr("src") + ".jpg" + '" rel="woningpresentatiefotos" class="mainfoto"/>';
	});
	$("a[rel=woningpresentatiefotos]").fancybox();
}


