function detectBrowser()
{
var browser=navigator.appName;

if ((browser=="Netscape" || browser=="Microsoft Internet Explorer" || browser=="MSIE")
  && (navigator.userAgent.toLowerCase().indexOf('msie 6') != -1))
  {
  alert("Dear visitor, you are using IE6 so this website may not render correctly for you.  Kindly update your version of Internet Explorer.");
  }
}




$(document).ready( function() {
	
	$("#navigation1")
		.hover( function() {
			$("#nav_home").fadeIn("fast");
		}, function() {
			$("#nav_home").fadeOut("fast");
	});
	
	$("#navigation2")
		.hover( function() {
			$("#nav_services").fadeIn("fast");
		}, function() {
			$("#nav_services").fadeOut("fast");
	});
	
	$("#navigation3")
		.hover( function() {
			$("#nav_weddings").fadeIn("fast");
		}, function() {
			$("#nav_weddings").fadeOut("fast");
	});
	
	$("#navigation4")
		.hover( function() {
			$("#nav_flowers").fadeIn("fast");
		}, function() {
			$("#nav_flowers").fadeOut("fast");
	});
	
	$("#navigation5")
		.hover( function() {
			$("#nav_chocs").fadeIn("fast");
		}, function() {
			$("#nav_chocs").fadeOut("fast");
	});
	
	$("#navigation6")
		.hover( function() {
			$("#nav_contact").fadeIn("fast");
		}, function() {
			$("#nav_contact").fadeOut("fast");
	});	
	
	
	//if(location.href.indexOf("#") == -1) {
		$("#content").css('visibility','hidden');
			
		setTimeout(function() {
			$("#content").css('visibility','visible');
			$("#content").hide();
			$("#content").fadeIn("slow");
			$("#navigation").fadeIn("slow");
		}, 7000);
	//}
	
});




function firePage(page) {
	var flag = 0;
	
	setTimeout(function() {
		if(flag != 1)		
			$("#loading").show();
	}, 5);
	
	url = page + "_content.html";
	
	$.get(url, '',function(data, textStatus) {
		$("#myajaxcontent").html(data);
				
		//for fancybox images
		$("a.fancyBox").fancybox();
		
		var myDiv=document.getElementById("mycustomscroll");
		if(myDiv!=null&&myDiv.scrollUpdate) myDiv.scrollUpdate();
		
		$("#loading").hide();
		flag = 1;
	},"html");
}

function changeMainImage(imagePath) {
	$('#mainImage').css("background-image", "url(" + imagePath + ")"); 
}


function fireMainPage() {
	if(location.href.indexOf("#") == -1) {
		$("#content").css("visibility","visible");
		$("#content").hide();
		$("#content").fadeIn("slow");
		$("#navigation").fadeIn("slow");
	}
}
