// Javascripts - JQuery

$(document).ready(function() {

	$('#mainContent').jScrollPane({dragMaxHeight:20, dragMinHeight:15,  scrollbarWidth: 17, topCapHeight: 10});	

	$('a.vraag_antwoord').click( function(e) {
		e.preventDefault();
		$('.faq_answer').toggleClass('faq');
	});
	
	$('#inlogform a').click( function(e) {
		e.preventDefault();
		if($('#inlogvalue').val()=='') {
			alert('U vergeet een wachtwoord in te vullen');
			return false;
		}else{
			$('#inlogform').submit();
		}
	});
	
	$('ul.lijst  li:even').css(
		{'background-color': '#fcf3f4'}
	);	

	//create scroller for each element with "horizontal_scroller" class...
	$('.horizontal_scroller').SetScroller({	velocity: 	 70,
											direction: 	 'horizontal',
											startfrom: 	 'right',
											loop:		 'infinite',
											movetype: 	 'linear',
											onmouseover: 'play',
											onmouseout:  'play',
											onstartup: 	 'play',
											cursor: 	 'pointer'
										});

});

function goSearch(){
  var f = document.getElementById('zoekform');
  var val = document.getElementById('zoekterm');
  if (f && val) {
    if (val.value != 'uw zoekterm...' &&
         val.value != '') {
        f.submit();
    }
  }
}


function focusZoek(state) {
	var f = document.getElementById('zoekform');
	var val = document.getElementById('zoekterm');
	if (f && val) {
		if (state) { 
			if (val.value == 'uw zoekterm...') {
				val.value = '';
				val.style.color = '#7a7a7a';
			}
		} else {
			if (val.value == '') {
				val.value = 'uw zoekterm...';
				val.style.color = '#7a7a7a';
			}
		}
	}
}



