$(document).ready(function(){	
	$("div.locations ul li").click(
		function()
		{		
			//get the menu item selected
			var show = $(this).attr('class');
			//hide all content div
			$("div.content-feature div").addClass("hide");
			//show corresponding info to menu item selected
			$("div.content-feature div").each(function(i)
			{ 				
					if(show == $(this).attr('id'))
					{
						$(this).removeClass("hide");
					}
			});
			return false;
		}
	);
	
	$("#menu li ul").fadeTo("normal", 0);
	$("#menu li").hover(
		function() { $("ul", this).fadeTo(350, 0.95); }, 
		function() { $("ul", this).fadeTo(1, 0); }
	);
	
	if (document.all) {
		$("#menu li").hoverClass ("hover");
	}
	
	$.ImageBox.init(
		{
			loaderSRC: '/basemedia/images/imagebox/loading.gif',
			closeHTML: '<img src="/basemedia/images/imagebox/close.jpg" />'
		}
	);
});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};

function urlCleanFormat(s) {
	alert("s: " + s);
	s = s.replace(/\s/g, "").toLowerCase();
	s = s.replace(/\//g, ""); 
	s = s.replace(/'/g, ""); 
	s = s.replace(/&amp;/g, ""); 
	s = s.replace(/&/g, ""); 
	return s;
};