$(document).ready(function() {
	// Easy Pullquotes by Mike Jolley
	// Go through each span element with a classname of "pullquote"
	$('span.pullquote').each(function() {
		var otherClasses = "", text;
		// Get the text of the span
		if($(this).attr("title")) {
			text = $(this).attr("title");
			otherClasses += " paraphrase";
		} else {
			text = '&#8220;' + $(this).text() + '&#8221;';
		}

		// Get rid of unwanted characters
		text=text.replace( /\((.*)\)/gi, " ");

		// Check if this is to be a right or left pull quote and output it
		if($(this).is(".right"))
			otherClasses += " right";
		$(this).parent().before('<blockquote class="pulledquote'+otherClasses+'">'+
			'<p><span class="bquote"></span>'+ text +'</p></blockquote>');
	});
	// End pull quote code
});
