$(document).ready(function(){

	// replace h1 with logo, h2 with random image
	$('#header h1').css('display','none');
	//html('<a href="/" ><img src="/wp-content/themes/williammurray/images/logo.png" alt="William Murray" width="160" height="108" /></a>');
	

	// align sprite background on nav hover
	/*$('nav li').hover(function(){
		var width = $(this).outerWidth();
		//alert(-2560 - width + 'px -298px');
		$(this).css('background-position', (-2569 + (width/2) + 5) + 'px -1394px');
		//background: url(images/css/sprite.png) no-repeat -2560px -298px;
	}
		, 
		function () {
			$(this).css('background-position', '-2569px -298px');
	});*/
	// align sprite on current page item
	var current = $('#nav li.current_page_item');
	var width = current.outerWidth();
	current.css('background-position', (-2569 + (width/2) + 5) + 'px -1394px');
	
	$('.post').last().css('border',0);
	
	$('#nav ul ul').wrap('<div class="childMenu" />');
	

});


$(window).load(function(){
	var height = 0;
	$('#content #features div').each(function(){
		var h = $(this).find('h2').outerHeight();
		if(h > height) height = h;
	});
	$('#content #features h2').css('min-height', height + 'px');
	
	$('#content').css('padding-bottom',$('#footer').outerHeight());
});
