	$(document).ready(function(event)
	{
		/*$('div.message').oneTime(3000,function ()
		{
			$(this).hide(500);
		});*/
	
		$('.options').hide();
		
		$('.options').bind('mousedown',function(event)
		{
			event.stopPropagation();
		});
		
		var updateTime = function ()
		{
			var date = new Date();
			
			hours = date.getHours();
			hours = hours < 10 ? '0'+hours : ''+hours;
			
			minutes = date.getMinutes();
			minutes = minutes < 10 ? '0'+minutes : ''+minutes;
			
			$('#time').html( hours + ':' + minutes );
		}
		
		$('#time').everyTime(30*1000,updateTime);
		updateTime();
		
		$('.showoptions').click(function(event)
		{
			event.preventDefault();
			
			var offset = $(this).position();
			var target = $( $(this).attr('href') );
			
			target.css({
				'left':		offset.left - 1,
				'top':		offset.top + 21
			}).show(200);
			
			$('body').one('mousedown',function(event)
			{
				target.hide(200);
			});
		});
	
		
		$('a.lightbox').lightBox({
			txtImage: 'Afbeelding',
			txtOf: '/',
			imageLoading: '/images/lightbox-ico-loading.gif',
			imageBtnClose: '/images/lightbox-btn-close.gif',
			imageBtnPrev: '/images/lightbox-btn-prev.gif',
			imageBtnNext: '/images/lightbox-btn-next.gif',
			imageBlank: '/images/lightbox-blank.gif',
		});
		
		if ( $('#search').val() == '' ) 
		{
			$('#search').val(msg_empty_search);
		}
		else
		{
			$('#search').addClass('focus');
		}
		
		$('#search').focus(function(event)
		{
			if ( $('#search').val() == msg_empty_search )
			{
			 	$('#search').val('');
				$('#search').addClass('focus');
			}
		});
		
		$('#search').blur(function(event)
		{
			if ( $('#search').val() == '' )
			{
				$('#search').removeClass('focus');
				$('#search').val(msg_empty_search);
			}
		});
		
		return;
	});
