$(function(){
	$('#menu>ul>li').hover(function(){
		$('#submenu>ul').hide();
		nummer = $(this).attr('id').substring(10);
		$('#subnavul'+nummer).show();
	});
	$('#menus').hover(
		null,function(){
		$('#submenu>ul:not(.huidigesubmenuul)').hide();
		$('#submenu>ul.huidigesubmenuul').show();
	})
	$('#submenu ul').hover(function(){
			nummer = $(this).attr('id').substring(8);
			$('#hoofdnavli'+nummer).addClass('hover');
		},
		function(){
			nummer = $(this).attr('id').substring(8);
			$('#hoofdnavli'+nummer).removeClass('hover');
	});
	$('.vacatureinlijst').live('mouseover',
		function(){
			$(this).css('background-color','#DBE5ED');
			$(this).css('background-position','460px 50%');
			$('div.uitklapdiv',this).show();
		}
	);
	$('.vacatureinlijst').live('mouseout',
		function() {
			$(this).css('background-color','');
			$(this).css('background-position','1000px 50%');
			$('div.uitklapdiv',this).hide();
		}
	);
	$('.paginglink').before(' [').after('] ');
	/*$('.vacatureinlijst').hover(
		function(){
			$(this).css('background-color','#DBE5ED');
			$('div.uitklapdiv',this).show();
		},
		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;
	});
};

