/*
blockquote function by Jeremy Keith, http://www.adactio.com/

revised by Nate Klaiber
*/
var BlockQuote = 
{
	init : function()
	{
		if (!document.getElementsByTagName || !document.createElement || !document.appendChild) { return false; };
		
		var quotes = document.getElementsByTagName("blockquote");
		
		for (var i=0; i < quotes.length; i++) {
			var source = quotes[i].getAttribute("cite");
			if (!source) { continue };
			var para = document.createElement("p");
			var link = document.createElement("a");
			para.className = "attribution";
			link.setAttribute("href", source);
			link.appendChild(document.createTextNode("(via)"));
			para.appendChild(link);
			quotes[i].appendChild(para);
		};
	}
}

Core.start(BlockQuote);
