jQuery.fn.exists = function(){return this.length > 0;};

window.onload = function()
{
	// this is to reduce column width of the content paragraphs if a random image has to be displayed
	if($('#randomimage').exists())
	{
		var w1 = $('#randomimage').width();
		var w2 = $('#content p').width();
		w = w2-w1-40;
		//alert('randomimage: '+w1+'\ncontent p: '+w2+'\nw: ' +w);
		$('#content p').width(w);
		return true;
	}
	else
	{
		return false;
	}
};

