/*
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
*/

$(function() {
  // IE6 & less-specific functions
  // Add hover class to primary menu li elements on hover
  if ($.browser.msie && ($.browser.version < 7)) {
    $('#primary-menu li').hover(function() {
      $(this).addClass('hover');
      }, function() {
        $(this).removeClass('hover');
    });
  };
  $("a[rel='gallery']").colorbox();  
});
  
$(function() {
	 $('#banner').cycle();
});   
  
$(function() {
	$('#chat').hover(function(){
		$("#chat-hover").hide().slideDown();		
	}, function(){
		$('#chat-hover').css('display','none');
	})

})

$(function() {
	$(".facilities td p").css('display','none');		   
	$(".facilities td h4").toggle(
     function () {
        $(this).next().slideDown('Normal');
      },
     function () {
        $(this).next().slideUp('Normal');
      }	  
    );
						 
});


var auto_refresh = setInterval(
function ()
{
	var tm = new Date();
	tm = tm.getTime();
	$('#chat-hover img').each(function() { 
		var t = $(this);
		var src = t.attr('src');
		src = src.replace(/(xyzzy=\d+)?$/, 't='+tm);
		t.attr('src', src); 
	});
}, 10000); // refresh every 10000 milliseconds  
