// jQuery routine to inject content and behavior into a table of contents
//
// 2009.11.03 -- version 1

$(document).ready(function(){

	// add "hide" links at the end of each excerpt
	// add "show" link after excerpt
	$(".excerpt")
		.append('<p>...</p>')
		.append('<p><em>If you like what you have read, you should <a href="subscribe.htm">subscribe</a>.</em><p>')
		.append('<a href="#" class="hide">hide this...</a>')
		.after('<a href="#" class="show">read a little...</a>');
	
	// show preceding excerpt if you click a show link, then hide the link
	$(".show").click(function(){
		$(this).prev().slideDown("slow");
		$(this).hide();
		return false;
	});
	
	// hide excerpt (which includes the hide link) if you click a hide link, then display the show link
	$(".hide").click(function(){
    $(this).parent().slideUp("fast");
    $(this).parent().next().show();
    return false;
	});

});

