
	function slideSwitch() 
		{
				var $active = $('#piccontainer DIV.active');
			 
				if ( $active.length == 0 ) $active = $('#piccontainer DIV:last');
			 
				// use this to pull the divs in the order they appear in the markup
				var $next =  $active.next().length ? $active.next()
					: $('#piccontainer DIV:first');
			 
				// uncomment below to pull the divs randomly
				// var $sibs  = $active.siblings();
				// var rndNum = Math.floor(Math.random() * $sibs.length );
				// var $next  = $( $sibs[ rndNum ] );
			 
			 
				$active.addClass('last-active');
			 
				$next.css({opacity: 0.0})
					.addClass('active')
					.animate({opacity: 1.0}, 1000, function() {
						$active.removeClass('active last-active');
					});
			
		}
		
	function toggleBgColor( elem )
		{
		var style2 = elem.style;
		style2.backgroundColor = style2.backgroundColor? "":"#F6F6F6";
		} 
		
	function toggleStyle(elem)
		{
		elem.className = (elem.className == "invultabel3")?"invultabel2":"invultabel3";
		}
		
	function swapStyle(elem)
		{
		if (elem.className != "invultabel3")
			{
			elem.className = (elem.className == "invultabel")?"invultabel2":"invultabel";
			}
		}

		
$(function(){
	jQuery('#list1b').accordion({
		autoheight: false,
		header: '.menuheader',
		active: '.selected',
		navigation: true
	});
	
	var accordions = jQuery('#list1b');
	
	jQuery('#switch select').change(function() {
		accordions.accordion("activate", this.selectedIndex-1 );
	});
	jQuery('#close').click(function() {
		accordions.accordion("activate", -1);
	});
	jQuery('#switch2').change(function() {
		accordions.accordion("activate", this.value);
	});
	jQuery('#enable').click(function() {
		accordions.accordion("enable");
	});
	jQuery('#disable').click(function() {
		accordions.accordion("disable");
	});
	jQuery('#remove').click(function() {
		accordions.accordion("destroy");
		wizardButtons.unbind("click");
	});
});
$(document).ready(function(){
	setInterval( "slideSwitch()", 3000 );
	// simple accordion
});
	
function setiframesrc(url)
	{
	//alert(url);
	document.getElementById("iframedocument").src = url;
	}




$(document).ready(function(){
  
   
   $('.showKnop').click(function() {
	   $('#inhoudsopgave').slideToggle('slow', function()
			{
			$(".showKnop").attr('value',($('#inhoudsopgave').is(':visible') ? "Inhoudsopgave verbergen" : "Inhoudsopgave bekijken"));	
			});
   });
});



var aryClassElements = new Array();
// functie om alle items van de FAQ op te zoeken
function getElementsByClassName( strClassName, obj ) {
    if ( obj.className == strClassName ) {
        aryClassElements[aryClassElements.length] = obj;
    }
    for ( var i = 0; i < obj.childNodes.length; i++ )
        getElementsByClassName( strClassName, obj.childNodes[i] );
}
 
 
function showlayer(layer){ 
 
aryClassElements.length = 0;
getElementsByClassName( 'FAQsub', document.body );
 
// alle items op display none zetten
for ( var i = 0; i < aryClassElements.length; i++ ) 
	{
	aryClassElements[i].style.display = 'none';
	}
 
// het juiste item weergeven
document.getElementById(layer).style.display="block"; 


} 

function showalllayers()
	{
	getElementsByClassName( 'FAQsub', document.body );
 
	// alle items op display none zetten
	for ( var i = 0; i < aryClassElements.length; i++ ) 
		{
		aryClassElements[i].style.display = 'block';
		}
	}



$(document).ready(function() {
 
	//Select all anchor tag with rel set to tooltip
	$('a[rel=tooltip]').mouseover(function(e) {
		
		
		//Grab the title attribute's value and assign it to a variable
		var tip = $(this).attr('title');	
		
		//Remove the title attribute's to avoid the native tooltip from the browser
		$(this).attr('title','');
		
		//Append the tooltip template and its value
		$(this).append('<div id="tooltip"><div class="tipHeader"></div><div class="tipBody">' + tip + '</div><div class="tipFooter"></div></div>');		
				
		//Show the tooltip with faceIn effect
		$('#tooltip').fadeIn('500');
		$('#tooltip').fadeTo('10',0.9);
		
		
	}).mousemove(function(e) {
	
		//Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
		$('#tooltip').css('top', e.pageY + 10 );
		$('#tooltip').css('left', e.pageX + 20 );
		
	}).mouseout(function() {
	
		//Put back the title attribute's value
		$(this).attr('title',$('.tipBody').html());
	
		//Remove the appended tooltip template
		$(this).children('div#tooltip').remove();
		
	});
 
});
