$(document).ready(function(){


		// Remove Default Form Input Values on Click
		// Code by Blake Walters, http://markupboy.com/2009/03/removing-default-form-input-va.html
	$('input[type=text], textarea').each(function() {  
	 $(this).focus(function() { 
	  if($(this).val() == this.defaultValue) 
		$(this).val(""); 
	  }); 
	  $(this).blur(function() { 
		if($(this).val() == "") 
		  $(this).val(this.defaultValue); 
	  }); 
	});



	$('form.add-comment').next().addClass('subscribeWithoutComments');
	
	$("strong:contains('About the author:')").parent().addClass('author-blurb');
	$("strong:contains('About the author:')").addClass('author-title');
	
	if ($("strong:contains('About the author:')").next().is("br")) { $("strong:contains('About the author:')").next().remove(); }


	
		// Toggle Local Attorneys text on the CLE Pre-Evaluation Page
	$('.collapse-text').hide();
	$('h3.collapse').click(function() {
		$(".collapse-text").each(function(){
			if ($(this).css("display") == "block") { $(this).slideToggle('fast'); }
		});
		$(this).next().slideToggle('fast');
		if ($(this).css("background-position") == "-550px 100%") { $(this).css("background-position","0 100%"); }
		else { if ($(this).css("background-position") == "0px 100%") { $(this).css("background-position","-550px 100%"); } }
	});


});


$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c); },
			function() { $(this).removeClass(c); }
		);
	});
};
