// JavaScript Document
//監聽=======
$(document).ready(function() {
						   
	//置換各flash
	setTitle();
	setBack();
	setLogo();	
	setlimpid_Y_Flash();
	
	//設定常數
	setBroser();
	setStillV(ScaleSide);
	
	
	//計算頁面上各個的位置
	header_and_footer();
	
	//改變視窗大小時，相關的設定...
	$(window).bind("resize",header_and_footer);
		
	//menu
	menusetup();
	
	// footer 的展開與收縮
	$("#footer .tag").toggle(
		function () {
			footer_move(true);
		},
		function () {
			footer_move(false);
		}
	);	
	
	
	//footer slideshow 設定每3秒有slideshow的效果
	if($(".hot_news ul li").length>(Math.floor(($(".hot_news").width()+1)/420))){
		var setIntervalA = setInterval("newsSlideshow()", 8000);
		$(".hot_news ul li a").bind("mouseover",function(){clearInterval(setIntervalA);});
		$(".hot_news ul li a").bind("mouseout",function(){setIntervalA=setInterval("newsSlideshow()", 8000);});
	}
	
	//ajax監聽(loading圖)
	$("#loadingImg").bind("ajaxSend", function(){
	  $(this).show();
	  $("#loadingImg").css("width",$(".newslist ul").css("width")); //設定loading畫面的寬
	}).bind("ajaxComplete", function(){
	  $(this).hide();
	});
	//ajax==========================================
	newslistAjax(0);
	
	
	
});

