/* simplemodal for start button form */



$(document).ready(function () {
							
	$('#clickme').click(function() {
		$('#start-button-form').modal({
			onOpen: modalOpen,
			onClose: modalClose
		});		
		return false;
	});
	
	$('#play-oneone').click(function() {
		$('#movie-oneone').modal({
			onOpen: modalOpen,
			onClose: modalClose
		});		
		return false;
	});
	
	$('#play-atc').click(function() {
		$('#movie-atc').modal({
			onOpen: modalOpen,
			onClose: modalClose
		});		
		return false;
	});
	
	$('#play-noc').click(function() {
		$('#movie-noc').modal({
			onOpen: modalOpen,
			onClose: modalClose
		});		
		return false;
	});
	
	$('#play-dac').click(function() {
		$('#movie-dac').modal({
			onOpen: modalOpen,
			onClose: modalClose
		});		
		return false;
	});
	
});

function startForm (dialog) {
	$('#start-button-form').modal({
			onOpen: modalOpen,
			onClose: modalClose
	});	
}


/**
 * When the open event is called, this function will be used to 'open'
 * the overlay, container and data portions of the modal dialog.
 *
 * onOpen callbacks need to handle 'opening' the overlay, container
 * and data.
 */
function modalOpen (dialog) {
	dialog.overlay.fadeIn('fast', function () {
		dialog.container.fadeIn('slow', function () {});
		dialog.data.fadeIn('slow');
	});
}

/**
 * When the close event is called, this function will be used to 'close'
 * the overlay, container and data portions of the modal dialog.
 *
 * The SimpleModal close function will still perform some actions that
 * don't need to be handled here.
 *
 * onClose callbacks need to handle 'closing' the overlay, container
 * data and iframe.
 */
function modalClose (dialog) {
	
	dialog.data.fadeOut('fast', function () {});
	dialog.container.fadeOut('slow', function () {
		dialog.overlay.fadeOut('slow', function () {
			$.modal.close();
		});									   
	});
	
}