// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
function isbn_to_colour(isbn) {
	if (isbn.length >= 10) {
		color = hex_md5(isbn+title+author);
		return "#"+color.substring(0,6);
	}
	return '';
}

function verify_images() {
	$("img.thumbnail").each(function(i){
		if (this.width == 111) {
			author = $(this).attr("author");
			title = $(this).attr("title");
			isbn = $(this).attr("isbn");
			color = isbn_to_colour(isbn);
		
			$(this).parent().html("<div class='bookCover fakeCover' style='background-color: "+color+";'><span class='title'>"+title+"</span><span class='author'>"+author+"</span></div>");
		}
	});
}


