// JavaScript Document
$(document).ready(function(){
	if($('#stage').length){
		$('#stage > div').not(':first-child').hide();
		$('#sidebar a:first').addClass('active');

		// IE Cleartype Bug
		if($.browser.msie){
			$('#stage > div').css('background-color', '#FFFFFF');	
		}
		
		$('#sidebar a').click(function(){
			var theClick = $(this);
			var theTarget = $(this).attr('href');
			theTarget = $(theTarget);
			
			if(theTarget.is(':hidden')){
				$('#sidebar a.active').removeClass('active');
				theClick.addClass('active');
				
				$('#stage > div:visible').fadeOut(function(){
					theTarget.fadeIn();
				});
			}
			
			return false;
		});
	}
});
