$(document).ready(function() 
{
	if (inanimate) var t = setTimeout("animate_backgrounds()",1000);
});

function animate_backgrounds()
{
	$( '.blogpost, .page' ).each( function()
	{
		if ( $( this ).children( '.info' ).length > 0 && $( this ).children( '.background' ).length > 0)
		{
			var info_offest = $( this ).children( '.info' ).offset();
			var parent_offset = $( this ).offset();
			
			$( this ).children( '.background' ).stop(true,false);
			$( this ).children( '.background' ).height( $( this ).children( '.info' ).height() );
			$( this ).children( '.background' ).width( $( this ).children( '.info' ).width() );
		
			$( this ).children( '.background' ).css( {'left' : info_offest.left-parent_offset.left, 'top' : info_offest.top-parent_offset.top} );
			$( this ).children( '.background' ).css( {'display':'block'} );
			$( this ).children( '.info' ).css( {'background-color':'transparent'} );
		
			$( this ).children( '.background' ).animate( {'opacity':.9}, 100 );
		}
	});
	
}

