$(document).ready(function() {
	Cufon.replace('h1');
	ModalController.init();
	$('#modal-close-btn').click(function() {
		ModalController.closeModal();
	});
});

function toggleFlashArea(cmd)
{
	if(cmd == 'expand') $('#flash-wrap').css({'width':'798px'});
	else if (cmd == 'contract') $('#flash-wrap').css({'width':'212px'});
	else return;
}

function updateTitle()
{
	$('#media-title').html(ImageGallery.gDescription());	
}

function getFlash(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}

function getPlaylistIdForFlash()
{
	return playerID;
}

function nextVideo()
{
	getFlash('player').nextVideo();
}

function previousVideo()
{
	getFlash('player').previousVideo();
}