var i = 0;
var _h;
$(function(){
	$(".index_m_b_ul li").hover(function(){
		var index = $(".index_m_b_ul li").index(this);
		$(".index_m_b_l .index_m_b_l_show").eq(index).fadeIn().siblings(".index_m_b_l_show").fadeOut();
	},function(){
		var index = $(".index_m_b_ul li").index(this);
		$(".index_m_b_l_show").hover(function(){
			
		},function(){
			$(".index_m_b_l .index_m_b_l_show").eq(index).fadeOut();
		})
	})	
	
	var oLi = $('.ytok_m_message_l_show_t > div.num > img');
	var oImg = $(".ytok_m_message_l_show_t ul.show li");
	var iLen = $(".num img").length;
	oLi.eq(0).addClass("active");
	oLi.mouseover(function(){
		var index = oLi.index(this);
		i = index;
		clearInterval(_h);
		change(i,oLi,oImg);
	})
	oLi.mouseout(function(){
		auto(i,oLi,oImg,iLen);					  
	})
	auto(i,oLi,oImg,iLen);
})
function auto(i,oNumLi,oShowLi,iLen){
	 _h = setInterval(function(){
			change(i,oNumLi,oShowLi);
			i++;
			if(i == iLen){
				i = 0;
			}
	},5000);
}
function change(i,oNumLi,oShowLi){
	 oNumLi.eq(i).css({"width":155,"height":45}).siblings("img").css({"width":110,"height":32});
     oShowLi.eq(i).show().siblings("li").hide();
     oNumLi.css("display","inline");
}

