$(document).ready ( function (){
	$("#searchbar").css ('visibility', 'hidden');
	$("#rightColContent").css ('visibility', 'hidden');
	$("#compassBTN").css ('visibility', 'hidden');
	$("#ShoppingCart").css ('visibility', 'hidden');
	$("#headingSmallRight").css ('visibility', 'hidden');
	$("#popup").overlay({
		// custom top position
		top: 100,
		speed: 800,
		// some mask tweaks suitable for facebox-looking dialogs
		mask: {
			// you might also consider a "transparent" color for the mask
			color: '#2e2e2e',
			// load mask a little faster
			loadSpeed: 200,
			// very transparent
			opacity: 0.5,
			zIndex: 1
		},
		// disable this for modal dialog-type of overlays
		closeOnClick: true,
		
		onClose: function () {
			$("#searchbar").css ('visibility', 'visible');
			$("#rightColContent").css ('visibility', 'visible');
			$("#compassBTN").css ('visibility', 'visible');
			$("#ShoppingCart").css ('visibility', 'visible');
			$("#headingSmallRight").css ('visibility', 'visible');
		},
		// load it immediately after the construction
		load: true
	});
	setTimeout ( function () {
		$("#apply span").fadeIn (800);
	},				
	1000);
	
	$(function() {
		var zIndexNumber = 1000;
		$('div').each(function() {
			$(this).css('zIndex', zIndexNumber);
			zIndexNumber -= 10;
		});
	});
});
