$(document).ready(function()
{
	var option = 
	{
		x:      1, 
		y:      1, 
		radius: 0,
		color:  "#2c2c2c"
	}

	$(".quote").textShadow(option);
	$(".schrijver").textShadow(option);
	
   $('#menu img.test').each( function()
    {
		var strHref = window.location.href;	
		if( $(this).attr('id') != '' && strHref.indexOf( $(this).attr('id') ) != -1 )
		  $(this).attr('src', url+'static/img/' + $(this).attr('id') + '_active.jpg')	
   }).css('cursor','pointer').css('border','0').mouseover(
   function()
   {
		if( $(this).attr('id') != '' )							  
	   		$(this).attr('src', url+'static/img/' + $(this).attr('id') + '_active.jpg');
   	}).mouseout(
	function()
	{
	   var strHref = window.location.href;
		if( $(this).attr('id') != '' && strHref.indexOf( $(this).attr('id') ) == -1 )							  
	   		$(this).attr('src', url+'static/img/' + $(this).attr('id') + '.jpg');				
	});
   
	$('#inschrijfsubmit').click(function(){
		//$('#inschrijfsubmit').attr('disabled', 'disabled').css('opacity', 0.3);
		$('.verzendenmelding').show();
	});
   
      //onclick empty textfield
      $('.emptytextbox').bind("focus blur",function(event){ 
      if (this.defaultValue == this.value) this.value = '';
            else if (this.value == '') this.value = this.defaultValue;                                                                       
      });   


	//Home page arrow on blocks
	$('#blocks img.home_block').each( function()
    {
		
	var strHref = window.location.href;	
	if( $(this).attr('id') != '' && strHref.indexOf( $(this).attr('id') ) != -1 )
	  $(this).attr('src', url+'static/img/button_' + $(this).attr('id') + '_active.jpg')	
	}).css('cursor','pointer').css('border','0').mouseover(
	function()
	{
		if( $(this).attr('id') != '' )							  
			$(this).attr('src', url+'static/img/button_' + $(this).attr('id') + '_active.jpg');
	}).mouseout(
	function()
	{
	   var strHref = window.location.href;
		if( $(this).attr('id') != '' && strHref.indexOf( $(this).attr('id') ) == -1 )							  
			$(this).attr('src', url+'static/img/button_' + $(this).attr('id') + '.jpg');				
	});
	
	
	//Top menu slide down animatie
	$('#sddm li').mouseover(function()
	{
		var id = parseInt($(this).attr("id").substring(2));

		if ($('#m' + id).is(":hidden"))
		{
			$('#m' + id).slideDown(250);
		}
	});
	
	$('#sddm li').mouseleave(function()
	{
		var id = parseInt($(this).attr("id").substring(2));

		$('#m' + id).hide();	
	});
	
});
