// JavaScript Document

 
//核心程序
function change(i)
{
    $('#play a').removeAttr('class').eq(i).attr('class','currentPicInter').blur();
    alt_title = $('#pic img').eq(i).attr('alt');
    //$('#picTitle').animate({opacity:'hide'},200);
    $("#pic img").fadeOut(200).eq(i).fadeIn(200,function(){
    	url = $('#pic a').eq(i).attr('href');//获取URL地址
    	//$('#picTitle').attr('href',url).html(alt_title).animate({opacity:'show'},500);
    });
}
 
//自动轮转判断
function auto()
{    
    _c = _c >= _j-1 ? 0 : _c + 1;
    change(_c);
}
 
//自动轮转判断
function quickRegCtrl()
{
	tmp_dis = document.getElementById('main_reg_wrap');
	if( tmp_dis.style.display = 'none' ){
		tmp_dis.style.display = '';
	}else{
		tmp_dis.style.display = 'none';
	}
}
 
//初始化
$(document).ready(function(){
	//播放速度
	var speed = 4000;
	//控制范围，符合jQuery路径即可
	var block = '#indexLinks li';
	//需要显示的内容条目数
	var eq = 6;
	var h = 0;
	if($(block).length > eq){//如果内容数目大于需要滚动的数目，开始滚动！
		//隐藏除了第一个的其它所有节点
		$(block).slice(eq).css('display','none');
		//播放开始
		h = setInterval('scrollContent("'+block+'",'+eq+',2)',speed);
		$('#siteBulletin').mouseout(function(){
			h = setInterval('scrollContent("'+block+'",'+eq+',2)',speed);
		});
		$('#siteBulletin').mouseover(function(){
			clearInterval(h);
		});
	}
	
})
//初始化
$(document).ready(function(){
	//播放速度
	var speed = 6000;
	//控制范围，符合jQuery路径即可
	var block = '#expert li';
	//需要显示的内容条目数
	var eq = 3;
	var h = 0;
	if($(block).length > eq){//如果内容数目大于需要滚动的数目，开始滚动！
		//隐藏除了第一个的其它所有节点
		$(block).slice(eq).css('display','none');
		//播放开始
		h = setInterval('scrollContent("'+block+'",'+eq+',2)',speed);
		$('#siteBulletin').mouseout(function(){
			h = setInterval('scrollContent("'+block+'",'+eq+',2)',speed);
		});
		$('#siteBulletin').mouseover(function(){
			clearInterval(h);
		});
	}
	
})
 
//*********************************************************************************\
//	JS翻滚内容函数
//	基于jQuery内核开发，必须引入jQuery
//	@Author:bridgler
//	@Email:qiao@yynet.cn
//	@Date:2008-05-02
//	初始化必须执行
//	block 制定控制对象
//	eq	页面显示数目
//	type 效果类型：1 - 为滑动，2 - 为渐变，3 - 滑动加渐变
//**********************************************************************************/
function scrollContent(block,eq,type){
		//获取第节点
	    var firstNode = $(block);
	    //动画效果
	    switch(type){
	    	case 1:
	    		animation_out = {height:'hide'};
	    		animation_in = {height:'show'};
	    		break;
	    	case 2:
	    		animation_out = {opacity:'hide'};
	    		animation_in = {opacity:'show'};
	    		break;
	    	case 3:
	    		animation_out = {height:'hide',opacity:'hide'};
	    		animation_in = {height:'show',opacity:'show'};
	    		break;
	    	default:'';
	    }
	    //开始动画
	    firstNode.eq(0).animate(animation_out,1000,function(){//隐藏
	    	//克隆.追加到最后.隐藏
	        $(this).clone().appendTo($(this).parent()).css('display','none');
	        //显示第二个节点内容
	    	firstNode.eq(eq).removeAttr('style').animate(animation_in,1000);
	    	//删除第一个节点内容
	        $(this).remove();
	    });
}