function showSpeechBubble(text)
{
	var speech_bubble = $('#speech_bubble');
	var	speech_bubble_contents = $('#speech_bubble_contents');
	
	speech_bubble.css('display', 'block');
	speech_bubble_contents.html(text);
	
	var bubble_height = speech_bubble.height();
	var bubble_contents_height = speech_bubble_contents.height();
	
	var difference = bubble_height - bubble_contents_height;
	if (difference > 0)
		speech_bubble_contents.css('margin-top', (difference / 2) + 'px');
	else
		speech_bubble_contents.css('margin-top', '0px');
}

function hideSpeechBubble()
{
$('#speech_bubble').css('display', 'none');
}

function positionMerchTent()
{
	// Base values
	var background_width = 1920;
	var background_height = 1096;
	var tent_x_offset = -1;
	var tent_y_offset = -49;
	
	// Position the merch tent
	var merch_tent = $('#merch_tent');
	
	var window_width = $(window).width();
	var tent_width = merch_tent.width();
	var difference = window_width - tent_width;
	merch_tent.css('left', (difference / 2) + tent_x_offset + 'px');
	
	var window_height = $(window).height();
	var tent_height = merch_tent.height();
	difference = window_height - tent_height;
	merch_tent.css('top', (difference / 2) + tent_y_offset + 'px');
	
	// Position the background
	var background = $('#background');
	background.css('background-position', ((window_width - background_width) / 2) + 'px ' + ((window_height - background_height) / 2) + 'px');
}

$(document).ready
(
	function()
	{
		positionMerchTent();
	}
);

$(window).resize
(
	function()
	{
		positionMerchTent();
	}
);