﻿var t2 = n2 = count2 = 0;
$(function(){
	count2 = $("#PlayList a").size();

	$("#PlayList a:not(:first-child)").hide();

	$("#PlayText li").click(function() {
		var i = $(this).attr("id") - 1;
		n2 = i;
		if (i >= count2) return;
		$("#PlayList a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
//			$(this).css({"margin-top":"0px"}).siblings().css({"margin-top":"10px"});$(this).css({"margin-top":"176px"}).siblings().css({"margin-top":"186px"});

		
	});
	t2 = setInterval("showAuto2()", 3000);
	$("#play").hover(function(){clearInterval(t2)}, function(){t2 = setInterval("showAuto2()", 3000);});
})

function showAuto2()
{
	n2 = n2 >= (count2 - 1) ? 0 : n2 + 1;

	$("#PlayText li").eq(n2).trigger('click');
}
