$(function() {
	$("#top-nav li:last, #cta .section:last,  #info .section:last, #footer .section:last, .links li:last-child, fieldset:last, .scrollable a:nth-child(6n), #cta.large .section:nth-child(3n), .top-button:last, #main-nav li:nth-child(4n)").addClass("last");
	$(".gallery li:nth-child(4n)").addClass("last");
	$(".collectie li:nth-child(4n)").removeClass("last");
	$(".collectie li:nth-child(3n)").addClass("last");
	$("dd:last-child").addClass("last");
	$(".section.exp-coll:first").addClass("first");
	$(".error").click(function() {
		$(this).removeClass("error");
	});
	$("h2.expand").toggler();
	$(".pop a, .enlarge").fancybox({overlayOpacity: 0.5, overlayColor: '#000', titlePosition: 'inside'});
	$(".friend").fancybox({overlayOpacity: 0.5, overlayColor: '#000', titlePosition: 'inside', type: 'iframe', width: 300, height: 533});
	$(".scrollable").scrollable();
	$(".slider").anythingSlider({
	    easing: "easeInOutExpo",       
	    autoPlay: true,                 
	    delay: 4000,                   
	    startStopped: false,           
	    animationTime: 600,             
	    hashTags: false,               
	    buildNavigation: true,        
		pauseOnHover: true          
	 	});
	
	$(".promofolder").fancybox({
		'width'				: '80%',
		'height'			: '80%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$(".slider-text a[target='_blank'], a.section[target='_blank'], a.top-button[target='_blank'], .side .section a.button[target='_blank']").fancybox({
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$(".social img").hover(
			function(){this.src = this.src.replace("-off","-on");},
			function(){this.src = this.src.replace("-on","-off");
	});
	
	$(".collapse").hide();
	$("div.expand h4.meer-info").hide();
	
	$("div.expand").mouseenter(function(){
		$(this).find("h4").first().slideUp('300');
		$(this).find("h4").first().next("h4").slideDown('300');
    }).mouseleave(function(){
		$(this).find("h4").first().next("h4").slideUp('300');
		$(this).find("h4").first().slideDown('300');
    });
	
	$("div.expand").click(function(){
      $(this).next(".collapse").slideToggle();
    });

	
});
