<!-- scripts.js -->

jQuery(document).ready(function()
{
	// Homepage slide
	$(".slide").each(function () 
	{
    	var $this = jQuery(this);
    	var open = 0;

		//jQuery(".info").hide();

    	jQuery(".header-image", $this).stop().mouseenter(function () 
    	{
    		if(open == 0)
    		{
    			open = 1;
    			
				jQuery(".info", $this).animate({top: '-=295'}, 500, function() {}).delay(800);
    		}
    		
    	});
    	jQuery(".info", $this).stop().mouseenter(function () 
    	{
    		if(open == 0)
    		{
    			open = 1;
    			
				jQuery(".info", $this).animate({top: '-=295'}, 500, function() {}).delay(800);
    		}
    		
    	});
    	$this.mouseleave(function () 
    	{
    		if(open == 1)
    		{
    			open = 0;
       			jQuery(".info", $this).animate({top: '+=295'}, 500, function() {});
    		}
    		
        });
	});
	
	//Contact Form
	$('.blok input').keypress(function () {
		$(this).prev().animate({ fontSize: 1, opacity: 0 }, 'fast');
	}).blur(function () {
		var $this = $(this);
	  	if (!$this.val()) {
	    	$this.prev().animate({ fontSize: $this.css('font-size'), opacity: 1 }, 'fast');
	  	}
	});
	
});

function checkSearchBox()
{
	if($('#searchstring').val() == "vul hier uw zoekterm in..." || $('#searchstring').val() == "Search on edha...")
	{
		$('#searchstring').val('');
	}
}
