$(function() {

	// Initally set image to faded out
	$(".fadehover").animate({ opacity: 0 }, 0 );
	
	
	// fade image in on hover, out on leave
	$(".fadehover").hover(
      function () {
		$(this).stop();
       	$(this).animate({ opacity: 1 }, 250 );
      }, 
      function () {
		$(this).stop();
        $(this).animate({ opacity: 0 }, 400 );
      }
    );
	

	
	$("#commentform #author, #commentform #email, #commentform #url, #commentform textarea").click(
		function(){
			// if they enter their own value or username is set, do not remove on click.
			if($(this).val() == authorDefault || $(this).val() == emailDefault || $(this).val() == urlDefault || $(this).val() == commentDefault)
			{
				 $(this).val(""); 
			}
		}
	);
	
	var authorDefault = "Name*";
	var emailDefault = "Email* (required but not displayed)";
	var urlDefault = "Website (format: www.processedidentity.com)";
	var commentDefault = "Comment*";
	
	if($('#author').val() == ""){ $('#author').val(authorDefault); }
	if($('#email').val() == ""){ $('#email').val(emailDefault); }
	if($('#url').val() == ""){ $('#url').val(urlDefault); }
	if($('#comment').val() == ""){ $('#comment').val(commentDefault); }
	
});

