function prepareBlockquotes() {
	var quotes = document.getElementsByTagName("blockquote");
	for (var i=0; i<quotes.length; i++) {
		var source = quotes[i].getAttribute("cite");
		if (source) {
			var link = document.createElement("a");
			link.setAttribute("href",source);
			var text = document.createTextNode("source");
			link.appendChild(text);
			var para = document.createElement("p");
			para.className = "attribution";
			para.appendChild(link);
			quotes[i].appendChild(para);
		}
	}
}

window.onload = prepareBlockquotes;
