$(function(){
	var fn_href = function(s) { return s.replace(/https?:\/\/.*?\//i , '/') };
	$('#menu_main li').hover(function(){
		$(this).addClass('over');
	},function(){
		$(this).removeClass('over');
	});
	$('#menu_main a').each(function(){ if (fn_href(this.href) == fn_href(location.href)) $(this).parent().addClass('active') });
	$('#menu_main li li.active').each(function(){ $(this).closest('li').addClass('active') });
	
});

$(function(){
	$('#title').click(function(){
		window.location=('/');
	});
	
	$('#accommodation').click(function(){
		window.location=('http://www.whistler.com/crankworx/');
	});
	
	$('#buzz_btn').click(function(){
		$("#buzz").show() ;
		$("#video_feed").hide() ;
		$("#lodging").hide() ;
		return false;
	});
	
	$('#video_btn').click(function(){
		$("#video_feed").show() ;
		$("#buzz").hide() ;
		$("#lodging").hide() ;
		return false;
	});

	$('#lodging_btn').click(function(){
		$("#lodging").show() ;
		$("#buzz").hide() ;
		$("#video_feed").hide() ;
		return false;
	});

});
