$(document).ready(function () {
	hideMenus();
	initMenus();
	showItems();
	initLightBox();
});

function showAbout() {
	$("#about_over").show();
}

function hideAbout() {	
	$("#about_over").hide();
}

function showFooterAbout() {
	$("#about_over_footer").show();
}

function hideFooterAbout() {	
	$("#about_over_footer").hide();
}

function showServices() {
	$("#services_over").show();
}

function hideServices() {	
	$("#services_over").hide();
}

function showFooterServices() {
	$("#services_over_footer").show();
}

function hideFooterServices() {	
	$("#services_over_footer").hide();
}

function showProjects() {
	$("#projects_over").show();
}

function hideProjects() {	
	$("#projects_over").hide();
}

function showFooterProjects() {
	$("#projects_over_footer").show();
}

function hideFooterProjects() {	
	$("#projects_over_footer").hide();
}


function initMenus() {
	
	$(".footer_about").hover(							 
		function () {
			showFooterAbout();
		},
		function () {
			hideFooterAbout();
		}
	);
	
	$(".footer_services").hover(							 
		function () {
			showFooterServices();
		},
		function () {
			hideFooterServices();
		}
	);
	
	$(".footer_projects").hover(							 
		function () {
			showFooterProjects();
		},
		function () {
			hideFooterProjects();
		}
	);
	
	$(".menu_about").hover(							 
		function () {
			showAbout();
			hideServices();
			hideProjects();
		},
		function () {
			hideAbout();
		}
	);
	
	$(".menu_services").hover(							 
		function () {
			showServices();
			hideProjects();
		},
		function () {
			hideServices();
		}
	);
	
	$(".menu_projects").hover(							 
		function () {
			showProjects();
			hideServices();
		},
		function () {
			hideProjects();
		}
	);
}

function hideMenus()
{	
	hideServices();
	hideProjects();
	hideAbout();
	hideFooterAbout();
	hideFooterServices();
	hideFooterProjects();
}

function showItems()
{
	$(".mainItem:last-child").css({borderBottom:"none"});
	
	$(".mainItem .expand").css({paddingLeft:"10px"});
	
	$(".mainItem .expandItem").toggle(function() {
			$(this).next(".expand").show("normal");
			$(this).text("-close");
		},
		function() {
			$(this).next(".expand").hide("normal");
			$(this).text("+more");
	});
}

function initLightBox()
{
	$('a.lightBox').lightBox();	
}