function createOverlay(overlayOptions) {
	var overlayCustomClass = overlayOptions.customClass;
	/*Build overlay background*/
	$('body').append('<div class="'+overlayCustomClass+' overlay-background" id="overlay-background"></div>');
	/*Build overlay*/
	$('body').append('<div class="'+overlayCustomClass+' overlay" id="overlay"><div class="close">Close</div><div class="content"></div></div>');
	var windowWidth = $(window).width();
	var documentHeight = Math.max($(document).height(), $(window).height(), document.documentElement.clientHeight);

	//var documentHeight = $(document).height();
	$('#overlay-background').width(windowWidth);
	$('#overlay-background').height(documentHeight);
}	

function showOverlay(removeOverlayFunction, callbackFunction, callbackVariables) {
	removeOverlayFunction();
	callbackFunction(callbackVariables);
}

function deleteOverlay() {
	$('.overlay .close').click(function() {
		removeOverlay();
	});
}

function removeOverlay() {
	$('.overlay').fadeOut('250', function() {
		$('.overlay').remove();
	});
	$('.overlay-background').fadeOut('250', function() {
		$('.overlay-background').remove();
	});
}

function hideOverlay() {
	$('.overlay .close').click(function() {
		$('.overlay').fadeOut('250', function() {
		});
		$('.overlay-background').fadeOut('250', function() {
		});
	});
}
