function clearName(e){
		if(e.value=='gebruikersnaam'){
			e.value='';
			e.style.color='#333333';
		}
}

function fillName(e){
		if(e.value==''){
			e.value='gebruikersnaam';
			e.style.color='#999999';
		}
}

function clearPassword(e){
		if(e.value=='wachtwoord'){
			e.type='password';
			e.value='';
			e.style.color='#333333';
		}
}

function fillPassword(e){
		if(e.value==''){
			e.type='text';
			e.value='wachtwoord';
			e.style.color='#999999';
		}
}

function clearText(e){
		if(e.value==e.id){
			e.value='';
			e.style.color='#333333';
		}
}

function fillText(e){
		if(e.value==''){
			e.value=e.id;
			e.style.color='#999999';
		}
}




//////////////

$(document).ready(  
	function() {
		$sum = 0;
		$('#slides li img').each(function()
		{
		$sum += $(this).width();
		});
		$('#slides ul').css('width', $sum);
		
		var item_width = $('#slides li').outerWidth(); 
		var left_value = item_width * (-1); 
		
		//rotation speed and timer
		function rotate(){
		$('#slides ul').animate({'left' : left_value}, 3000, 'linear', function () {
				
				$('#slides li:last').after($('#slides li:first'));
				$('#slides ul').css('left', -1);
				
				rotate();
			});
		}
		rotate();
			
	
	
	// trigger the function when clicking on an assigned element
    $(".toggle").click(function () {
        // check the visibility of the next element in the DOM
        if ($(this).next().is(":hidden")) {
            $(this).next().slideDown("slow"); // slide it down
			if ($(this).text()=='meer...') {
				$(this).text('verberg...');
			}
        } else {
            $(this).next().slideUp("slow"); // hide it
			if ($(this).text()=='verberg...') {
				$(this).text('meer...');
			}
        }
    });
	
	// trigger the function when clicking on an assigned element
    $(".toggleParent").click(function () {
            $(this).parent().slideUp("slow"); // hide it
    });
	
	// trigger the function when clicking on an assigned element
    
	
		// roundCorners in boxTitle class
    $(".boxTitle").corner("top 10px"); 
	$(".rounded").corner("10px"); 
	$(".roundedTopLeft").corner("10px tl"); 
	$(".roundedTopRight").corner("10px tr"); 
	$(".btn").corner("5px");

	$(".sub_menu").parent().addClass("dropdownIcon");
	
   	//$(".text01 a").addClass("link");
	//$("#content a").addClass("link");
	//$('#content a.anchor').removeClass('link');
	
	$(".text01 a[href$='.pdf']").addClass("linkpdf");
	$("#content a[href$='.pdf']").addClass("linkpdf");
		
	$("a[href^='mailto:']").addClass("linkemail");
	
	
	


	//Add external link icon to external links - 
	
	//You might also want to set the _target attribute to blank
	
	$('#content a').filter(function() {
		//Compare the anchor tag's host name with location's host name
	    return this.hostname && this.hostname !== location.hostname;
	  }).addClass("linkext").attr("target", "_blank");
	

   $(".toggleNext").click(function () {
        // check the visibility of the next element in the DOM
        if ($(this).parent().next('.hiddenText').is(":hidden")) {
            $(this).parent().next('.hiddenText').slideDown("fast"); // slide it down
			$(this).css("background-image", "url(/images/linkminus.ico)");
			
        } else {
            $(this).parent().next().slideUp("fast"); // hide it
			$(this).css("background-image", "url(/images/linkplus.ico)");
        }
    });
   
   $(".expandTitle").click(function () {
        // check the visibility of the next element in the DOM
        if ($(this).next('.hiddenText').is(":hidden")) {
            $(this).next('.hiddenText').slideDown("fast"); // slide it down
			$(this).css("background-image", "url(/images/linkminus.ico)");
			
        } else {
            $(this).next().slideUp("fast"); // hide it
			$(this).css("background-image", "url(/images/linkplus.ico)");
        }
    });
	
	
	
   $(function(){
   var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1,location.pathname.length);
   if ( filename )
     $('.dropdown li a[href$="' + filename + '"]').parent().attr('class', 'selected');
   });
   
   
    
	$("#wrapper").append("<div class='clearAll'></div>");
	
	
	$(".hiddenText:eq("+unhide+")").css('display', 'block');
	
	
	$("a[title]").tooltip();
	
});
      
	  
	  
	  
function nextConsultant(){
	$('#consultantCont').animate({'left' : -220}, 500, 'linear', function () {
			
				$('#consultantCont .consultantSlide:last').after($('#consultantCont .consultantSlide:first'));
				$('#consultantCont').css('left', 0);
											
	});
	
}   

function prevConsultant(){
	$('#consultantCont .consultantSlide:first').before($('#consultantCont .consultantSlide:last'));
	$('#consultantCont').css('left', -220);	
	$('#consultantCont').animate({'left' : 0}, 500, 'linear', function () {
			
				
			
								
	});
	
} 
