$(function(){
	$(document).ready(function(){
		if ($("#posts .post").length > 0) {
			var img=$("#img-me"), src=img.attr("src"), h=img.height(), w=img.width();
			img.siblings("p:first").after("<div id='div-me'></div>")
			$("#div-me").css({
				background: "url("+src+") no-repeat 50% 50%",
				height: "100px",
				width: w
			});
			img.remove();
		}
		var prettify = false;
		$("pre code").parent().each(function() {
			$(this).addClass('prettyprint');
			prettify = true;
		});
		// if code blocks were found, bring in the prettifier ...
		if ( prettify ) {
			$.getScript("/js/prettify/prettify.js", function() { prettyPrint() });
		}
		$('#maxedbgimage').maxImage({
			isBackground: true,
			overflow: 'hidden'
		});
	});
});