$(function() {
	//FANCYBOX PROJECTEN
	$("a.single_image").fancybox({
		'titlePosition' : 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
		}
	});
	//FANCYBOX GALLERY
	$("a.gallery").fancybox({
		'titlePosition' : 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
		}
	});

	//PROJECTEN HOME
	$('#header .images').cycle({
		fx:     'fade',
		random: 1
	});

	//FANCYBOX GOOGLEMAPS
	$("#various3").fancybox({
		width				: '75%',
		height				: '75%',
		autoScale     		: false,
		transitionIn		: 'none',
		transitionOut		: 'none',
		type				: 'iframe'
	});

	//NAVIGATION LAVALAMP
	$('#lavaLampBasicImage').lavaLamp({
		fx: 'backout',
		autoResize:true,
		speed: 700
	});

	//PROJECTEN HOME
	$('#cycleSlide').cycle({
		fx:     'scrollHorz',
		speed:  'slow',
		timeout: 6000,
		cleartype: true,
		cleartypeNoBg: true,
		pager:  '#pager',
		pagerAnchorBuilder: function() {
			return '<a href="#" class="pagerImg">&deg;</a>';
		}
	});

	//SET FOOTER AT BOTTOM
	$(window).load(function() {
		var setBottomContainer = $("#container").height()+50;
		$("#footer").css("top", setBottomContainer);
	});

	var width = 0;
	$('.nav ul li').each(function() {
		width += $(this).outerWidth(true);
	});
	$('.nav').width(width+'px');

});

