// overlay
// define function that opens the overlay
function openOverlay() {
	// get access to the overlay API
	var api = $("#overlay").overlay();
	// call it's open() method		
	api.load();			
}

$(function() {
	$("#overlay").overlay({
		close: 'a.close' ,

		speed: 50,
		// start exposing when overlay starts to load
		onBeforeLoad: function() {
			// this line does the magic. it makes the background image sit on top of the mask
			this.getBackgroundImage().expose({opacity: 0.75 ,color: '#000000'});
		}, 
				
		// when overlay is closed take the expose instance and close it as well
		onClose: function() {
			$.expose.close();
		}
	});
});

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

function hideFlashOverlay() {
	// close overlay
	$("#overlay").overlay().close();	
}