/*新闻滚动*/
$(function(){ 
 var $this = $(".new_list");
 var scrollTimer;
 var newsULHeight=$this.find("ul").height();
 var realityHeight=$this.height()-$this.find(".more").height();
 if(newsULHeight>realityHeight){
	 $this.hover(function(){
	 clearInterval(scrollTimer);
	 },function(){
	 scrollTimer = setInterval(function(){
	 scrollNews( $this );
	 }, 3000 );
	 }).trigger("mouseleave");
 }
});
function scrollNews(obj){
	$.each(obj,function(){
		var $self = $(this).find("ul:first");
		var lineHeight = $self.find("li:first").height(); //获取行高
		$self.animate({ "marginTop" : -lineHeight +"px" }, 600 , function(){
		$self.css({marginTop:0}).find("li:first").appendTo($self); //appendTo能直接移动元素
	});
 })
}

