$(document).ready(function() {

	// Replace the h1 on content pages with custom font
	Cufon.replace('.page-title h1');
	
	// Determine if the right content column is empty ( 0px high ) and if so, expand the width of the left column
	var $columnRight = $('#columnRight');
	var $columnRightHTML = $columnRight.html()
	var $columnRightHeight = $columnRight.css('height');
	if ( ( $columnRightHeight == '0px' ) || ( $columnRightHTML == null ) ) {
		$( '#columnLeft' ).width( '100%' );
	}
	
	// Insertion of a &nbsp; after a closing <a> tag within an H4 element to prevent meta (date/location) being an orphan
	$("h4").each(function() {
		$(this).html( $(this).html().replace('</a> <span', '</a>&nbsp;<span') );
	});
	
	// Hide our navigation dropshaow on hover
	$navigationContainer = $("#navigationContainer");
	$backgroundPosition = $navigationContainer.css('background-position');
	$nav = $("#nav");
	
	$nav.hover(function() {
		// Mouse-in
		$navigationContainer.css({'background-position' : '-99em -99em'});
	}, function() {
		// Mouse-out
		$navigationContainer.css({'background-position' : $backgroundPosition});
	});
	
	// Support for the Placeholder html5 attribute
	$('input, textarea').placeholder();
});
