// Menu First li nb
$(function() {
	$(".navi li:first").addClass("nl"); // HeaderMenu First li no border
	$(".footpage li:first").addClass("nb"); // FooterMenu First li no border
});
// SinaWeibo
$(document).ready(function(){
	$("#newwb").easySlider({
		controlsShow: true,
		firstShow: true,
		lastShow: true,
		vertical: true,
		auto: false,
		continuous: true 		
	});
	$("#newwbdate").easySlider({
		controlsShow: false,					   
		firstShow: true,
		lastShow: true,
		vertical: true,
		auto: false,
		continuous: true 		
	});
	
});	
// Slideshow
$(function(){
	var index = 0;
	$("#operate span:first").addClass("hov");
	$("#operate span").mouseover(function(){
	  index  =  $("#operate span").index(this);
	  showImg(index);
	});	
	$('.showcase').hover(function(){
			if(MyTime){
			   clearInterval(MyTime);
			}
	},function(){
			MyTime = setInterval(function(){
			  showImg(index)
			  index++;
			  if(index==5){index=0;}
			} , 6000);
	});
	var MyTime = setInterval(function(){
	  showImg(index)
	  index++;
	  if(index==5){index=0;}
	} , 6000);
})
function showImg(i){
	$("#showimg img")
	  .eq(i).stop(true,true).fadeIn(1000)
	  .parent().siblings().find("img").hide();
	$("#msg li")
	  .eq(i).stop(true,true).fadeIn(1000)
	  .siblings().hide();
	$("#operate span")
	  .eq(i).addClass("hov")
	  .siblings().removeClass("hov");
}
