// JavaScript Document
$(function(){
	if($('.leaf').length>0){
		DD_belatedPNG.fix(".leaf,background");
		$('.leaf').show();
	}
	if($('.form_box').length>0){
		DD_belatedPNG.fix(".form_box,background");
	}
	if($('.header .nav').length>0){
		DD_belatedPNG.fix(".nav a,background");
	}
	if($('.intro .right').length>0){
		DD_belatedPNG.fix(".intro .right,background");
	}
	if($('#indexFl').length>0){
		// <![CDATA[	
		var so = new SWFObject("flash/index.swf", "sotester", "100%", "100%", "8");
		so.addParam("scale", "noscale");
		so.addParam("allowFullScreen", "true");
		so.addParam("allowScriptAccess", "always");
		so.addParam("wmode", "transparent");
		so.addVariable("path", "flash/xml/index.xml");
		so.write("indexFl");
		// ]]>
	}
	if($('#flash_entrance').length>0){
		// <![CDATA[	
		var so = new SWFObject("/ayty/flash/right_menu.swf", "sotester", "100%", "100%", "8");
		so.addParam("scale", "noscale");
		so.addParam("allowFullScreen", "true");
		so.addParam("allowScriptAccess", "always");
		so.addParam("wmode", "transparent");
		so.addVariable("path", "/ayty/flash/xml/right_menu.xml");
		so.write("flash_entrance");
		// ]]>
	}
	/*不同用户登陆表切换 */
	$(".form_box li a").each(function(i){
		$(this).hover(function(){
			$(this).addClass("on").parent().siblings().children("a").removeClass("on");
			$(".form_box form").eq(i).show().siblings("form").hide();
		});
	});
	/*登陆框弹出/隐藏 */
	$(".login").click(function(){
		$("#login").fadeIn("slow");
		$("#login li a").eq(0).hover();					   
	});
	$(".reg").click(function(){
		$("#reg").fadeIn("slow");					   
	});
	$(".form_box .close").click(function(){
		$(".form_box").fadeOut("slow");					   
	});

});
