// Erwarton Queen JS

		$(document).ready(function(){
		$("#newsticker").newsticker(); 
	 	$.preloadImages("/images/page/photos/dining.jpg", "/images/page/photos/aboutus.jpg");
	 
       $("#homeNavigate").hoverIntent(function(event){
			$("#pagePhoto").fadeTo("slow", 0.01, function() { fadeImageIn("/images/page/photos/home.jpg"); });
			
       }, function() {});
	   
		$("#aboutusNavigate").hoverIntent(function(event){
			$("#pagePhoto").fadeTo("slow", 0.01, function() { fadeImageIn("/images/page/photos/aboutus.jpg"); });
			
       }, function() {});
	   
	        $("#diningNavigate").hoverIntent(function(event){
			$("#pagePhoto").fadeTo("slow", 0.01, function() { fadeImageIn("/images/page/photos/dining.jpg"); });
			
       }, function() {});
	   
	        $("#facilitiesNavigate").hoverIntent(function(event){
			$("#pagePhoto").fadeTo("slow", 0.01, function() { fadeImageIn("/images/page/photos/facilities.jpg"); });
			
       }, function() {});
	   
	        $("#contactusNavigate").hoverIntent(function(event){
			$("#pagePhoto").fadeTo("slow", 0.01, function() { fadeImageIn("/images/page/photos/contactus.jpg"); });
			
       }, function() {});
     });
	 
	 function fadeImageIn(fadeImage) {
				$("#pagePhoto").attr("src", fadeImage);
				$("#pagePhoto").fadeTo(300, 1);
	 }
	 
	 jQuery.preloadImages = function()
	{
	  for(var i = 0; i<arguments.length; i++)
	  {
		jQuery("<img>").attr("src", arguments[i]);
	  }
	 }