/***********************************/
/************             **********/
/*  LETOP: EEN KOPIE VAN DEZE JS   */
/*    DRAAIT  BIJ JOBS REPLUBIC    */
/*      AANPASSINGEN MELDEN        */
/************             **********/
/***********************************/



$(function(){
	$('#nav>ul>li').hover(function(){
		$heading = $(this);
		if ($heading.siblings().find('ul:visible').size()>0)
			$heading.find('ul').hide();
		else
			$heading.find('ul').show();
	},
	function(){
		$(this).find('ul').hide();
	});
	/*$('.vacatureinkolom').hover(
		function(){
			$(this).css('background-color','#DBE5ED');
			$('div',this).slideDown();
		},
		function() {
			$(this).css('background-color','');
			$('div',this).hide();
		}
	);*/
	$('.vacatureinlijst').hover(
		function(){
			$(this).css('background-color','#DBE5ED');
			$('div.uitklapdiv',this).slideDown();
		},
		function() {
			$(this).css('background-color','');
			$('div.uitklapdiv',this).hide();
		}
	);
});

jQuery.fn.clearonfocus = function() {
	jQuery(this)
	.bind('focus', function() {
		// Set the default value if it isn't set
		if ( !this.defaultValue ) this.defaultValue = this.value;
		// Check to see if the value is different
		if ( this.defaultValue && this.defaultValue != this.value ) return;
		// It isn't, so remove the text from the input
		this.value = '';
	})
	.bind('blur', function() {
	// If the value is blank, return it to the defaultValue
	if ( this.value.match(/^\s*$/) )
		this.value = this.defaultValue;
	});
};
