$(function() 
		{
			$("#faq").children().each(function()
			{
				$(this).children("h2").each(function()
				{
					$(this).click(function()
					{
						
						$(".question_open").not("h2").not("p").each(function(){
												
						$(this).slideUp(500, 
								function() 
								{
									// Animation complete.
									$(this).parent().each(function()
									{
										$(this).children().each(function()
										{
											$(this).removeClass("question_open").addClass("question");
											$(this).children().each(function()
											{
												$(this).removeClass("question_open").addClass("question");
											}
											);
										}
										);
									}
									);

									
								}
								);
						});
						
						
						
						$(this).parent().each(function()
						{
							$(this).children().not("h2").each(function()
							{
								//openen
								if($(this).is(":hidden")) 
								{
									$(this).slideDown(500);
									// Animation complete.
									$(this).parent().each(function()
									{
										$(this).children().each(function()
										{
											$(this).removeClass("question").addClass("question_open");
											$(this).children().each(function()
											{
												$(this).removeClass("question").addClass("question_open");
											});
										});
									});
								}
								else
								{
									$(this).slideUp(700, 
									function() 
									{
										// Animation complete.
										$(this).parent().each(function()
										{
											$(this).children().each(function()
											{
										   		$(this).removeClass("question_open").addClass("question");
												$(this).children().each(function()
												{
													$(this).removeClass("question_open").addClass("question");
												});
											});
										});
										
									});
								}
							});
						});
						
						/*if($("#faq div div").hasClass("question")) 
						{
						   $("#faq div").children().each(function()
						   {
							   $(this).switchClass('question', 'question_open', 700);
						   });
						}
						else
						{
							$("#faq div").children().each(function()
							{
							   $(this).switchClass('question_open', 'question', 700);
							});
						}			
						return false;*/
					});
				});
			});

			
			/*
			$("#faq").accordion(
			{ 
				header: 'h2', 
				collapsible: true, 
				active: false,
				clearStyle: true, 
				autoHeight: false
			});
			 
			$("#faq").children().each(
			function()
			{
				//Voor alle h2 in iedere div
				$(this).children("h2").each(function()
				{
					//De click functie
					$(this).click(function()
					{				
						$(this).parent().each(function()
						{
							$(this).children().each(function()
							{
								if($(this).hasClass("question"))
								{
									$(this).removeClass("question").addClass("question_open");
									$(this).children().each(function()
									{
										$(this).removeClass("question").addClass("question_open");
									});
								}
								else
								{
									$(this).removeClass("question_open").addClass("question");
									$(this).children().each(function()
									{
										$(this).removeClass("question_open").addClass("question");
									});
								}
							});
						});

					});
				});
			});*/
		});
