var t = n = count = 0;
jQuery(document).ready(function(){
    count = jQuery("#play_list a").size();
    jQuery("#play_list a:not(:first-child)").hide();
    jQuery("#play_info").html(jQuery("#play_list a:first-child").find("img").attr('alt'));
    jQuery("#play_text li:first-child").css({"background":"#b13230","border":"2px solid #fe3130",'color':'#fff'});
    jQuery("#play_info").click(function(){window.open(jQuery("#play_list a:first-child").attr('href'), "_blank")});
    jQuery("#play_text li").click(function() {
        var i = jQuery(this).text() - 1;
        n = i;
        if (i >= count) return;
        jQuery("#play_info").html(jQuery("#play_list a").eq(i).find("img").attr('alt'));
        jQuery("#play_info").unbind().click(function(){window.open(jQuery("#play_list a").eq(i).attr('href'), "_blank")})
        jQuery("#play_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
        jQuery(this).css({"background":"#b13230","border":"2px solid #fe3130",'color':'#fff'}).siblings().css({"background":"#72716f","border":"2px solid #969593",'color':'#fff'});
    });
    t = setInterval("showAuto()", 5000);
    jQuery("#play").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 5000);});
})
function showAuto()
{
    n = n >= (count - 1) ? 0 : n + 1;
    jQuery("#play_text li").eq(n).trigger('click');
}
