$(document).ready(function()
{

	$('div.imageslider').imageSlider();



	$("a.popup").click(function(){
		var url = $(this).attr("href");
		
		$("<div></div>").appendTo("#wrapper").load(url).slideDown();
		$("#wrapper").append("<div class='overlay'></div>");
		
		return false;
	});

		$('#nieuwsbanner ul').innerfade({
			animationtype: 'fade',
			speed: 1500,
			timeout: 3000,
			type: 'sequence',
			containerheight: '65px'
		});				

	$(".fancy").fancybox();
	
	window.setInterval(start_slide,7000);	
	
	$('#gallery').galleria({
		width:578,
		height:500
    });
	
});

function start_slide() {
	
	$('.productbreed .nieuwsitem:eq(0)').animate({
		'opacity':0
	},1500, function() {
		$('.productbreed .nieuwsitems').animate({
			'margin-top':'-80px'
		},1500,function() {
			$('.productbreed .nieuwsitem:eq(0)').appendTo($('.nieuwsitems'));
			$('.nieuwsitem').css('opacity','1');
			$('.nieuwsitems').css('margin-top','0px');
		});
	});
	
}

