var slide_time = 500;

function setWidthRibbons()
{
	var windowWidth = document.documentElement.clientWidth;
	var remWidth = (windowWidth - ($('#box_content').outerWidth())) / 2;
	//alert('Window width : ' + windowWidth + '\nContent Box Width : ' + $('#box_content').width() + '\nRemainder : ' + remWidth);
	$('#box_left_ribbon').css('width', remWidth - 1);
	$('#box_right_ribbon').width(remWidth - 1);
	// Move the header and footer accordingly
	var origPadFooter = $('#footer_menu').css('padding-left');
	var newPadFooter = remWidth;
	//$('#footer_menu').css('padding-left',newPadFooter);
}(jQuery);

function showPage(page_name)
{
	//$("#hover_menu_1").css('display','none');
	$("#hover_menu_2").css('display','none');
	$("#scrollbar").css('display','none');
	setTimeout('$("#box_content").fadeOut(' + slide_time + ');', 100);
	$("#box_content").css("display","none");
	$("#placeholder").attr('width','753px');
	$("#box_content").html("<img src='images/loadingAnimation.gif' style='padding-top: 210px;' />");
	//setTimeout('$("#box_content").fadeIn(' + slide_time + ');', 100);
	
	/*$.post( 'includes/show.pages.inc.php', { page_name : page_name }, function(data)
	{
		$("#box_content").html('');
		$("#box_content").append(data);
		$("#box_content").css("display","none");
		$("#placeholder").attr('width','753px');
		setTimeout('$("#box_content").fadeIn(' + slide_time + ');', 100);
	});*/
}(jQuery);

function showHoverMenu(menu_id)
{
	var other_menu = menu_id == 1 ? 2 : 1;
	
	// Check if other menu is out; hide if it is
	//if( $("#hover_menu_" + other_menu).css('display') != 'none' )
	//{
	//	setTimeout('$("#hover_menu_' + other_menu + '").fadeOut(' + slide_time + ');', 100);
	//}
	
	// Show the menu
	//if( $("#hover_menu_" + menu_id).css('display') == 'none' )
	//{
		setTimeout('$("#hover_menu_' + menu_id + '").fadeIn(' + slide_time + ');', 100);
		// $("#hover_menu_" + menu_id).html('');
	//}
	// Hide the menu
	//else
	//{
	//	setTimeout('$("#hover_menu_' + menu_id + '").fadeOut(' + slide_time + ');', 100);
	//}
}(jQuery);

function hideHoverMenu(menu_id)
{
	var other_menu = menu_id == 1 ? 2 : 1;
	
	// Check if other menu is out; hide if it is
	//if( $("#hover_menu_" + other_menu).css('display') != 'none' )
	//{
	//	setTimeout('$("#hover_menu_' + other_menu + '").fadeOut(' + slide_time + ');', 1000);
	//}
	
	// Show the menu
	//if( $("#hover_menu_" + menu_id).css('display') == 'none' )
	//{
	//	setTimeout('$("#hover_menu_' + menu_id + '").fadeIn(' + slide_time + ');', 100);
		// $("#hover_menu_" + menu_id).html('');
	//}
	// Hide the menu
	//else
	//{
		setTimeout('$("#hover_menu_' + menu_id + '").fadeOut(' + slide_time + ');', 1000);
	//}
}(jQuery);

function hideHoverMenu2(menu_id)
{
	var other_menu = menu_id == 1 ? 2 : 1;
	
	// Check if other menu is out; hide if it is
	//if( $("#hover_menu_" + other_menu).css('display') != 'none' )
	//{
	//	setTimeout('$("#hover_menu_' + other_menu + '").fadeOut(' + slide_time + ');', 1000);
	//}
	
	// Show the menu
	//if( $("#hover_menu_" + menu_id).css('display') == 'none' )
	//{
	//	setTimeout('$("#hover_menu_' + menu_id + '").fadeIn(' + slide_time + ');', 100);
		// $("#hover_menu_" + menu_id).html('');
	//}
	// Hide the menu
	//else
	//{
		setTimeout('$("#hover_menu_' + menu_id + '").fadeOut(' + slide_time + ');', 3000);
	//}
}(jQuery);
/*

function showContactUs()
{
	//alert('Show contact us page..');
	$("#hover_menu_1").css('display','none');
	$("#hover_menu_2").css('display','none');
	setTimeout('$("#box_content").fadeOut(' + slide_time + ');', 100);
	$("#box_content").css("display","none");
	$("#placeholder").attr('width','753px');
	$("#box_content").html("<img src='images/center_images/contactus_image.png' />");
	setTimeout('$("#box_content").fadeIn(' + slide_time + ');', 100);
	$("#box_content").html("<img src='images/center_images/contactus_image.png' />");
	setTimeout('$("#box_content").fadeIn(' + slide_time + ');', 100);
};*/
