var _c = _h = 0;
$(document).ready(function () {
    $('#play > li').click(function(){
        var i = $(this).attr('alt') - 1;
        clearInterval(_h);
        _c = i;
        //play();
        change(i);       
    })
    $("#adspic img").hover(function(){clearInterval(_h)}, function(){play()});
    play();
})
function play()
{
    _h = setInterval("auto()", 6000);

}
function change(i)
{
    $('#play > li').css('background','none').eq(i).css('background','url(templates/swf_nav-hover.gif) no-repeat center center').blur();
    $("#adspic img").fadeOut('slow').eq(i).fadeIn('slow');
}
function auto()
{   
    _c = _c > 2 ? 0 : _c + 1;

    change(_c);
}