function input_value(el){
    var old_value= $(el).val();
    $(el).focus(function(){
        if($(this).val() == old_value){
        	$(this).attr("value","");
		}
    }).blur(function(){
        if($(this).val() == "" || $(this).val() == " "){
            $(this).attr("value", old_value);
        } 
    });
}

function setValidator (form){
	if(form.length!=0){
		form.validate({					
			errorPlacement: function(error, element) {					
								element.parent().prepend(error);
							}
		})
			
	}
}

jQuery(document).ready(function($) {
	
 	 
		
	setValidator($("#contactForm"));
	setValidator($("#digestForm"));
		
	if($('#thank-you-block').length){	
		if(location.hash && location.hash == '#thank-you'){			
			if($('.form-box').length){$('.form-box').hide();}
			$('#thank-you-block').show();
		}
	}
});  

