$(function() {

	$('#fotosliderImages').crossSlide({
		sleep: 6,
		fade: 1.5,
		shuffle: false
	},aImages

	);

// Default fancybox settings.
var fancyboxDefaults = {
	'overlayOpacity': 0.55,
	'margin': 50,
	'overlayColor': '#000'

}

	$('.photo').fancybox(fancyboxDefaults);
	$('.fancybox').fancybox(fancyboxDefaults);
	
	$('.item h4 a').hover(
		function() {
			$(this).parent().parent().addClass('hover');
		},
		function() {
			$(this).parent().parent().removeClass('hover');
		}
	);
	
	$('.doclist h5 a').hover(
		function() {
			$(this).parent().parent().addClass('hover');
		},
		function() {
			$(this).parent().parent().removeClass('hover');
		}
	);
	
	$('.item .date').each(function() {
		
		var oDay = $(this).find('.day');
		
		var oMonth = $(this).find('.month');
		
		var day = oDay.text();
		
		var month = oMonth.text();
		
		switch (month) {
			
			case 'januari':
				month = 1;
				break;
				
			case 'februari':
				month = 2;
				break;
				
			case 'maart':
				month = 3;
				break;
				
			case 'april':
				month = 4;
				break;
				
			case 'mei':
				month = 5;
				break;
				
			case 'juni':
				month = 6
				break;
				
			case 'juli':
				month = 7;
				break;
				
			case 'augustus':
				month = 8;
				break;
				
			case 'september':
				month = 9;
				break;
				
			case 'oktober':
				month = 10;
				break;
				
			case 'november':
				month = 11;
				break;
				
			case 'december':
				month = 12;
				break;
		
		}
		
		oDay.css('background-position', ((31 - day) * -34) + 'px bottom');
		
		oMonth.css('background-position', ((12 - month) * -34) + 'px 4px');
		
	});

	$('#sKeywords').focus(function() {
		if ($(this).val() == 'Typ hier uw zoekwoord') {
			$(this).val("");			
		}
	});
	$('#sKeywords').blur(function() {
		if($(this).val()=="") {
			$(this).val('Typ hier uw zoekwoord');
		}
	});

	$('#sKeywordsEn').focus(function() {
		if ($(this).val() == 'Type your keywords here') {
			$(this).val("");			
		}
	});
	$('#sKeywordsEn').blur(function() {
		if($(this).val()=="") {
			$(this).val('Type your keywords here');
		}
	});

	$('#sendContact').click(function() {
		$('#formContact').submit();
	});

});
