$(document).ready(function()
{
	// Cycle images on front page
	$('#cycle_home').cycle(
	{
		fx:     'scrollLeft',
		delay:  -50,
		timeout: 7500,
		speed: 800
	});

	$('div.cycle').cycle({ fx: 'fade', timeout: 2000, speed: 1000 });

	// Crossfade news items - (temporarily) disabled
	// $('#innerfade_news').innerfade({ speed:'fast', timeout:6000 });


	// Read more button
	$('#category_readmore').click(function()
	{
		$('#category_readmoreBox').css('display', 'block');
		$(this).css('display', 'none');
		return false;
	});


	// Show/hide product menu
	$('a#menu_products_toggle').click(function()
	{
		$('#menu_products').toggle('slow');
		return false;
	});


	// Lightbox popup
	$('a[rel^="isus"]').prettyPhoto({ theme:'facebook' });


	// Custom font headings
	Cufon.replace('h1');
	Cufon.replace('h3');
	
	
	// Validate newsletter form
	$('#form1').validate();


	// Submenu in header
	$(".menuBox ul").superfish();
	
	
	// Menu sidebar
	$(".designBox .Bouw").click(function()
	{
		var url = $(this).attr('rel');
		window.location = '/' + url;
	});
	
	$('#offerteknop').click(function()
	{
		window.location = '/nl/offerte';
	});
	
	$('.keuring').parent().css('cursor', 'pointer');
	$('.keuring').parent().click(function()
	{
		window.location = '/nl/afdelingen/onderhoud-en-service/keuringsrapporten.html';
	});
});
