$(window).load(function(){
	//hide the all of the element with class msg_body  
	//$(".msg_body").hide();  
	//toggle the componenet with class msg_body 
	//$('#abri_crack').delay(900).animate({visibilty : 'vissible'});
	
//--------------set uitspraken random----------------------------//

	Array.prototype.shuffle = function (){
		for(var rnd, tmp, i=this.length; i; rnd=parseInt(Math.random()*i), tmp=this[--i], this[i]=this[rnd], this[rnd]=tmp);
		};
	
	// an array
		var uitspraak = new Array();
		uitspraak[0] = '<span class="speak_naam">Organise 4 You</span><br /><span class="speak_uitspraak">&quot;Ik ben super begeleid door de jongens van Out of Bounds! Goede samenwerking, snelle service en een super resultaat, dik tevreden!&quot;</span>';
		uitspraak[1] = '<span class="speak_naam">Evidence Based Training</span><br /><span class="speak_uitspraak">&quot;Out of Bounds levert kwaliteit voor een betaalbare prijs. De service was voortreffelijk. Enthousiast, snel, correct en behulpzaam.&quot;</span>';
		uitspraak[2] = '<span class="speak_naam">Open Source Software Directory</span><br /><span class="speak_uitspraak">&quot;Prima website ontwikkelaar, vriendelijk, zonder poespas, behulpzaam en snel!&quot;</span>';
		uitspraak[3] = '<span class="speak_naam">Memocoach</span><br /><span class="speak_uitspraak">&quot;Prima combinatie van leveren wat de klant wil en meedenken over het product. Uitstekende service, aardige jongens en een absolute aanrader.&quot;</span>';
		uitspraak[4] = '<span class="speak_naam">Tandarts Steenbergen</span><br /><span class="speak_uitspraak">&quot;Er wordt rekening gehouden met de wens van de klant en dat allemaal voor een eerlijke prijs‎. Prettige samenwerking. Afspraken goed nageleefd. Complimenten!&quot;</span>';
	
	uitspraak.shuffle();
	
		
		var totalNum = 5;
		var rndNum = Math.floor(Math.random() * totalNum);

//-----------------warning----------------------------------------------//
	
	function warning()
	{
		$('#warning').delay(8000).fadeIn(1, function()
			{
				$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
				$('#warning_message').delay(800).fadeIn(300);
			}
		);
		$('#overlay').click(function()
			{
				$('#warning_message').fadeOut('fast');
				$("#overlay").delay(100).fadeOut('fast');
				$('#warning').remove();
			}
		);
		$('#warning').click(function()
			{
				$('#warning_message').fadeOut('fast');
				$("#overlay").delay(100).fadeOut('fast');
				$('#warning').remove();
			}
		);
	}
	
	warning();
	
	function stop_warning()
	{
		$('#warning').stop(true, false);
		$('#warning').remove();
	}


//---------------------set active view--------------------------------//
//var active = [];

//function set_active(act)
//{
//	var active = act;
//}

//-------------------set custom scroller------------------------------//	
	$('.scroll').customScroller({horizontal: 0});
					
	function reinitialiseScrollPane()
	{
		$('.customScrollerContent').animate({'top' : '0px'}, function()
		{
			$('.scroll').setCustomScroller({horizontal: 0});
		});		
	}
	
//-------------------set custom scroller just resize------------------------------//
	function reinitialiseScrollPane_resize()
	{
		$('.scroll').setCustomScroller({horizontal: 0});
		$('.scroll_portf').setCustomScroller({horizontal: 0});
	}

//-------------------set custom scroller for balk------------------------------//	
	$('.scroll_balk').customScroller({horizontal: 0});
					
	function reinitialiseScrollPane_balk()
	{
		$('.customScrollerContent').animate({'top' : '0px'});
		$('.scroll_balk').setCustomScroller({horizontal: 0});
	}
	
//-------------------set custom scroller for portfolio------------------------------//	
	$('.scroll_portf').customScroller({horizontal: 0});
					
	function reinitialiseScrollPane_portf()
	{
		$('.customScrollerContent').animate({'top' : '0px'}, function()
		{
			$('.scroll_portf').setCustomScroller({horizontal: 0});
		});
	}
	

//-------------------klik acties om andere onderdelen van site te openen------------------------------//
	$(".contact_link").click(function() 
	{
		var link_origin = $(this);
		
		if (link_origin.hasClass("diensten")) 
		{
			$('#overlay').removeClass('blauw_links');
			close_overlay_blauw_links();
			open_oranje();
			oranje_content1();
		}
	}
	);
	
	
	$(".portfolio_link").click(function() 
	{
		var link_origin = $(this);
		
		if (link_origin.hasClass("diensten")) 
		{
			$('#overlay').removeClass('blauw_links');
			close_overlay_blauw_links();
			open_portfolio();
		}
	}
	);
	
	
	//--------------------------diensten links----------------------------------//
	
		//-------------content van submenu laden op aanvraag----------------//
		function show_blauw_links_menu_01_content()
			{
				$("#blauw_links_01_content").fadeIn("fast", function()
					{
						reinitialiseScrollPane();
					}
				);
			}
		
		function show_blauw_links_menu_02_content()
			{
				$("#blauw_links_02_content").fadeIn("fast", function()
					{
						reinitialiseScrollPane();
					}
				);
			}
		
		function show_blauw_links_menu_03_content()
			{
				$("#blauw_links_03_content").fadeIn("fast", function()
					{
						reinitialiseScrollPane();
					}
				);
			}
		
		function show_blauw_links_menu_04_content()
			{
				$("#blauw_links_04_content").fadeIn("fast", function()
					{
						reinitialiseScrollPane();
					}
				);
			}
			
		
		function show_blauw_links_menu_05_content()
			{
				$("#blauw_links_05_content").fadeIn("fast", function()
					{
						reinitialiseScrollPane();
					}
				);
			}
		
		//---------------content verbergen en daarna de oproep om de content te laden-----------------//
		
		function show_diensten_overzicht()
		{
			$("#blauw_links_03_content").fadeOut("fast");
			$("#blauw_links_04_content").fadeOut("fast");
			$("#blauw_links_02_content").fadeOut("fast");
			$("#blauw_links_05_content").fadeOut("fast", show_blauw_links_menu_01_content);
		}
		
		function show_webdesign()
		{
			$("#blauw_links_03_content").fadeOut("fast");
			$("#blauw_links_04_content").fadeOut("fast");
			$("#blauw_links_01_content").fadeOut("fast");
			$("#blauw_links_05_content").fadeOut("fast", show_blauw_links_menu_02_content);
		}
		
		function show_fotografie()
		{
			$("#blauw_links_01_content").fadeOut("fast");
			$("#blauw_links_02_content").fadeOut("fast");
			$("#blauw_links_04_content").fadeOut("fast");
			$("#blauw_links_05_content").fadeOut("fast", show_blauw_links_menu_03_content);
		}
		
		function show_print()
		{
			$("#blauw_links_01_content").fadeOut("fast");
			$("#blauw_links_02_content").fadeOut("fast");
			$("#blauw_links_03_content").fadeOut("fast");
			$("#blauw_links_05_content").fadeOut("fast", show_blauw_links_menu_04_content);
		}
		
		function show_hosting()
		{
			$("#blauw_links_01_content").fadeOut("fast");
			$("#blauw_links_02_content").fadeOut("fast");
			$("#blauw_links_03_content").fadeOut("fast");
			$("#blauw_links_04_content").fadeOut("fast", show_blauw_links_menu_05_content);
		}
		
		//------------listners om content te laden via andere links dan de menu items---------------//
		$(".webdesign_link").click(function()
		{
			show_webdesign();
		}
		);
		
		$(".foto_link").click(function()
		{
			show_fotografie();
		}
		);
		
		$(".print_link").click(function()
		{
			show_print();
		}
		);
		
		$(".hosting_link").click(function()
		{
			show_hosting();
		}
		);
		
//-------------------portfolio images openen----------------------------------//
	$('.portf_images').each
	(
		function()
		{
			$(this).click
			(
				function()
				{
					var portfolio_images = $(this).attr("title");
					$('#portfolio_images_show').load('images/portfolio/'+portfolio_images+'.inc.php');
				}
			);
		}
	);
	/*
	$('.portf_images').click(function()
	{
		var portfolio_images = $(this).attr("title");
		$('#portfolio_images_show').load('images/portfolio/'+portfolio_images+'.inc.php');
		
	}
	);
	*/
//--------controle op nieuwe content en daarbij de roulatie inzetten-----------//
$('#portfolio_images_container').livequery(function()
{
	$("#portfolio_images_up").unbind('click');
	$("#portfolio_images_down").unbind('click');
	
	//----------plaatjes openen in lightbox-----------------------//
	$("a.iframe").fancybox(
	{ 
		'speedIn': 300, 	
		'speedOut': 300,
		'titleShow' : false,
		'cyclic' : true
	}
	);
	
	var portfolio_images_aantal = $('#portfolio_images_container').attr("title");
	
	if (portfolio_images_aantal <=1)
	{
		$('#portfolio_images_up').fadeOut('fast');
		$('#portfolio_images_down').fadeOut('fast');
	}
	
	else
	{
		$('#portfolio_images_up').fadeIn('fast');
		$('#portfolio_images_down').fadeIn('fast');
	}
	
	if (portfolio_images_aantal <1)
	{
		$('#portfolio_images_show').fadeOut('fast');
	}
	
	else
	{
		$('#portfolio_images_show').fadeIn('fast');
	}
	
	var portfolio_images_aantal_max = portfolio_images_aantal;
	
	//-----------roulatie omhoog------------//
	$('#portfolio_images_up').click(function()
	{			
		var id = $('div#portfolio_images_container div.current').attr('id');
		id = id * 1;
		
		if (id >= 2)
		{
			/*portfolio_images_aantal = (portfolio_images_aantal - 1);*/
			
			var arc_out_params = {
			center: [37,95],
				radius: 100,
				start: 200,
				end: 0,
				dir: 1
			}
			
			var arc_in_params = {
			center: [37,95],
				radius: 100,
				start: 100,
				end: 200,
				dir: 1
			}
			
				$('#'+id+'').stop(true, true).animate({path : new $.path.arc(arc_out_params), opacity: '0'}, {queue: false, duration: 'slow'}).removeClass('current');

				$('#'+(id-1)+'').stop(true, true).css({'display' : 'block'}).animate({path : new $.path.arc(arc_in_params), opacity: '1'}, {queue: false, duration: 'slow'}).addClass('current');
		}
		
		else
		{
			var arc_out_params = {
			center: [37,95],
				radius: 100,
				start: 200,
				end: 0,
				dir: 1
			}
			
			var arc_in_params = {
			center: [37,95],
				radius: 100,
				start: 100,
				end: 200,
				dir: 1
			}
			

				$('#'+id+'').stop(true, true).animate({path : new $.path.arc(arc_out_params), opacity: '0'}, {queue: false, duration: 'slow'}).removeClass('current');
				
				$('#'+(portfolio_images_aantal)+'').stop(true, true).css({'display' : 'block'}).animate({path : new $.path.arc(arc_in_params), opacity: '1'}, {queue: false, duration: 'slow'}).addClass('current');

		}
		

	}
	);

	//-----------roulatie omlaag------------//
	$('#portfolio_images_down').click(function()
	{			
		var id = $('div#portfolio_images_container div.current').attr('id');
		
				
		if (id >= portfolio_images_aantal_max)
		{
			/*portfolio_images_aantal = (portfolio_images_aantal - 1);*/
			
			var arc_out_params = {
			center: [37,95],
				radius: 100,
				start: 200,
				end: 0,
				dir: -1
			}
			
			var arc_in_params = {
			center: [37,95],
				radius: 100,
				start: 100,
				end: 200,
				dir: -1
			}
			
				$('#'+id+'').stop(true, true).animate({path : new $.path.arc(arc_out_params), opacity: '0'}, {queue: false, duration: 'slow'}).removeClass('current');

				$('#1').stop(true, true).css({'display' : 'block'}).animate({path : new $.path.arc(arc_in_params), opacity: '1'}, {queue: false, duration: 'slow'}).addClass('current');
		}
		
		else
		{
			id = id * 1;
			
			var arc_out_params = {
			center: [37,95],
				radius: 100,
				start: 200,
				end: 0,
				dir: -1
			}
			
			var arc_in_params = {
			center: [37,95],
				radius: 100,
				start: 100,
				end: 200,
				dir: -1
			}
			

				$('#'+id+'').stop(true, true).animate({path : new $.path.arc(arc_out_params), opacity: '0'}, {queue: false, duration: 'slow'}).removeClass('current');
				
				$('#'+(id+1)+'').stop(true, true).css({'display' : 'block'}).animate({path : new $.path.arc(arc_in_params), opacity: '1'}, {queue: false, duration: 'slow'}).addClass('current');

		}
		

	}
	);

}
);
	
//--------------------------------accordion menu portfolio-------------------------//
$('#blauw_top_04_accordion').accordion(
{
	autoHeight: false, 
	collapsible: true, 
	active: 0, 
	fillSpace: true, 
	clearStyle: true, 
	change: function(){reinitialiseScrollPane_resize();}
}
);


//-------------------hover over image om te vergroten------------------------------------//

//$(".resize").thumbPopup();

$('.resize').hover(function()
{
	$(this).stop().animate({'width' : '275px'}, function()
	{
		reinitialiseScrollPane_resize();
	});
	
},function()
{
	var width = $(this).parent().width();
	$(this).stop().animate({'width' : +width+'px'}, function()
	{
		reinitialiseScrollPane_resize();
	});
}
);
	



//---------------start website met delay (gedachten was om de site te kunnen resetten...)-------------------//			

		$("#loading").fadeOut(500);
		
		$("#oob_container").delay(1200).fadeIn(1, function()
		{
			
			//-------------------klik acties om andere onderdelen van site te openen------------------------------//
			$(".contact_link").click(function() 
			{
				var link_origin = $(this);
				
				if (link_origin.hasClass("diensten")) 
				{
					$('#overlay').removeClass('blauw_links');
					close_overlay_blauw_links(function()
					{
						open_oranje(function()
						{
							oranje_content1();
						});
					});
				}
			}
			);
			

//------------------abri klik openen fancybox---------------------------------------------//
$("a.iframe").fancybox({ 
			'speedIn': 300, 	
			'speedOut': 300,
			'width' : 400,
			'height' : 400,
			'titleShow' : false
			});
			
			
//----------------start abri naar beneden vallen crack op grond------------------------------------//

			$("#abri_crack_01").delay(410).queue(function(){$(this).css({'display' : 'block'});$(this).dequeue();});
			$("#abri_crack").delay(500).queue(function(){$(this).css({'display' : 'block'});$(this).dequeue();});
		
		
		
//-------------animatie van logo bij start website---------------------------//			
			$("#oob_naam_oob").animate(
										{
										   left: '540px',
										   width: '540px'
										}, 800);
			
			$("#oob_naam_webdesign").animate(
										{
										   left: '580px',
										   width: '339px'
										}, 950);
			
			
//------------laden van fade in logo en daarna de balletjes voor de hover----------------------------//		
			$("#oranje_rondje_schaduw").fadeIn(1000);
			$("#balk_schaduw").fadeIn(1000);
			$("#blauw_top_rondje_schaduw").fadeIn(1000);
			$("#blauw_links_rondje_schaduw").fadeIn(1000);
			$("#blauw_rechts_rondje_schaduw").fadeIn(1000);
			$("#blauw_onder_rondje_schaduw").fadeIn(1000, function()
														{
															$("#rondje_oranje").css(
															{
															   'display' : 'block'
															}, 950);
															
															$("#blauw_top").css(
															{
															   'display' : 'block'
															}, 950);
															
															$("#blauw_links").css(
															{
															   'display' : 'block'
															}, 950);
															
															$("#blauw_rechts").css(
															{
															   'display' : 'block'
															}, 950);
															
															$("#blauw_onder").css(
															{
															   'display' : 'block'
															}, 950);
															
															$("#balk").css(
															{
															   'display' : 'block'
															}, 950);
														}
									   );
		



//-----------------start abri naar beneden vallen en daarna rotatie plaatjes------------------------------------------------//
			$("#abri").show("slide", {direction: 'up', easing: 'easeOutBounce'}, 800);
			
		
			
			
			$('#abri_scroll_01').delay(1000).animate(
			{
				height: '230px'
			}, 600, loadAbri02);
			
			function loadAbri02()
			{
				$('#abri_scroll_01').delay(3000).hide("slide", {direction: 'up'}, 600, function()
																								{
																									$('#abri_scroll_01').css({'height' : '0px'});
																								}); 
				$('#abri_scroll_02').delay(3000).animate(
					{
						height: '230px'
					}, 600, loadAbri03);
			}
				
			function loadAbri03()
			{
				$('#abri_scroll_02').delay(3000).hide("slide", {direction: 'up'}, 600, function()
																								{
																									$('#abri_scroll_02').css({'height' : '0px'});
																								}); 
				$('#abri_scroll_03').delay(3000).animate(
					{
						height: '230px'
					}, 600, loadAbri01_loop);
			}
			
			function loadAbri01_loop()
			{
				$('#abri_scroll_03').delay(3000).hide("slide", {direction: 'up'}, 600, function()
																								{
																									$('#abri_scroll_03').css({'height' : '0px'});
																								}); 
				$('#abri_scroll_01').delay(3000).animate(
					{
						height: '230px'
					}, 600, loadAbri02);
			}


//---------------------hover balk---------------------------------------//
			$('.hover_balk').livequery(function()
			{ 
				// use the helper function hover to bind a mouseover and mouseout event 
				$(this) 
					.mouseenter(function()
					{ 
						$(this).addClass('hover');
						
						//---------stop warning message----------------------------------//
						stop_warning();
						
						$('#mouse_move_balk').mousemove(function(e){

						var position = $(this).position();
						var offset = $(this).offset();
						var x = e.pageX - (offset.left);
						var y = e.pageY - (offset.top); 
						
						//$('#status2').html(x +', '+ y);
					
						$('.hover_balk').stop(true, true).animate(
						{
							left: ((x - 20) / 4),
							top: ((y - 10) / 12)
						},50);
					    });

						
						//----------------animatie van rondje starten---------------------//
						$(".hover_balk").unbind('click.addit').bind('click.addit', function() 
							{
				
								$(".hover_balk").unbind('click.addit');
								
								$('.hover_balk').stop().css({'top' : '0px', 'left' : '0px'});
								
								$('#balk_schaduw').fadeOut(100);
								
								//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
								$('#balk_hover_id').removeClass("hover_balk");
																								
								//----------z-index zodat hij boven de rest staat----------------// 
								$('#mouse_move_balk').css({'z-index' : '10'}); 
								
								//---------rondje groot maken---------------------//
								$('#balk').find('.balk_img').stop().animate(
									{
										marginTop: '8px', /* The next 4 lines will vertically align this image */ 
										marginLeft: '-200px',
										top: '0%',
										left: '0%',
										width: '547px', /* Set new width */
										height: '544px', /* Set new height */
										padding: '0px'
									}, 200, function()
									{
										
										$('#balk_img').removeClass("balk_img");
										
										//--------------grijze overlay starten----------------//
										$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
										$('#overlay').addClass('balk');
										//set_active('balk');
										
										//-------------referentie klant laden-----------------//
										$(".speak").css({'top' : '-210px'});
										
										$(".speak").stop().delay(150).animate(
											{
												top: '-190px'
											}
										);
										
										$("#speak_balk").hover(function()
																   {
																	   $("#speak_balk").stop().animate(
																					   {
																						   top: '-110px'
																					   }
																					   );
																		$(".speak_uitspraak").css({'display' : 'block'});
																   }, function()
																   {
																	   $("#speak_balk").stop().animate(
																					   {
																						   top: '-190px'
																					   },500, function() 
																					   {
																						   $(".speak_uitspraak").css({'display' : 'none'});
																					   }
																					   );
																		if (rndNum == 4)
																		{
																			rndNum = 0;
																		}
																		else
																		{
																			rndNum++;
																		}
																		
																		
																   }
														  ).find('.speak_text').html(uitspraak[rndNum]);
										
																													
										
										//-----------content van het rondje laden-----------------//
										$("#balk_inhoud").fadeIn('slow', function()
										{
											//------------custom scroll aanpassen aan nieuwe hoogte----------//
											//reinitialiseScrollPane_balk();
											
											
											//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
											$(".show").toggle(function()
																	  {
																		  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_balk);
																	  },
															  function()
																	  {
																		  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_balk);
																	  }
																
															);
											
											
										}
										);
									}
									);
							} 
							);
							
						
						
						
					
				}
				).mouseleave(function()
				{
					$(this).removeClass('hover');
					
					$('.hover_balk').stop(true, true).animate(
					{
						left: '0px',
						top: '0px'
					},250);
				}
				); 
			}, function() 
			{ 
				// unbind the mouseover and mouseout events 
				//$(this) 
				//	.unbind('mouseover') 
				//	.unbind('mouseout'); 
			}
			);



			
//---------------------hover oranje rondje---------------------------------------//
			$('.hover_oranje').livequery(function()
			{ 
				// use the helper function hover to bind a mouseover and mouseout event 
				$(this) 
					.mouseenter(function()
					{ 
						$(this).addClass('hover');
						
						//---------stop warning message----------------------------------//
						stop_warning();
						
						$('#mouse_move_oranje').mousemove(function(e){

						var position = $(this).position();
						var offset = $(this).offset();
						var x = e.pageX - (offset.left);
						var y = e.pageY - (offset.top);
						
						//$('#status2').html(x +', '+ y);
					
						$('.hover_oranje').stop(true, true).animate(
						{
							left: ((x - 10) / 3),
							top: ((y - 5) / 3)
						},200);
					    });

						
						//----------------animatie van rondje starten---------------------//
						
						{
							$(".hover_oranje").unbind('click.addit').bind('click.addit', function() 
								{
						
									$(".hover_oranje").unbind('click.addit');
									
									$('.hover_oranje').stop().css({'top' : '0px', 'left' : '0px'});
									
									$('#oranje_rondje_schaduw').fadeOut(100);
									
									//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
									$('#oranje_hover_id').removeClass("hover_oranje");
																									
									//----------z-index zodat hij boven de rest staat----------------// 
									$('#mouse_move_oranje').css({'z-index' : '10'}); 
									
									//---------rondje groot maken---------------------//
									$('#rondje_oranje').find('.rondje_img').stop().animate(
										{
											marginTop: '-175px', /* The next 4 lines will vertically align this image */ 
											marginLeft: '-450px',
											top: '50%',
											left: '50%',
											width: '547px', /* Set new width */
											height: '544px', /* Set new height */
											padding: '0px'
										}, 200, function()
										{
											
											$('#oranje_img').removeClass("rondje_img");
											
											//--------------grijze overlay starten----------------//
											$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
											$('#overlay').addClass('oranje');
											//set_active('oranje');
											
											//-------------referentie klant laden-----------------//
											$(".speak").css({'top' : '-210px'});
											
											$(".speak").stop().delay(150).animate(
												{
													top: '-190px'
												}
											);
											
											$("#speak_oranje").hover(function()
																	   {
																		   $("#speak_oranje").stop().animate(
																						   {
																							   top: '-110px'
																						   }
																						   );
																			$(".speak_uitspraak").css({'display' : 'block'});
																	   }, function()
																	   {

																		   $("#speak_oranje").stop().animate(
																						   {
																							   top: '-190px'
																						   },500, function() 
																						   {
																							   $(".speak_uitspraak").css({'display' : 'none'});
																						   }
																						   );

																						   
																					if (rndNum == 4)
																					{
																						rndNum = 0;
																					}
																					else
																					{
																						rndNum++;
																					}
																			   }
																	  ).find('.speak_text').html(uitspraak[rndNum]);
											
																														
											//----------------paper overlay tonen--------------------//
											$(".paper_overlay").fadeIn('fast');
											
											//-----------content van het rondje laden-----------------//
											$("#rondje_oranje_inhoud").fadeIn('slow', function()
											{
												//------------custom scroll aanpassen aan nieuwe hoogte----------//
												reinitialiseScrollPane();
												
												//----------------ajax form starten--------------------//
												$('#belmij').ajaxContactForm('forms/send_ajaxbelmij.php', 
													{
														extraValues:		{},
														falseFieldFunc:		function(formulier, veld, taal) {
															veld.effect("highlight", {color: '#dd0000'}, 1000);
														},
														falseMessageFunc:	function(formulier, taal) 
														{ 
															alert('Niet alles is correct ingevoerd. Probeert u het nog eens.');
															//$('#error_contact').text('');
															//$('#error_contact').append("Niet alles is correct ingevoerd. Probeert u het nog eens.");
															//$('#error_contact').show("slide");
															//reinitialiseScrollPane();
														},
														errorMessageFunc:	function(formulier, bericht, taal) { 
															alert(bericht); 
														},
														succesMessageFunc:	function(formulier, bericht, taal) { 
															$.fn.ajaxContactForm.clearForm(formulier);
															alert(bericht);
														}
						
													}
												);
												
											
											
												//------------sub-menu items inschuiven-------------//
												$("#sub_menu_oranje").css({'display' : 'block'});
												
													$('#oranje_menu_05').stop(true, true).delay(200).show('slide', {direction: 'up'}, 600);
													$('#oranje_menu_04').stop(true, true).delay(300).show('slide', {direction: 'up'}, 600);
													$('#oranje_menu_03').stop(true, true).delay(450).show('slide', {direction: 'up'}, 600);
													$('#oranje_menu_02').stop(true, true).delay(520).show('slide', {direction: 'up'}, 600);
													$('#oranje_menu_01').stop(true, true).delay(640).show('slide', {direction: 'up'}, 600);
												
												
												
												//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
												$(".show").toggle(function()
																		  {
																			  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																		  },
																  function()
																		  {
																			  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																		  }
																	
																);
												
												//-------------content van submenu laden op aanvraag----------------//
												function show_oranje_menu_01_content()
													{
														$("#oranje_01_content").fadeIn("fast", function()
															{
																reinitialiseScrollPane();
																
																//----------------ajax form starten--------------------//
																$('#foo').ajaxContactForm('forms/send_ajaxcontactform.php', {});
															}
														);
													}
												
												function show_oranje_menu_02_content()
													{
														$("#oranje_02_content").fadeIn("fast", function()
															{
																reinitialiseScrollPane();
																
																//----------------ajax form starten--------------------//
																$('#belmij').ajaxContactForm('forms/send_ajaxbelmij.php', {});
															}
														);
													}
												
												function show_oranje_menu_03_content()
													{
														$("#maps").fadeIn("fast");
														$("#maps").attr('src', 'maps.php');
						
														$("#oranje_03_content").fadeIn("fast", function()
															{
																reinitialiseScrollPane();
															}
														);
													}
												
												function show_oranje_menu_04_content()
													{
														$("#oranje_04_content").fadeIn("fast", function()
															{
																reinitialiseScrollPane();
															}
														);
													}
												
												//----------------aktie instellen voor klik op submenu---------------//
												$("#oranje_menu_01").click(function()
													{
														function oranje_content1()
														{
															$("#maps").fadeOut("fast");
															$("#oranje_03_content").fadeOut("fast");
															$("#oranje_04_content").fadeOut("fast");
															$("#oranje_02_content").fadeOut("fast", show_oranje_menu_01_content);
														}
														oranje_content1();
													}
												);
												
												$("#oranje_menu_02").click(function()
													{
														$("#maps").fadeOut("fast");
														$("#oranje_03_content").fadeOut("fast");
														$("#oranje_04_content").fadeOut("fast");
														$("#oranje_01_content").fadeOut("fast", show_oranje_menu_02_content);
													}
												);
												
												$("#oranje_menu_03").click(function()
													{
														$("#oranje_01_content").fadeOut("fast");
														$("#oranje_02_content").fadeOut("fast");
														$("#oranje_04_content").fadeOut("fast", show_oranje_menu_03_content);
													}
												);
												
												$("#oranje_menu_04").click(function()
													{
														$("#maps").fadeOut("fast");
														$("#oranje_01_content").fadeOut("fast");
														$("#oranje_02_content").fadeOut("fast");
														$("#oranje_03_content").fadeOut("fast", show_oranje_menu_04_content);
													}
												);
												
											}
											);
										}
										);
								} 
								);
						}
						
						
						
					
				}
				).mouseleave(function()
				{
					$(this).removeClass('hover');
					
					$('.hover_oranje').stop(true, true).animate(
					{
						left: '0px',
						top: '0px'
					},250);
				}
				); 
			}, function() 
			{ 
				// unbind the mouseover and mouseout events 
				//$(this) 
				//	.unbind('mouseover') 
				//	.unbind('mouseout'); 
			}
			);


//---------------------hover blauw_top rondje---------------------------------------//
			$('.hover_blauw_top').livequery(function()
			{ 
				// use the helper function hover to bind a mouseover and mouseout event 
				$(this) 
					.mouseenter(function()
					{ 
						$(this).addClass('hover');
						
						//---------stop warning message----------------------------------//
						stop_warning();
						
						$('#mouse_move_blauw_top').mousemove(function(e){

						var position = $(this).position();
						var offset = $(this).offset();
						var x = e.pageX - (offset.left);
						var y = e.pageY - (offset.top);
						
						//$('#status2').html(x +', '+ y);
					
						$('.hover_blauw_top').stop(true, true).animate(
						{
							left: ((x - 30) / 9),
							top: ((y - 25) / 9)
						},200);
					    });

						
						//----------------animatie van rondje starten---------------------//
						$(".hover_blauw_top").unbind('click.addit').bind('click.addit', function() 
							{
				
								$(".hover_blauw_top").unbind('click.addit');
								
								$('.hover_blauw_top').stop().css({'top' : '0px', 'left' : '0px'});
								
								$('#blauw_top_rondje_schaduw').fadeOut(100);
								
								//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
								$('#blauw_top_hover_id').removeClass("hover_blauw_top");
																								
								//----------z-index zodat hij boven de rest staat----------------// 
								$('#mouse_move_blauw_top').css({'z-index' : '10'}); 
								
								//---------rondje groot maken---------------------//
								$('#blauw_top').find('.blauw_top_img').stop().animate(
									{
										marginTop: '-88px', /* The next 4 lines will vertically align this image */ 
										marginLeft: '-105px',
										top: '50%',
										left: '50%',
										width: '547px', /* Set new width */
										height: '544px', /* Set new height */
										padding: '0px'
									}, 200, function()
									{
										
										$('#blauw_top_img').removeClass("blauw_top_img");
										
										//--------------grijze overlay starten----------------//
										$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
										$('#overlay').addClass('blauw_top');
										//set_active('oranje');
										
										//-------------referentie klant laden-----------------//
										$(".speak").css({'top' : '-210px'});
										
										$(".speak").stop().delay(150).animate(
											{
												top: '-190px'
											}
										);
										
										$("#speak_blauw_top").hover(function()
																   {
																	   $("#speak_blauw_top").stop().animate(
																					   {
																						   top: '-110px'
																					   }
																					   );
																		$(".speak_uitspraak").css({'display' : 'block'});
																   }, function()
																   {
																	   $("#speak_blauw_top").stop().animate(
																					   {
																						   top: '-190px'
																					   },500, function() 
																					   {
																						   $(".speak_uitspraak").css({'display' : 'none'});
																					   }
																					   );

																   					if (rndNum == 4)
																					{
																						rndNum = 0;
																					}
																					else
																					{
																						rndNum++;
																					}
																			   }
																	  ).find('.speak_text').html(uitspraak[rndNum]);
										
																													
										
										//------------inhoud verbergen zodat die pas na ballen animatie tevoorschijn komt----------//
										$('#paper_overlay_portfolio').css({'display' : 'block'});
										
											//----------------paper overlay tonen--------------------//
											$(".paper_overlay").fadeIn('fast');
											
											//-----------content van het rondje laden-----------------//
											$("#blauw_top_inhoud").fadeIn('slow', function()
											{
												//------------custom scroll aanpassen aan nieuwe hoogte----------//
												reinitialiseScrollPane_portf();
												
												//------------inhoud content_01 verbergen voor eerste keer laden----------//
												$('#blauw_top_01_content').removeClass('hidden');
												
												//------------sub-menu items inschuiven-------------//
												$("#portf_menu_blauw_top").css({'display' : 'block'});
												
													$('#blauw_portf_menu_01').css({"margin": "0px 200px 0px 200px"});
													$('#blauw_portf_menu_02').css({"margin": "0px 200px 0px 200px"});
													$('#blauw_portf_menu_03').css({"margin": "0px 200px 0px 200px"});
													$('#blauw_portf_menu_04').css({"margin": "0px 200px 0px 200px"});
													
													$('#blauw_portf_menu_04').stop(true, true).delay(300).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1300, function()
													{
														$('#paper_overlay_portfolio').fadeOut(800);
													});
													$('#blauw_portf_menu_03').stop(true, true).delay(450).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1400);
													$('#blauw_portf_menu_02').stop(true, true).delay(520).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1250);
													$('#blauw_portf_menu_01').stop(true, true).delay(640).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1475);
												
											
											
											//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
											$(".show").toggle(function()
																	  {
																		  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  },
															  function()
																	  {
																		  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  }
																
															);
											
											//-------------content van submenu laden op aanvraag----------------//
											function show_blauw_top_menu_01_content()
												{
													$("#blauw_top_01_content").fadeIn("fast", function()
														{
															reinitialiseScrollPane_portf();
														}
													);
												}
											
											function show_blauw_top_menu_02_content()
												{
													$("#blauw_top_02_content").fadeIn("fast", function()
														{
															reinitialiseScrollPane_portf();
														}
													);
												}
											
											function show_blauw_top_menu_03_content()
												{
													$("#blauw_top_03_content").fadeIn("fast", function()
														{
															reinitialiseScrollPane_portf();
														}
													);
												}
											
											function show_blauw_top_menu_04_content()
												{
													$("#blauw_top_04_content").fadeIn("fast", function()
														{
															reinitialiseScrollPane_portf();
															$('#blauw_top_04_accordion').accordion("activate", -1);
														}
													);
												}
												
											//-----------------instellen hover achtergrond-----------------------//
											
											$("#blauw_portf_menu_01").hover(function() 
											{
												$(this).stop(true, true).animate({left: '-198px', easing: 'easeInOutBack'});
												
												var portf_active = $(this);
					
												if (portf_active.hasClass("portf_inactive")) 
												{
													$(this).addClass("portf_hover");
												}
											}, 
												function()
												{
													$(this).stop(true, true).animate({left: '-205px', easing: 'easeInOutBack'});
													
													$(this).removeClass("portf_hover");
												}
											);
											
											
											$("#blauw_portf_menu_02").hover(function() 
											{
												$(this).stop(true, true).animate({left: '-215px', easing: 'easeInOutBack'});
												
												var portf_active = $(this);
					
												if (portf_active.hasClass("portf_inactive")) 
												{
													$(this).addClass("portf_hover");
												}
											}, 
												function()
												{
													$(this).stop(true, true).animate({left: '-222px', easing: 'easeInOutBack'});
													
													$(this).removeClass("portf_hover");
												}
											);
											
											
											$("#blauw_portf_menu_03").hover(function() 
											{
												$(this).stop(true, true).animate({left: '-193px', easing: 'easeInOutBack'});
												
												var portf_active = $(this);
					
												if (portf_active.hasClass("portf_inactive")) 
												{
													$(this).addClass("portf_hover");
												}
											}, 
												function()
												{
													$(this).stop(true, true).animate({left: '-200px', easing: 'easeInOutBack'});
													
													$(this).removeClass("portf_hover");
												}
											);
											
											
											$("#blauw_portf_menu_04").hover(function() 
											{
												$(this).stop(true, true).animate({left: '-130px', easing: 'easeInOutBack'});
												
												var portf_active = $(this);
					
												if (portf_active.hasClass("portf_inactive")) 
												{
													$(this).addClass("portf_hover");
												}
											}, 
												function()
												{
													$(this).stop(true, true).animate({left: '-137px', easing: 'easeInOutBack'});
													
													$(this).removeClass("portf_hover");
												}
											);
											
											
											
											//----------------aktie instellen voor klik op submenu---------------//
											$("#blauw_portf_menu_01").click(function()
												{
													var portf_check1 = $("#blauw_portf_menu_01");
													var portf_check2 = $("#blauw_portf_menu_02");
													var portf_check3 = $("#blauw_portf_menu_03");
													var portf_check4 = $("#blauw_portf_menu_04");
													
													if (portf_check1.hasClass("portf_inactive"))
													{
														$("#blauw_portf_menu_01").removeClass("portf_inactive");
														$("#blauw_portf_menu_01").addClass("portf_active");
													}
													
													if (portf_check2.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_02").removeClass("portf_active");
														$("#blauw_portf_menu_02").addClass("portf_inactive");
													}
													
													if (portf_check3.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_03").removeClass("portf_active");
														$("#blauw_portf_menu_03").addClass("portf_inactive");
													}
													
													if (portf_check4.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_04").removeClass("portf_active");
														$("#blauw_portf_menu_04").addClass("portf_inactive");
													}
													
													$("#blauw_top_03_content").fadeOut("fast");
													$("#blauw_top_04_content").fadeOut("fast");
													$("#blauw_top_02_content").fadeOut("fast", show_blauw_top_menu_01_content);
												}
											);
											
											$("#blauw_portf_menu_02").click(function()
												{
													var portf_check1 = $("#blauw_portf_menu_01");
													var portf_check2 = $("#blauw_portf_menu_02");
													var portf_check3 = $("#blauw_portf_menu_03");
													var portf_check4 = $("#blauw_portf_menu_04");
													
													if (portf_check1.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_01").removeClass("portf_active");
														$("#blauw_portf_menu_01").addClass("portf_inactive");
													}
													
													if (portf_check2.hasClass("portf_inactive"))
													{
														$("#blauw_portf_menu_02").removeClass("portf_inactive");
														$("#blauw_portf_menu_02").addClass("portf_active");
													}
													
													if (portf_check3.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_03").removeClass("portf_active");
														$("#blauw_portf_menu_03").addClass("portf_inactive");
													}
													
													if (portf_check4.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_04").removeClass("portf_active");
														$("#blauw_portf_menu_04").addClass("portf_inactive");
													}
													
													$("#blauw_top_03_content").fadeOut("fast");
													$("#blauw_top_04_content").fadeOut("fast");
													$("#blauw_top_01_content").fadeOut("fast", show_blauw_top_menu_02_content);
												}
											);
											
											$("#blauw_portf_menu_03").click(function()
												{
													var portf_check1 = $("#blauw_portf_menu_01");
													var portf_check2 = $("#blauw_portf_menu_02");
													var portf_check3 = $("#blauw_portf_menu_03");
													var portf_check4 = $("#blauw_portf_menu_04");
													
													if (portf_check1.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_01").removeClass("portf_active");
														$("#blauw_portf_menu_01").addClass("portf_inactive");
													}
													
													if (portf_check2.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_02").removeClass("portf_active");
														$("#blauw_portf_menu_02").addClass("portf_inactive");
													}
													
													if (portf_check3.hasClass("portf_inactive"))
													{
														$("#blauw_portf_menu_03").removeClass("portf_inactive");
														$("#blauw_portf_menu_03").addClass("portf_active");
													}
													
													if (portf_check4.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_04").removeClass("portf_active");
														$("#blauw_portf_menu_04").addClass("portf_inactive");
													}
													
													$("#blauw_top_01_content").fadeOut("fast");
													$("#blauw_top_02_content").fadeOut("fast");
													$("#blauw_top_04_content").fadeOut("fast", show_blauw_top_menu_03_content);
												}
											);
											
											$("#blauw_portf_menu_04").click(function()
												{
													var portf_check1 = $("#blauw_portf_menu_01");
													var portf_check2 = $("#blauw_portf_menu_02");
													var portf_check3 = $("#blauw_portf_menu_03");
													var portf_check4 = $("#blauw_portf_menu_04");
													
													if (portf_check1.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_01").removeClass("portf_active");
														$("#blauw_portf_menu_01").addClass("portf_inactive");
													}
													
													if (portf_check2.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_02").removeClass("portf_active");
														$("#blauw_portf_menu_02").addClass("portf_inactive");
													}
													
													if (portf_check3.hasClass("portf_active"))
													{
														$("#blauw_portf_menu_03").removeClass("portf_active");
														$("#blauw_portf_menu_03").addClass("portf_inactive");
													}
													
													if (portf_check4.hasClass("portf_inactive"))
													{
														$("#blauw_portf_menu_04").removeClass("portf_inactive");
														$("#blauw_portf_menu_04").addClass("portf_active");
													}
													
													$("#blauw_top_01_content").fadeOut("fast");
													$("#blauw_top_02_content").fadeOut("fast");
													$("#blauw_top_03_content").fadeOut("fast", show_blauw_top_menu_04_content);
												}
											);
											
										}
										);
									}
									);
							} 
							);
							
						

						
						
					
				}
				).mouseleave(function()
				{
					$(this).removeClass('hover');
					
					$('.hover_blauw_top').stop(true, true).animate(
					{
						left: '0px',
						top: '0px'
					},250);
				}
				); 
			}, function() 
			{ 
				// unbind the mouseover and mouseout events 
				//$(this) 
				//	.unbind('mouseover') 
				//	.unbind('mouseout'); 
			}
			);
			
			


//---------------------hover blauw_links rondje---------------------------------------//
			$('.hover_blauw_links').livequery(function()
			{ 
				// use the helper function hover to bind a mouseover and mouseout event 
				$(this) 
					.mouseenter(function()
					{ 
						$(this).addClass('hover');
						
						//---------stop warning message----------------------------------//
						stop_warning();
						
						$('#mouse_move_blauw_links').mousemove(function(e){

						var position = $(this).position();
						var offset = $(this).offset();
						var x = e.pageX - (offset.left);
						var y = e.pageY - (offset.top);
						
						//$('#status2').html(x +', '+ y);
					
						$('.hover_blauw_links').stop(true, true).animate(
						{
							left: ((x - 50) / 6),
							top: ((y - 40) / 6)
						},200);
					    });

						
						//----------------animatie van rondje starten---------------------//
						$(".hover_blauw_links").unbind('click.addit').bind('click.addit', function() 
							{
				
								$(".hover_blauw_links").unbind('click.addit');
								
								$('.hover_blauw_links').stop().css({'top' : '0px', 'left' : '0px'});
								
								$('#blauw_links_rondje_schaduw').fadeOut(100);
								
								//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
								$('#blauw_links_hover_id').removeClass("hover_blauw_links");
																								
								//----------z-index zodat hij boven de rest staat----------------// 
								$('#mouse_move_blauw_links').css({'z-index' : '10'}); 
								
								//---------rondje groot maken---------------------//
								$('#blauw_links').find('.blauw_links_img').stop().animate(
									{
										marginTop: '-181px', /* The next 4 lines will vertically align this image */ 
										marginLeft: '-39px',
										top: '50%',
										left: '50%',
										width: '547px', /* Set new width */
										height: '544px', /* Set new height */
										padding: '0px'
									}, 200, function()
									{
										
										$('#blauw_links_img').removeClass("blauw_links_img");
										
										//--------------grijze overlay starten----------------//
										$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
										$('#overlay').addClass('blauw_links');
										//set_active('oranje');
										
										//-------------referentie klant laden-----------------//
										$(".speak").css({'top' : '-210px'});
										
										$(".speak").stop().delay(150).animate(
											{
												top: '-190px'
											}
										);
										
										$("#speak_blauw_links").hover(function()
																   {
																	   $("#speak_blauw_links").stop().animate(
																					   {
																						   top: '-110px'
																					   }
																					   );
																		$(".speak_uitspraak").css({'display' : 'block'});
																   }, function()
																   {
																	   $("#speak_blauw_links").stop().animate(
																					   {
																						   top: '-190px'
																					   },500, function() 
																					   {
																						   $(".speak_uitspraak").css({'display' : 'none'});
																					   }
																					   );

																   					if (rndNum == 4)
																					{
																						rndNum = 0;
																					}
																					else
																					{
																						rndNum++;
																					}
																			   }
																	  ).find('.speak_text').html(uitspraak[rndNum]);
										
																													
										//----------------paper overlay tonen--------------------//
										$(".paper_overlay").fadeIn('fast');
										
										//-----------content van het rondje laden-----------------//
										$("#blauw_links_inhoud").fadeIn('slow', function()
										{
											//------------custom scroll aanpassen aan nieuwe hoogte----------//
											reinitialiseScrollPane();
										
											//------------sub-menu items inschuiven-------------//
											$("#sub_menu_blauw_links").css({'display' : 'block'});
											
												$('#blauw_links_menu_05').stop(true, true).delay(200).show('slide', {direction: 'up'}, 600);
												$('#blauw_links_menu_04').stop(true, true).delay(300).show('slide', {direction: 'up'}, 600);
												$('#blauw_links_menu_03').stop(true, true).delay(450).show('slide', {direction: 'up'}, 600);
												$('#blauw_links_menu_02').stop(true, true).delay(520).show('slide', {direction: 'up'}, 600);
												$('#blauw_links_menu_01').stop(true, true).delay(640).show('slide', {direction: 'up'}, 600);
											
											
											
											//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
											$(".show").toggle(function()
																	  {
																		  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  },
															  function()
																	  {
																		  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  }
																
															);
											
											
											
											//----------------aktie instellen voor klik op submenu---------------//
											$("#blauw_links_menu_01").click(function()
												{
													show_diensten_overzicht();
												}
											);
											
											$("#blauw_links_menu_02").click(function()
												{
													show_webdesign();
												}
											);
											
											$("#blauw_links_menu_03").click(function()
												{
													show_fotografie();
												}
											);
											
											$("#blauw_links_menu_04").click(function()
												{
													show_print();
												}
											);
											
											$("#blauw_links_menu_05").click(function()
												{
													show_hosting();
												}
											);
											
										}
										);
									}
									);
							} 
							);
							
						

						
						
					
				}
				).mouseleave(function()
				{
					$(this).removeClass('hover');
					
					$('.hover_blauw_links').stop(true, true).animate(
					{
						left: '0px',
						top: '0px'
					},250);
				}
				); 
			}, function() 
			{ 
				// unbind the mouseover and mouseout events 
				//$(this) 
				//	.unbind('mouseover') 
				//	.unbind('mouseout'); 
			}
			);
			

//---------------------hover blauw_rechts rondje---------------------------------------//
			$('.hover_blauw_rechts').livequery(function()
			{ 
				// use the helper function hover to bind a mouseover and mouseout event 
				$(this) 
					.mouseenter(function()
					{ 
						$(this).addClass('hover');
						
						//---------stop warning message----------------------------------//
						stop_warning();
						
						$('#mouse_move_blauw_rechts').mousemove(function(e){

						var position = $(this).position();
						var offset = $(this).offset();
						var x = e.pageX - (offset.left);
						var y = e.pageY - (offset.top);
						
						//$('#status2').html(x +', '+ y);
					
						$('.hover_blauw_rechts').stop(true, true).animate(
						{
							left: ((x - 10) / 6),
							top: ((y - 5) / 6)
						},200);
					    });

						
						//----------------animatie van rondje starten---------------------//
						$(".hover_blauw_rechts").unbind('click.addit').bind('click.addit', function() 
							{
				
								$(".hover_blauw_rechts").unbind('click.addit');
								
								$('.hover_blauw_rechts').stop().css({'top' : '0px', 'left' : '0px'});
								
								$('#blauw_rechts_rondje_schaduw').fadeOut(100);
								
								//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
								$('#blauw_rechts_hover_id').removeClass("hover_blauw_rechts");
																								
								//----------z-index zodat hij boven de rest staat----------------// 
								$('#mouse_move_blauw_rechts').css({'z-index' : '10'}); 
								
								//---------rondje groot maken---------------------//
								$('#blauw_rechts').find('.blauw_rechts_img').stop().animate(
									{
										marginTop: '-173px', /* The next 4 lines will vertically align this image */ 
										marginLeft: '-178px',
										top: '50%',
										left: '50%',
										width: '547px', /* Set new width */
										height: '544px', /* Set new height */
										padding: '0px'
									}, 200, function()
									{
										
										$('#blauw_rechts_img').removeClass("blauw_rechts_img");
										
										//--------------grijze overlay starten----------------//
										$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
										$('#overlay').addClass('blauw_rechts');
										//set_active('oranje');
										
										//-------------referentie klant laden-----------------//
										$(".speak").css({'top' : '-210px'});
										
										$(".speak").stop().delay(150).animate(
											{
												top: '-190px'
											}
										);
										
										$("#speak_blauw_rechts").hover(function()
																   {
																	   $("#speak_blauw_rechts").stop().animate(
																					   {
																						   top: '-110px'
																					   }
																					   );
																		$(".speak_uitspraak").css({'display' : 'block'});
																   }, function()
																   {
																	   $("#speak_blauw_rechts").stop().animate(
																					   {
																						   top: '-190px'
																					   },500, function() 
																					   {
																						   $(".speak_uitspraak").css({'display' : 'none'});
																					   }
																					   );

																   					if (rndNum == 4)
																					{
																						rndNum = 0;
																					}
																					else
																					{
																						rndNum++;
																					}
																			   }
																	  ).find('.speak_text').html(uitspraak[rndNum]);
										
																													
										
										//----------------paper overlay tonen--------------------//
										$(".paper_overlay").fadeIn('fast');	
											
										//-----------content van het rondje laden-----------------//
										$("#blauw_rechts_inhoud").fadeIn('slow', function()
										{
											//------------custom scroll aanpassen aan nieuwe hoogte----------//
											reinitialiseScrollPane();
											
											//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
											$(".show").toggle(function()
																	  {
																		  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  },
															  function()
																	  {
																		  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  }
																
															);
											
											
											
										}
										);
									}
									);
							} 
							);
							
						

						
						
					
				}
				).mouseleave(function()
				{
					$(this).removeClass('hover');
					
					$('.hover_blauw_rechts').stop(true, true).animate(
					{
						left: '0px',
						top: '0px'
					},250);
				}
				); 
			}, function() 
			{ 
				// unbind the mouseover and mouseout events 
				//$(this) 
				//	.unbind('mouseover') 
				//	.unbind('mouseout'); 
			}
			);			



//---------------------hover blauw_onder rondje---------------------------------------//
			$('.hover_blauw_onder').livequery(function()
			{ 
				// use the helper function hover to bind a mouseover and mouseout event 
				$(this) 
					.mouseenter(function()
					{ 
						$(this).addClass('hover');
						
						//---------stop warning message----------------------------------//
						stop_warning();
						
						$('#mouse_move_blauw_onder').mousemove(function(e){

						var position = $(this).position();
						var offset = $(this).offset();
						var x = e.pageX - (offset.left);
						var y = e.pageY - (offset.top);
						
						//$('#status2').html(x +', '+ y);
					
						$('.hover_blauw_onder').stop(true, true).animate(
						{
							left: ((x - 10) / 5),
							top: ((y - 5) / 5)
						},200);
					    });

						
						//----------------animatie van rondje starten---------------------//
						$(".hover_blauw_onder").unbind('click.addit').bind('click.addit', function() 
							{
				
								$(".hover_blauw_onder").unbind('click.addit');
								
								$('.hover_blauw_onder').stop().css({'top' : '0px', 'left' : '0px'});
								
								$('#blauw_onder_rondje_schaduw').fadeOut(100);
								
								//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
								$('#blauw_onder_hover_id').removeClass("hover_blauw_onder");
																								
								//----------z-index zodat hij boven de rest staat----------------// 
								$('#mouse_move_blauw_onder').css({'z-index' : '10'}); 
								
								//---------rondje groot maken---------------------//
								$('#blauw_onder').find('.blauw_onder_img').stop().animate(
									{
										marginTop: '-271px', /* The next 4 lines will vertically align this image */ 
										marginLeft: '-105px',
										top: '50%',
										left: '50%',
										width: '547px', /* Set new width */
										height: '544px', /* Set new height */
										padding: '0px'
									}, 200, function()
									{
										
										$('#blauw_onder_img').removeClass("blauw_onder_img");
										
										//--------------grijze overlay starten----------------//
										$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
										$('#overlay').addClass('blauw_onder');
										//set_active('oranje');
										
										//-------------referentie klant laden-----------------//
										$(".speak").css({'top' : '-210px'});
										
										$(".speak").stop().delay(150).animate(
											{
												top: '-190px'
											}
										);
										
										$("#speak_blauw_onder").hover(function()
																   {
																	   $("#speak_blauw_onder").stop().animate(
																					   {
																						   top: '-110px'
																					   }
																					   );
																		$(".speak_uitspraak").css({'display' : 'block'});
																   }, function()
																   {
																	   $("#speak_blauw_onder").stop().animate(
																					   {
																						   top: '-190px'
																					   },500, function() 
																					   {
																						   $(".speak_uitspraak").css({'display' : 'none'});
																					   }
																					   );

																   					if (rndNum == 4)
																					{
																						rndNum = 0;
																					}
																					else
																					{
																						rndNum++;
																					}
																			   }
																	  ).find('.speak_text').html(uitspraak[rndNum]);
										
																													
										
										//----------------paper overlay tonen--------------------//
										$(".paper_overlay").fadeIn('fast');
											
										//-----------content van het rondje laden-----------------//
										$("#blauw_onder_inhoud").fadeIn('slow', function()
										{
											//------------custom scroll aanpassen aan nieuwe hoogte----------//
											reinitialiseScrollPane();
										
											//------------sub-menu items inschuiven-------------//
											$(".sub_menu_blauw_onder").css({'display' : 'block'});
											
												$('#blauw_onder_menu_02').stop(true, true).delay(520).show('slide', {direction: 'up'}, 600);
												$('#blauw_onder_menu_01').stop(true, true).delay(640).show('slide', {direction: 'up'}, 600);
											
											
											
											//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
											$(".show").toggle(function()
																	  {
																		  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  },
															  function()
																	  {
																		  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
																	  }
																
															);
											
											//-------------content van submenu laden op aanvraag----------------//
											function show_blauw_onder_menu_01_content()
												{
													$("#blauw_onder_01_content").fadeIn("fast", function()
														{
															reinitialiseScrollPane();
															
															//----------------ajax form starten--------------------//
															$('#foo').ajaxContactForm('forms/send_ajaxcontactform.php', {});
														}
													);
												}
											
											function show_blauw_onder_menu_02_content()
												{
													$("#blauw_onder_02_content").fadeIn("fast", function()
														{
															reinitialiseScrollPane();
														}
													);
												}
											
											
											
											//----------------aktie instellen voor klik op submenu---------------//
											$("#blauw_onder_menu_01").click(function()
												{
													$("#blauw_onder_02_content").fadeOut("fast", show_blauw_onder_menu_01_content);
												}
											);
											
											$("#blauw_onder_menu_02").click(function()
												{
													$("#blauw_onder_01_content").fadeOut("fast", show_blauw_onder_menu_02_content);
												}
											);
											
											
											
										}
										);
									}
									);
							} 
							);
							
						

						
						
					
				}
				).mouseleave(function()
				{
					$(this).removeClass('hover');
					
					$('.hover_blauw_onder').stop(true, true).animate(
					{
						left: '0px',
						top: '0px'
					},250);
				}
				); 
			}, function() 
			{ 
				// unbind the mouseover and mouseout events 
				//$(this) 
				//	.unbind('mouseover') 
				//	.unbind('mouseout'); 
			}
			);
			
			
									

			
			
			


		
		});






		
//-----------------set click overlay function-----------------//
			
			$("#overlay").click(function() 
			{
				var active = $(this);
				
				if (active.hasClass("oranje")) 
				{
					close_overlay_oranje();
					$('#overlay').removeClass('oranje')
				}
				
				if (active.hasClass("balk")) 
				{
					close_overlay_balk();
					$('#overlay').removeClass('balk')
				}
				
				if (active.hasClass("blauw_top")) 
				{
					close_overlay_blauw_top();
					$('#overlay').removeClass('blauw_top')
				}
				
				if (active.hasClass("blauw_links")) 
				{
					close_overlay_blauw_links();
					$('#overlay').removeClass('blauw_links')
				}
				
				if (active.hasClass("blauw_rechts")) 
				{
					close_overlay_blauw_rechts();
					$('#overlay').removeClass('blauw_rechts')
				}
				
				if (active.hasClass("blauw_onder")) 
				{
					close_overlay_blauw_onder();
					$('#overlay').removeClass('blauw_onder')
				}
				//if (active = 'oranje')
				//{
				//	close_overlay_oranje();
				//}
				
				//else if (active = 'balk')
				//{
				//	close_overlay_balk();
				//}
			}
			);
			
//------------------overlay balk function--------------------//

function close_overlay_balk()
			{
				
							$('#overlay_transparant').css({"filter" : "alpha(opacity=0)", "display" : "block"});
							
							$(".speak").stop().animate(
								{
									top: '-210px'
								}, 100, function() 
									{
										$("#balk_inhoud").fadeOut(350, function()
											{
																						
												$("#overlay").fadeOut('fast');
												
												$('.hover_balk').css({'top' : '0px', 'left' : '0px'});
												
												$('#balk_img').addClass("balk_img");
												
												$("#balk").find('.balk_img').stop().animate(
												{
													marginTop: '0px', /* Set alignment back to default */
													marginLeft: '0px',
													top: '0px',
													left: '0px',
													width: '98px', /* Set width back to default */
													height: '423px', /* Set height back to default */
													padding: '0px'
												}, 200, function()
													{
														$('#mouse_move_balk').css({'z-index' : '1'});
														$('#balk_schaduw').fadeIn(1000);
														$('#overlay_transparant').fadeOut(1);
													}
												);
												
												
												
												
											}
										);
									}
							);
							

				$(".sub_menu_balk").dequeue();
				
				//---------add hover class om klik weer mogelijk te maken-------------------//
				$('#balk_hover_id').addClass("hover_balk");
				


			}

			
//-----------------overlay oranje function------------------//			
			function close_overlay_oranje()
			{
				//$(this).css({'z-index' : '1'}).addClass("hover_oranje"); /*Add a higher z-index value so this image stays on top*/ 
				
				$('#overlay_transparant').css({"filter" : "alpha(opacity=0)", "display" : "block"});
				
				$('#oranje_menu_01').stop(true, true).delay(50).hide('slide', {direction: 'up'}, 200);
				$('#oranje_menu_02').stop(true, true).delay(110).hide('slide', {direction: 'up'}, 220);
				$('#oranje_menu_03').stop(true, true).delay(160).hide('slide', {direction: 'up'}, 225);
				$('#oranje_menu_04').stop(true, true).delay(220).hide('slide', {direction: 'up'}, 180, function()
				{
					$("#sub_menu_oranje").css({'display' : 'none'});
						
							$(".speak").stop().animate(
								{
									top: '-210px'
								}, 100, function() 
									{
										$("#rondje_oranje_inhoud").fadeOut(350, function()
											{
										
												//----------------paper overlay verbergen--------------------//
												$(".paper_overlay").css({'display' : 'none'});
												
												$("#overlay").fadeOut('fast');
												
												$('.hover_oranje').css({'top' : '0px', 'left' : '0px'});
												
												$('#oranje_img').addClass("rondje_img");
												
												$("#rondje_oranje").find('.rondje_img').stop().animate(
												{
													marginTop: '0px', /* Set alignment back to default */
													marginLeft: '0px',
													top: '0px',
													left: '0px',
													width: '76px', /* Set width back to default */
													height: '75px', /* Set height back to default */
													padding: '0px'
												}, 200, function()
													{
														$("#mouse_move_oranje").css({'z-index' : '1'});
														$('#oranje_rondje_schaduw').fadeIn(1000);
														$('#overlay_transparant').fadeOut(1);
													}
												);
												
												
												
												
											}
										);
									}
							);
							
							
						
					
					
				}
				);
				$("#sub_menu_oranje").dequeue();
				
				//---------add hover class om klik weer mogelijk te maken-------------------//
				$('#oranje_hover_id').addClass("hover_oranje");
				
				//---------oranje rondje weer terug naar normale start stand-------------------//
				$('#rondje_oranje').find('.rondje_img').stop().animate(
					{
						width: '76px', /* Set new width */
						height: '76px', /* Set new height */
						padding: '0px'
					}, 200);



			}
			
//--------------------------close blauw_top overlay--------------------------------------//
			
function close_overlay_blauw_top()
			{
				//$(this).css({'z-index' : '1'}).addClass("hover_oranje"); /*Add a higher z-index value so this image stays on top*/ 
				
				$('#overlay_transparant').css({"filter" : "alpha(opacity=0)", "display" : "block"});
				
				$('#blauw_portf_menu_01').css({"margin": "0px 500px 0px 200px"});
				$('#blauw_portf_menu_02').css({"margin": "0px 500px 0px 200px"});
				$('#blauw_portf_menu_03').css({"margin": "0px 500px 0px 200px"});
				$('#blauw_portf_menu_04').css({"margin": "0px 500px 0px 200px"});
				
				//$('#blauw_portf_menu_01').stop(true, true).delay(50).animate({left: '100px', opacity: 0}, {duration: 1100, easing: 'easeInBack', queue: false});
				//$('#blauw_portf_menu_02').stop(true, true).delay(110).animate({left: '100px', opacity: 0}, {duration: 1320, easing: 'easeInBack', queue: false});
				//$('#blauw_portf_menu_03').stop(true, true).delay(160).animate({left: '100px', opacity: 0}, {duration: 1025, easing: 'easeInBack', queue: false});
				//$('#blauw_portf_menu_04').stop(true, true).delay(220).animate({left: '100px', opacity: 0}, 880, 'easeInBack', function()
				
				$('#blauw_portf_menu_01').stop(true, true).delay(50).hide('slide', {direction: 'right', easing: 'easeInBack'}, 1100);
				$('#blauw_portf_menu_02').stop(true, true).delay(110).hide('slide', {direction: 'right', easing: 'easeInBack'}, 1120);
				$('#blauw_portf_menu_03').stop(true, true).delay(160).hide('slide', {direction: 'right', easing: 'easeInBack'}, 1125);
				$('#blauw_portf_menu_04').stop(true, true).delay(220).hide('slide', {direction: 'right', easing: 'easeInBack'}, 1180, function()
				{
					
					$("#portf_menu_blauw_top").delay(2000).css({'display' : 'none'});
						
							$(".speak").delay(3500).stop().animate(
								{
									top: '-210px'
								}, 100, function() 
									{
										$("#blauw_top_inhoud").fadeOut(350, function()
											{
										
												//----------------paper overlay verbergen--------------------//
												$(".paper_overlay").css({'display' : 'none'});
												
												$("#overlay").fadeOut('fast');
												
												$('.hover_blauw_top').css({'top' : '0px', 'left' : '0px'});
												
												$('#blauw_top_img').addClass("blauw_top_img");
												
												$("#blauw_top").find('.blauw_top_img').stop().animate(
												{
													marginTop: '0px', /* Set alignment back to default */
													marginLeft: '0px',
													top: '0px',
													left: '0px',
													width: '76px', /* Set width back to default */
													height: '75px', /* Set height back to default */
													padding: '0px'
												}, 200, function()
													{
														$("#mouse_move_blauw_top").css({'z-index' : '1'});
														$('#blauw_top_rondje_schaduw').fadeIn(1000);
														$('#overlay_transparant').fadeOut(1);
													}
												);
												
												
											//---------overlay weer terug aan zetten om inhoud te verbergen bij opnieuw binnenkomen-------------------//
											$('#paper_overlay_portfolio').css({'display' : 'block'});	
												
											}
										);
									}
							);
							
							
						
					
					
				}
				);
				$(".sub_menu_blauw_top").dequeue();
				
				//---------add hover class om klik weer mogelijk te maken-------------------//
				$('#blauw_top_hover_id').addClass("hover_blauw_top");
				
				//---------oranje rondje weer terug naar normale start stand-------------------//
				$('#blauw_top').find('.blauw_top_img').stop().animate(
					{
						width: '76px', /* Set new width */
						height: '76px', /* Set new height */
						padding: '0px'
					}, 200);
				
				



			}


//--------------------------close blauw_links overlay--------------------------------------//
function close_overlay_blauw_links()
			{
				//$(this).css({'z-index' : '1'}).addClass("hover_oranje"); /*Add a higher z-index value so this image stays on top*/ 
				
				$('#overlay_transparant').css({"filter" : "alpha(opacity=0)", "display" : "block"});
				
				$('#blauw_links_menu_01').stop(true, true).delay(50).hide('slide', {direction: 'up'}, 200);
				$('#blauw_links_menu_02').stop(true, true).delay(110).hide('slide', {direction: 'up'}, 220);
				$('#blauw_links_menu_03').stop(true, true).delay(160).hide('slide', {direction: 'up'}, 225);
				$('#blauw_links_menu_04').stop(true, true).delay(180).hide('slide', {direction: 'up'}, 130);
				$('#blauw_links_menu_05').stop(true, true).delay(220).hide('slide', {direction: 'up'}, 180, function()
				{
					$("#sub_menu_blauw_links").css({'display' : 'none'});
						
							$(".speak").stop().animate(
								{
									top: '-210px'
								}, 100, function() 
									{
										$("#blauw_links_inhoud").fadeOut(350, function()
											{
										
												//----------------paper overlay verbergen--------------------//
												$(".paper_overlay").css({'display' : 'none'});
												
												$("#overlay").fadeOut('fast');
												
												$('.hover_blauw_links').css({'top' : '0px', 'left' : '0px'});
												
												$('#blauw_links_img').addClass("blauw_links_img");
												
												$("#blauw_links").find('.blauw_links_img').stop().animate(
												{
													marginTop: '0px', /* Set alignment back to default */
													marginLeft: '0px',
													top: '0px',
													left: '0px',
													width: '76px', /* Set width back to default */
													height: '75px', /* Set height back to default */
													padding: '0px'
												}, 200, function()
													{
														$("#mouse_move_blauw_links").css({'z-index' : '1'});
														$('#blauw_links_rondje_schaduw').fadeIn(1000);
														$('#overlay_transparant').fadeOut(1);
													}
												);
												
												
												
												
											}
										);
									}
							);
							
							
						
					
					
				}
				);
				$("#sub_menu_blauw_links").dequeue();
				
				//---------add hover class om klik weer mogelijk te maken-------------------//
				$('#blauw_links_hover_id').addClass("hover_blauw_links");
				
				//---------oranje rondje weer terug naar normale start stand-------------------//
				$('#blauw_links').find('.blauw_links_img').stop().animate(
					{
						width: '76px', /* Set new width */
						height: '76px', /* Set new height */
						padding: '0px'
					}, 200);


			}
			

//--------------------------close blauw_rechts overlay--------------------------------------//
function close_overlay_blauw_rechts()
			{
				//$(this).css({'z-index' : '1'}).addClass("hover_oranje"); /*Add a higher z-index value so this image stays on top*/ 
				
				$('#overlay_transparant').css({"filter" : "alpha(opacity=0)", "display" : "block"});
						
							$(".speak").stop().animate(
								{
									top: '-210px'
								}, 100, function() 
									{
										$("#blauw_rechts_inhoud").fadeOut(350, function()
											{
										
												//----------------paper overlay verbergen--------------------//
												$(".paper_overlay").css({'display' : 'none'});
												
												$("#overlay").fadeOut('fast');
												
												$('.hover_blauw_rechts').css({'top' : '0px', 'left' : '0px'});
												
												$('#blauw_rechts_img').addClass("blauw_rechts_img");
												
												$("#blauw_rechts").find('.blauw_rechts_img').stop().animate(
												{
													marginTop: '0px', /* Set alignment back to default */
													marginLeft: '0px',
													top: '0px',
													left: '0px',
													width: '76px', /* Set width back to default */
													height: '75px', /* Set height back to default */
													padding: '0px'
												}, 200, function()
													{
														$("#mouse_move_blauw_rechts").css({'z-index' : '1'});
														$('#blauw_rechts_rondje_schaduw').fadeIn(1000);
														$('#overlay_transparant').fadeOut(1);
													}
												);
												
												
												
												
											}
										);
									}
							);


				
				//---------add hover class om klik weer mogelijk te maken-------------------//
				$('#blauw_rechts_hover_id').addClass("hover_blauw_rechts");
				
				//---------oranje rondje weer terug naar normale start stand-------------------//
				$('#blauw_rechts').find('.blauw_rechts_img').stop().animate(
					{
						width: '76px', /* Set new width */
						height: '76px', /* Set new height */
						padding: '0px'
					}, 200);


			}//-------------einde start website idee, alle rondjes opstarten zit hierin------------//


//--------------------------close blauw_onder overlay--------------------------------------//
function close_overlay_blauw_onder()
			{
				//$(this).css({'z-index' : '1'}).addClass("hover_oranje"); /*Add a higher z-index value so this image stays on top*/ 
				
				$('#overlay_transparant').css({"filter" : "alpha(opacity=0)", "display" : "block"});
				
				$('#blauw_onder_menu_01').stop(true, true).delay(50).hide('slide', {direction: 'up'}, 200);
				$('#blauw_onder_menu_02').stop(true, true).delay(220).hide('slide', {direction: 'up'}, 180, function()
				{
					$(".sub_menu_blauw_onder").css({'display' : 'none'});
						
							$(".speak").stop().animate(
								{
									top: '-210px'
								}, 100, function() 
									{
										$("#blauw_onder_inhoud").fadeOut(350, function()
											{
										
												//----------------paper overlay verbergen--------------------//
												$(".paper_overlay").css({'display' : 'none'});
												
												$("#overlay").fadeOut('fast');
												
												$('.hover_blauw_onder').css({'top' : '0px', 'left' : '0px'});
												
												$('#blauw_onder_img').addClass("blauw_onder_img");
												
												$("#blauw_onder").find('.blauw_onder_img').stop().animate(
												{
													marginTop: '0px', /* Set alignment back to default */
													marginLeft: '0px',
													top: '0px',
													left: '0px',
													width: '76px', /* Set width back to default */
													height: '75px', /* Set height back to default */
													padding: '0px'
												}, 200, function()
													{
														$("#mouse_move_blauw_onder").css({'z-index' : '1'});
														$('#blauw_onder_rondje_schaduw').fadeIn(1000);
														$('#overlay_transparant').fadeOut(1);
													}
												);
												
												
												
												
											}
										);
									}
							);
							
							
						
					
					
				}
				);
				$(".sub_menu_blauw_onder").dequeue();
				
				//---------add hover class om klik weer mogelijk te maken-------------------//
				$('#blauw_onder_hover_id').addClass("hover_blauw_onder");
				
				//---------oranje rondje weer terug naar normale start stand-------------------//
				$('#blauw_onder').find('.blauw_onder_img').stop().animate(
					{
						width: '76px', /* Set new width */
						height: '76px', /* Set new height */
						padding: '0px'
					}, 200);


			}

//-------------------------------einde overlay click close---------------------------------------------------------//

//----------------open oranje voor link om venster te openen----------------------//
function contact_link_speak()
{
	$("#speak_oranje").stop().animate(
															   {
																   top: '-110px'
															   }
															   );
												$(".speak_uitspraak").css({'display' : 'block'});
}

function open_oranje()
{
	$("#overlay").delay(2000).fadeIn(600).css({'z-index' : '3'}).animate({filter: 'alpha(opacity=75)'}, 0, function()
	{
		$('#overlay').addClass('oranje');
			
		$(".hover_oranje").unbind('click.addit');
										
		$('.hover_oranje').stop().css({'top' : '0px', 'left' : '0px'});
		
		$('#oranje_rondje_schaduw').fadeOut(100);
		
		//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
		$('#oranje_hover_id').removeClass("hover_oranje");
																		
		//----------z-index zodat hij boven de rest staat----------------// 
		$('#mouse_move_oranje').css({'z-index' : '10'}); 
		
		//---------rondje groot maken---------------------//
		$('#rondje_oranje').find('.rondje_img').stop().animate(
			{
				marginTop: '-175px', /* The next 4 lines will vertically align this image */ 
				marginLeft: '-450px',
				top: '50%',
				left: '50%',
				width: '547px', /* Set new width */
				height: '544px', /* Set new height */
				padding: '0px'
			}, 200, function()
			{
				
				$('#oranje_img').removeClass("rondje_img");
				
				//--------------grijze overlay starten----------------//
				$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
				$('#overlay').addClass('oranje');
				//set_active('oranje');
				
				//-------------referentie klant laden-----------------//
				$(".speak").css({'top' : '-210px'});
				
				$(".speak").stop().delay(150).animate(
					{
						top: '-190px'
					}
				);
				
				$("#speak_oranje").hover(function()
										   {
											   contact_link_speak();
										   }, function()
										   {
											   $("#speak_oranje").stop().animate(
															   {
																   top: '-190px'
															   },500, function() 
															   {
																   $(".speak_uitspraak").css({'display' : 'none'});
															   }
															   );

										   						if (rndNum == 4)
																{
																	rndNum = 0;
																}
																else
																{
																	rndNum++;
																}
														   }
												  ).find('.speak_text').html(uitspraak[rndNum]);
				
																							
				//----------------paper overlay tonen--------------------//
				$(".paper_overlay").fadeIn('fast');
				
				//-----------content van het rondje laden-----------------//
				$("#rondje_oranje_inhoud").fadeIn('slow', function()
				{
					//------------custom scroll aanpassen aan nieuwe hoogte----------//
					reinitialiseScrollPane();
					
					//----------------ajax form starten--------------------//
					$('#belmij').ajaxContactForm('forms/send_ajaxbelmij.php', 
						{
							extraValues:		{},
							falseFieldFunc:		function(formulier, veld, taal) {
								veld.effect("highlight", {color: '#dd0000'}, 1000);
							},
							falseMessageFunc:	function(formulier, taal) 
							{ 
								alert('Niet alles is correct ingevoerd. Probeert u het nog eens.');
								//$('#error_contact').text('');
								//$('#error_contact').append("Niet alles is correct ingevoerd. Probeert u het nog eens.");
								//$('#error_contact').show("slide");
								//reinitialiseScrollPane();
							},
							errorMessageFunc:	function(formulier, bericht, taal) { 
								alert(bericht); 
							},
							succesMessageFunc:	function(formulier, bericht, taal) { 
								$.fn.ajaxContactForm.clearForm(formulier);
								alert(bericht);
							}
	
						}
					);
					
				
				
					//------------sub-menu items inschuiven-------------//
					$("#sub_menu_oranje").css({'display' : 'block'});
					
						$('#oranje_menu_05').stop(true, true).delay(200).show('slide', {direction: 'up'}, 600);
						$('#oranje_menu_04').stop(true, true).delay(300).show('slide', {direction: 'up'}, 600);
						$('#oranje_menu_03').stop(true, true).delay(450).show('slide', {direction: 'up'}, 600);
						$('#oranje_menu_02').stop(true, true).delay(520).show('slide', {direction: 'up'}, 600);
						$('#oranje_menu_01').stop(true, true).delay(640).show('slide', {direction: 'up'}, 600);
					
					
					
					//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
					$(".show").toggle(function()
											  {
												  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
											  },
									  function()
											  {
												  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
											  }
										
									);
					
					//-------------content van submenu laden op aanvraag----------------//
					function show_oranje_menu_01_content()
						{
							$("#oranje_01_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane();
								}
							);
						}
					
					function show_oranje_menu_02_content()
						{
							$("#oranje_02_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane();
									
									//----------------ajax form starten--------------------//
									$('#belmij').ajaxContactForm('forms/send_ajaxbelmij.php', {});
								}
							);
						}
					
					function show_oranje_menu_03_content()
						{
							$("#maps").fadeIn("fast");
							$("#maps").attr('src', 'maps.php');
	
							$("#oranje_03_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane();
								}
							);
						}
					
					function show_oranje_menu_04_content()
						{
							$("#oranje_04_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane();
								}
							);
						}
					
					//----------------aktie instellen voor klik op submenu---------------//
					$("#oranje_menu_01").click(function()
						{
							function oranje_content1()
							{
								$("#maps").fadeOut("fast");
								$("#oranje_03_content").fadeOut("fast");
								$("#oranje_04_content").fadeOut("fast");
								$("#oranje_02_content").fadeOut("fast", show_oranje_menu_01_content);
							}
							oranje_content1();
						}
					);
					
					$("#oranje_menu_02").click(function()
						{
							$("#maps").fadeOut("fast");
							$("#oranje_03_content").fadeOut("fast");
							$("#oranje_04_content").fadeOut("fast");
							$("#oranje_01_content").fadeOut("fast", show_oranje_menu_02_content);
						}
					);
					
					$("#oranje_menu_03").click(function()
						{
							$("#oranje_01_content").fadeOut("fast");
							$("#oranje_02_content").fadeOut("fast");
							$("#oranje_04_content").fadeOut("fast", show_oranje_menu_03_content);
						}
					);
					
					$("#oranje_menu_04").click(function()
						{
							$("#maps").fadeOut("fast");
							$("#oranje_01_content").fadeOut("fast");
							$("#oranje_02_content").fadeOut("fast");
							$("#oranje_03_content").fadeOut("fast", show_oranje_menu_04_content);
						}
					);
					
				}
				);
			}
			);	
	});
	
}
//-----------------------einde oranje open via link--------------------//

//---------------------contact formulier openen-----------------------//
function oranje_content1()
{
	$("#oranje_01_content").fadeIn("fast", function()
	{
		$("#maps").fadeOut("fast");
		$("#oranje_03_content").fadeOut("fast");
		$("#oranje_04_content").fadeOut("fast");
		$("#oranje_02_content").fadeOut("fast", function()
		{
			reinitialiseScrollPane();
		}
		);
	}
	);
}
//----------------------einde contactformulier openen----------------------//


//--------------------portfolio openen--------------------------------//
function open_portfolio()
{
	$("#overlay").delay(2000).fadeIn(600).css({'z-index' : '3'}).animate({filter: 'alpha(opacity=75)'}, 0, function()
	{
		$('#overlay').addClass('blauw_top');
			
		$(".hover_blauw_top").unbind('click.addit');
								
		$('.hover_blauw_top').stop().css({'top' : '0px', 'left' : '0px'});
		
		$('#blauw_top_rondje_schaduw').fadeOut(100);
		
		//---------remove hover class om klik herhaling animatie te voorkomen-------------------//
		$('#blauw_top_hover_id').removeClass("hover_blauw_top");
																		
		//----------z-index zodat hij boven de rest staat----------------// 
		$('#mouse_move_blauw_top').css({'z-index' : '10'}); 
		
		//---------rondje groot maken---------------------//
		$('#blauw_top').find('.blauw_top_img').stop().animate(
			{
				marginTop: '-88px', /* The next 4 lines will vertically align this image */ 
				marginLeft: '-105px',
				top: '50%',
				left: '50%',
				width: '547px', /* Set new width */
				height: '544px', /* Set new height */
				padding: '0px'
			}, 200, function()
			{
				
				$('#blauw_top_img').removeClass("blauw_top_img");
				
				//--------------grijze overlay starten----------------//
				$("#overlay").fadeIn(600).animate({filter: 'alpha(opacity=75)'}, 0).css({'z-index' : '3'});
				$('#overlay').addClass('blauw_top');
				//set_active('oranje');
				
				//-------------referentie klant laden-----------------//
				$(".speak").css({'top' : '-210px'});
				
				$(".speak").stop().delay(150).animate(
					{
						top: '-190px'
					}
				);
				
				$("#speak_blauw_top").hover(function()
										   {
											   $("#speak_blauw_top").stop().animate(
															   {
																   top: '-110px'
															   }
															   );
												$(".speak_uitspraak").css({'display' : 'block'});
										   }, function()
										   {
											   $("#speak_blauw_top").stop().animate(
															   {
																   top: '-190px'
															   },500, function() 
															   {
																   $(".speak_uitspraak").css({'display' : 'none'});
															   }
															   );
										   						if (rndNum == 4)
																{
																	rndNum = 0;
																}
																else
																{
																	rndNum++;
																}
														   }
												  ).find('.speak_text').html(uitspraak[rndNum]);
				
																							
				
				//------------inhoud verbergen zodat die pas na ballen animatie tevoorschijn komt----------//
				$('#paper_overlay_portfolio').css({'display' : 'block'});
				
					//-----------content van het rondje laden-----------------//
					$("#blauw_top_inhoud").fadeIn('slow', function()
					{
						//------------custom scroll aanpassen aan nieuwe hoogte----------//
						reinitialiseScrollPane_portf();
						
						//----------------paper overlay tonen--------------------//
						$(".paper_overlay").css({'display' : 'block'});
						
						//------------inhoud content_01 verbergen voor eerste keer laden----------//
						$('#blauw_top_01_content').removeClass('hidden');
						
						//------------sub-menu items inschuiven-------------//
						$("#portf_menu_blauw_top").css({'display' : 'block'});
						
							$('#blauw_portf_menu_01').css({"margin": "0px 200px 0px 200px"});
							$('#blauw_portf_menu_02').css({"margin": "0px 200px 0px 200px"});
							$('#blauw_portf_menu_03').css({"margin": "0px 200px 0px 200px"});
							$('#blauw_portf_menu_04').css({"margin": "0px 200px 0px 200px"});
							
							$('#blauw_portf_menu_04').stop(true, true).delay(300).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1300, function()
							{
								$('#paper_overlay_portfolio').fadeOut(800);
							});
							$('#blauw_portf_menu_03').stop(true, true).delay(450).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1400);
							$('#blauw_portf_menu_02').stop(true, true).delay(520).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1250);
							$('#blauw_portf_menu_01').stop(true, true).delay(640).show('slide', {direction: 'right', easing: 'easeOutElastic'}, 1475);
						
					
					
					//-------------toggle functie voor menu-items in de content, daarna aanpassen custom scroll hoogte--------//
					$(".show").toggle(function()
											  {
												  $(this).next(".hidden").show("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
											  },
									  function()
											  {
												  $(this).next(".hidden").hide("slide", {direction: 'up'}, 300, reinitialiseScrollPane_resize);
											  }
										
									);
					
					//-------------content van submenu laden op aanvraag----------------//
					function show_blauw_top_menu_01_content()
						{
							$("#blauw_top_01_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane_portf();
								}
							);
						}
					
					function show_blauw_top_menu_02_content()
						{
							$("#blauw_top_02_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane_portf();
								}
							);
						}
					
					function show_blauw_top_menu_03_content()
						{
							$("#blauw_top_03_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane_portf();
								}
							);
						}
					
					function show_blauw_top_menu_04_content()
						{
							$("#blauw_top_04_content").fadeIn("fast", function()
								{
									reinitialiseScrollPane_portf();
								}
							);
						}
						
					//-----------------instellen hover achtergrond-----------------------//
					
					$("#blauw_portf_menu_01").hover(function() 
					{
						$(this).stop(true, true).animate({left: '-198px', easing: 'easeInOutBack'});
						
						var portf_active = $(this);

						if (portf_active.hasClass("portf_inactive")) 
						{
							$(this).addClass("portf_hover");
						}
					}, 
						function()
						{
							$(this).stop(true, true).animate({left: '-205px', easing: 'easeInOutBack'});
							
							$(this).removeClass("portf_hover");
						}
					);
					
					
					$("#blauw_portf_menu_02").hover(function() 
					{
						$(this).stop(true, true).animate({left: '-215px', easing: 'easeInOutBack'});
						
						var portf_active = $(this);

						if (portf_active.hasClass("portf_inactive")) 
						{
							$(this).addClass("portf_hover");
						}
					}, 
						function()
						{
							$(this).stop(true, true).animate({left: '-222px', easing: 'easeInOutBack'});
							
							$(this).removeClass("portf_hover");
						}
					);
					
					
					$("#blauw_portf_menu_03").hover(function() 
					{
						$(this).stop(true, true).animate({left: '-193px', easing: 'easeInOutBack'});
						
						var portf_active = $(this);

						if (portf_active.hasClass("portf_inactive")) 
						{
							$(this).addClass("portf_hover");
						}
					}, 
						function()
						{
							$(this).stop(true, true).animate({left: '-200px', easing: 'easeInOutBack'});
							
							$(this).removeClass("portf_hover");
						}
					);
					
					
					$("#blauw_portf_menu_04").hover(function() 
					{
						$(this).stop(true, true).animate({left: '-130px', easing: 'easeInOutBack'});
						
						var portf_active = $(this);

						if (portf_active.hasClass("portf_inactive")) 
						{
							$(this).addClass("portf_hover");
						}
					}, 
						function()
						{
							$(this).stop(true, true).animate({left: '-137px', easing: 'easeInOutBack'});
							
							$(this).removeClass("portf_hover");
						}
					);
					
					
					
					//----------------aktie instellen voor klik op submenu---------------//
					$("#blauw_portf_menu_01").click(function()
						{
							var portf_check1 = $("#blauw_portf_menu_01");
							var portf_check2 = $("#blauw_portf_menu_02");
							var portf_check3 = $("#blauw_portf_menu_03");
							var portf_check4 = $("#blauw_portf_menu_04");
							
							if (portf_check1.hasClass("portf_inactive"))
							{
								$("#blauw_portf_menu_01").removeClass("portf_inactive");
								$("#blauw_portf_menu_01").addClass("portf_active");
							}
							
							if (portf_check2.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_02").removeClass("portf_active");
								$("#blauw_portf_menu_02").addClass("portf_inactive");
							}
							
							if (portf_check3.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_03").removeClass("portf_active");
								$("#blauw_portf_menu_03").addClass("portf_inactive");
							}
							
							if (portf_check4.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_04").removeClass("portf_active");
								$("#blauw_portf_menu_04").addClass("portf_inactive");
							}
							
							$("#blauw_top_03_content").fadeOut("fast");
							$("#blauw_top_04_content").fadeOut("fast");
							$("#blauw_top_02_content").fadeOut("fast", show_blauw_top_menu_01_content);
						}
					);
					
					$("#blauw_portf_menu_02").click(function()
						{
							var portf_check1 = $("#blauw_portf_menu_01");
							var portf_check2 = $("#blauw_portf_menu_02");
							var portf_check3 = $("#blauw_portf_menu_03");
							var portf_check4 = $("#blauw_portf_menu_04");
							
							if (portf_check1.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_01").removeClass("portf_active");
								$("#blauw_portf_menu_01").addClass("portf_inactive");
							}
							
							if (portf_check2.hasClass("portf_inactive"))
							{
								$("#blauw_portf_menu_02").removeClass("portf_inactive");
								$("#blauw_portf_menu_02").addClass("portf_active");
							}
							
							if (portf_check3.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_03").removeClass("portf_active");
								$("#blauw_portf_menu_03").addClass("portf_inactive");
							}
							
							if (portf_check4.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_04").removeClass("portf_active");
								$("#blauw_portf_menu_04").addClass("portf_inactive");
							}
							
							$("#blauw_top_03_content").fadeOut("fast");
							$("#blauw_top_04_content").fadeOut("fast");
							$("#blauw_top_01_content").fadeOut("fast", show_blauw_top_menu_02_content);
						}
					);
					
					$("#blauw_portf_menu_03").click(function()
						{
							var portf_check1 = $("#blauw_portf_menu_01");
							var portf_check2 = $("#blauw_portf_menu_02");
							var portf_check3 = $("#blauw_portf_menu_03");
							var portf_check4 = $("#blauw_portf_menu_04");
							
							if (portf_check1.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_01").removeClass("portf_active");
								$("#blauw_portf_menu_01").addClass("portf_inactive");
							}
							
							if (portf_check2.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_02").removeClass("portf_active");
								$("#blauw_portf_menu_02").addClass("portf_inactive");
							}
							
							if (portf_check3.hasClass("portf_inactive"))
							{
								$("#blauw_portf_menu_03").removeClass("portf_inactive");
								$("#blauw_portf_menu_03").addClass("portf_active");
							}
							
							if (portf_check4.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_04").removeClass("portf_active");
								$("#blauw_portf_menu_04").addClass("portf_inactive");
							}
							
							$("#blauw_top_01_content").fadeOut("fast");
							$("#blauw_top_02_content").fadeOut("fast");
							$("#blauw_top_04_content").fadeOut("fast", show_blauw_top_menu_03_content);
						}
					);
					
					$("#blauw_portf_menu_04").click(function()
						{
							var portf_check1 = $("#blauw_portf_menu_01");
							var portf_check2 = $("#blauw_portf_menu_02");
							var portf_check3 = $("#blauw_portf_menu_03");
							var portf_check4 = $("#blauw_portf_menu_04");
							
							if (portf_check1.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_01").removeClass("portf_active");
								$("#blauw_portf_menu_01").addClass("portf_inactive");
							}
							
							if (portf_check2.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_02").removeClass("portf_active");
								$("#blauw_portf_menu_02").addClass("portf_inactive");
							}
							
							if (portf_check3.hasClass("portf_active"))
							{
								$("#blauw_portf_menu_03").removeClass("portf_active");
								$("#blauw_portf_menu_03").addClass("portf_inactive");
							}
							
							if (portf_check4.hasClass("portf_inactive"))
							{
								$("#blauw_portf_menu_04").removeClass("portf_inactive");
								$("#blauw_portf_menu_04").addClass("portf_active");
							}
							
							$("#blauw_top_01_content").fadeOut("fast");
							$("#blauw_top_02_content").fadeOut("fast");
							$("#blauw_top_03_content").fadeOut("fast", show_blauw_top_menu_04_content);
						}
					);
					
				}
				);
			}
			);
	} 
	);
}


});
