function fadeIn(box) {
	idbox = "#" + box;
	$("#storm").fadeOut("slow");
	$(idbox).fadeIn("slow");
	//$('dl#back_number_list a[@rel="'+box+'"]').addClass("active");
	$("dl#back_number_list a[rel*="+box+"]").addClass("active");
	//alert(box);
}

function storm(box) {
	$("#tv_inner li").hide();
	$("#storm").show();
	$("dl#back_number_list a").removeClass("active");
	setTimeout(function() { fadeIn(box) }, 1500);
}

jQuery(document).ready(function(){

	setTimeout(function() { fadeIn($('#tv').attr('title')) }, 1000);

	if (IE6) {
		$("#balloon").css("display", "none");
		$("#balloon").css("top", "-170px");
		$("#ipod").hover(function(){
			$("#balloon").fadeIn("slow");
		},function () {
			setTimeout(function(){				
				$("#balloon").fadeOut("slow");
			}, 800);
		});
	} else {
		$("#ipod").hover(function(){
			$("#balloon").animate({ opacity: 1.0, top: "-170px"}, 1000);
		},function () {
			setTimeout(function(){				
				$("#balloon").animate({opacity: 0, top: "-130px"}, 1000);
			}, 800);
		});
	}
	
	$("dl#back_number_list a").click(function(){
		box = $(this).attr("rel");
		storm(box);
		return false;
	});

});
