$(document).ready(function(){

	// Blockquote
	$("blockquote .blockquote").prepend("<span class=\"quotes\"><img src=\"img/structure/blockquotes-open.gif\"/></span>");
	$("blockquote .blockquote").append("<span class=\"quotes\"><img src=\"img/structure/blockquotes-close.gif\"/></span>");
	
	// close post link
	$("div.respond").after("<a class=\"close-post\" href=\"#\">(close post)</a>");

	// hide stuff
	$("#MainContent .post .post-content").children().not('.entry, .post-footer').hide();
	
	// hide post beyond 1st 2 paras & appends show more link
	$("#MainContent .post .post-content .entry").each(function(){
		$(this).children(':gt(1)').hide();
		$(this).after("<a class=\"read-more\" href=\"#\">(read more)</a>");
	});

	// read more
	$("#MainContent .post .post-content a.read-more").click(function() {
		$(this).prev('.entry').children(':gt(1)').show();
		$(this).nextAll().not('.post-footer').show();
		$(this).hide();
		return false;
	});
	
	// close post
	$("#MainContent .post .post-content a.close-post").click(function() {
		$(this).prevAll().not('.post-footer, .post-entry').hide();
		$(this).prevAll('.entry').children(':gt(1)').hide();
		$(this).prevAll('.read-more').show();
		$(this).hide();
		return false;
	});
	
});
