$(document).ready(function(){
	if(!$.browser.msie){
		var h=$('.bottom').height();
		$('.footer').css({marginTop:h+8,width:800});
	};
	var h=$('.right').height();
	$('.left').css({height:h});
	$('.newslist a').click(function(){
		var nid=$(this).attr('nid');
		$('body').append('<div id="info"></div>');
		$('#info').animate({marginLeft:'-250px',width:'500px'},500,function(){
			$('#info').animate({marginTop:'-150px',height:'300px'},400,function(){
				$('#info').append('Loading...');
				$.get('info.asp?times='+new Date().getTime(),{nid:nid},function(data){
					$('#info').html(data);
					$('#detail').show();
					$('#info #title img').click(function(){
						$('#info').remove();
					});
				});
			});
		});
		return false;
	});
	setInterval(function(){
		if(banner.scrollTop>0){
			banner.scrollTop=0;
		}else{
			banner.scrollTop=119;
		};
	},3000)
	//$('.prolist a').click(function(){
	//	var pid=$(this).attr('pid');
	//	$('body').append('<div id="info"></div>');
	//	$('#info').animate({marginLeft:'-250px',width:'500px'},500,function(){
	//		$('#info').animate({marginTop:'-150px',height:'300px'},400,function(){
	//			$('#info').append('Loading...');
	//			$.get('proinfo.asp?times='+new Date().getTime(),{pid:pid},function(data){
	//				var m=$(data).find('img').length;
	//				if(m>0){
	//					$('#info').html(data);
	//					complete=true;
	//					var s=setInterval(function(){
	//						$('#detail img').each(function(){
	//							if(this.readyState!='complete'){
	//								complete=false;
	//							};
	//						});
	//						if(complete){
	//							$('#detail').show();
	//							$('#detail img').each(function(){
	//								var h=$(this).width();
	//								if(h>475){
	//									$(this).width(475);
	//								};
	//							});
	//							clearInterval(s);
	//						};
	//					},1000);
	//				};
	//				$('#info #title img').click(function(){
	//					$('#info').remove();
	//				});
	//			});
	//		});
	//	});
	//	return false;
	//});
	$('.left a[fid]').click(function(){
		$(this).blur();
		var fid=$(this).attr('fid');
		var h=$('#'+fid).find('a').length*16;
		//$('.smenu').each(function(){
		//	if($(this).css('display')!='none'){
		//		$(this).animate({height:1},500,function(){
		//			 $(this).hide();
		//		});
		//	};
		//});
		if($('#'+fid).css('display')!='none'){
			$('#'+fid).animate({height:1},500,function(){
				$('#'+fid).hide();
			});
		}else{
			$('#'+fid).show().animate({height:h},500);
		};
	});
});