slideShowTimeout = 0;
nextAnimation = null;
$(document).ready(function(){
	$('.sidebar_menu li').not('.link_only').hover(function(){
		nextAnimation = this.id;
		window.clearTimeout(slideShowTimeout);
		animateSlideshow();
	},function(){
		slideShowTimeout = window.setTimeout('closeSlideshow()',1000);
	});
	$('.t_content_sub').hover(function(){
		window.clearTimeout(slideShowTimeout);
	}, function(){
		slideShowTimeout = window.setTimeout('closeSlideshow()',1000);
	});
});

function animateSlideshow(){
	if (nextAnimation){
		$('.t_content_sub').attr('class','t_content_sub').addClass('category_'+nextAnimation);
		$('.home_slideshow li').fadeOut();
		$('.home_slideshow li#home_'+nextAnimation).fadeIn("normal",animateSlideshow);
		nextAnimation = null;
	}
}

function closeSlideshow(){
	if ($('.home_slideshow li#home_default:visible').size() == 0){
		$('.t_content_sub').attr('class','t_content_sub');
		$('.home_slideshow li:visible').fadeOut();
		$('.home_slideshow li#home_default').fadeIn();
	}
}