/* TABSLIDE FUNCTIE */
		$(function() {


//                $('#tabs').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' });
                $('#tabs').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' });
				
				
          

            });		
/* TABSLIDE FUNCTIE EINDE */

 
/* FORMULIER VALIDATIE */
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' moet een e-mail adres bevatten.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' moet een nummer bevatten.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' moet een nummer bevatten tussen '+min+' en '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is vereist.\n'; }
    } if (errors) alert('De volgende fouten zijn opgetreden:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
/* FORMULIER VALIDATIE EINDE */


/* REFERENTIE SLIDE */	
		$(document).ready(function(){
		
			$("#referentie2-button").css({
				opacity: 0.9
			});
			$("#referentie3-button").css({
				opacity: 0.9
			});
			$("#referentie4-button").css({
				opacity: 0.9
			});
			$("#referentie5-button").css({
				opacity: 0.9
			});
		
			$("#referentie-content div.button").click(function(){
				
				$clicked = $(this);
				// if the button is not already "transformed" AND is not animated
				if ($clicked.css("opacity") != "1" && $clicked.is(":not(animated)")) {
					
					$clicked.animate({
						opacity: 1
					}, 500 ); 
					
					var idToLoad = $clicked.attr("id").split('-');
					divtofade = $("#referentie-content div:visible.referentie");
					thediv = divtofade.attr("id");
					//we search trough the content for the visible div and we fade it out
					$("#"+thediv).fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						$(this).parent().find("#"+idToLoad[0]).fadeIn();
					})/**/
				}
				
				//we reset the other buttons to default style
				$clicked.siblings(".button").animate({
					opacity: 0.9
				}, 500 );
			});
		});
		
/* REFERENTIE SLIDE EINDE */	
		

