var _c = _h = 0;
$(document).ready(function () {
    $('#play > li').click(function(){
        var i = $(this).attr('alt') - 1;
        clearInterval(_h);
        _c = i;
        //play();
        change(i);       
    })
    $("#pic_div div").hover(function(){clearInterval(_h)}, function(){play()});
    play();
})
function play()
{
    _h = setInterval("auto()", 4000);

}
function change(i)
{
    // $('#play > li').css('background-image','url(http://static.kangq.com/www/newpoints/images/hot_no01.png)').eq(i).css('background-image','url(http://static.kangq.com/www/newpoints/images/hot_no02.png)').blur();
    $('#play > li').removeClass('active').eq(i).addClass('active').blur();
    $("#pic_div > div").fadeOut('slow').eq(i).fadeIn('slow');
}
function auto()
{   
    _c = _c >= 3 ? 0 : _c + 1;

    change(_c);
}

function jump(obj,t)
{
	var domain =  "http://"+document.location.host;
	var path;
	switch(t)
	{
		case 1:
			path = domain+"/news/newslist/"+obj.value+".html";
			break;
		case 2:
			path = domain+"/business/businesslist/"+obj.value+".html";
			break;
		case 3:
			path = domain+"/services/experiment/"+obj.value+".html";
			break;
		case 4:
			path = domain+"/services/science/"+obj.value+".html";
			break;
		case 5:
			path = domain+"/jobs/more/"+obj.value+".html";
			break;
		default:
			path = domain;
	}
	document.location = path;
}
