	AA(function(){
		var t = n = 0, count = AA("#topics li").size();

			AA("#topics li:not(:first-child)").hide();
			AA("#topicInfo").html(AA("#topics li:first-child").children("p").text());
			AA("#topicNav li:first-child").addClass("now");
			AA("#topicNav li").click(function() {
				var i = AA(this).text() - 1;
				n = i;
				if (i >= count) return;
				AA("#topicInfo").html(AA("#topics li").eq(i).children("p").text());
				AA("#topicInfo").unbind().click(function(){window.open(AA("#topics li a").eq(i).attr('href'), "_blank")})
				AA("#topics li").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
				AA(this).addClass("now").siblings().removeClass("now");
			});
			t = setInterval("showAuto()", 3500);
			AA("#stick").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 4000);});
		});
	function showAuto()
		{	
			n = n >= (count - 1) ? 0 : ++n;
			AA("#topicNav li").eq(n).trigger('click');
		}
	
	AA(function(){
//发表新帖下拉菜单
			AA('#postNewT, #postNewB').hover(
				function(){AA('p', this).stop(false, true).slideDown(400);},
				function(){AA('p', this).stop(false, true).slideUp(200);}			
				);

			AA('#columnRule').hover(
				function(){AA('h3', this).stop(false, true).css('border-color', '#B5E026').next('p').stop(false, true).slideDown(400);},
				function(){AA('h3', this).stop(false, true).css('border-color', '#FFF').next('p').stop(false, true).slideUp(200);}
				);

//树形目录点击展开
			AA('#menu > dt:not(".close")').toggle(
				function(){ AA(this).css('background-position', '-263px 8px').next('dd').stop(false, true).slideUp(200);setleftmenu(this.id,1);},
				function(){ AA(this).css('background-position', '-263px -13px').next('dd').stop(false, true).slideDown(400);setleftmenu(this.id,0);}			
			);
			AA('#menu > dt.close').next('dd').hide();
			AA('#menu > dt.close').toggle(
				function(){ AA(this).css('background-position', '-263px -13px').next('dd').stop(false, true).slideDown(400);setleftmenu(this.id,0);},
				function(){ AA(this).css('background-position', '-263px 8px').next('dd').stop(false, true).slideUp(200);setleftmenu(this.id,1);}	
			);
			if(!AA.browser.msie){
				AA('#menu dd').children('a:not(".current")').hover(function(){AA(this).stop(false, true).animate( { paddingLeft: '8px' } , 300 );},
					function(){AA(this).stop(false, true).animate( { paddingLeft: '0' } , 150 );});
			}
							
			AA("a[href^='http://']").attr("target", "_blank");
	});
function setleftmenu(cl,op){
	AA.getJSON('/forum/include/setsideleft.php?cl='+cl+'&op='+op,function(R){
		return true;
	});
}