
$(document).ready(function() {
		sfHover();
		stripeTables();
		$("#submenu li").bind('mouseover',submenuHover);
		$("#submenu li").bind('mouseout',submenuOut);
		$("a.tab").bind('click',tabClick);
		$("div.box").hide();
		var content_show = $("a.active").attr("title");  
		$("#"+content_show).show();
});


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"), "");
        }
    }
}

tabClick = function(){
	$("a.active").removeClass("active");
	$("div.box").hide();
	var content_show = $(this).attr("title");  
	$("#"+content_show).fadeIn("slow");
	$(this).addClass("active");
}

submenuHover = function(){
	$(this).animate({width: 150},250);
}

submenuOut = function(){
	$(this).animate({width: 130},250);
}

function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(21.784369,-72.274246), 2);
        var point = new GLatLng(21.784369,-72.274246);
        var marker = new GMarker(point);
        map.addOverlay(marker); 
        
      }
    }
	
function stripeTables(){
	$('table.rates tr:nth-child(odd)').addClass('odd');	
}
