
$(function(){
	$(document.body).addClass("bgBody");
	if (typeof index === "undefined") index = 0;
	$("#menu li:eq("+index+")").attr("id","cur");

	$("#searchForm").submit(function(){
		var s = document.getElementById("searchStr");
		var sv = String(s.value);
		if (/\s+/.test(sv) || sv.length === 0)
		{
			alert("ÇëÊäÈëËÑË÷×Ö·û´®!");
			s.focus();
			return false;
		}
		return true;
	});

	if (index != 0)
		$("#rightContainer img").each(function(){if (this.width>600) this.width = 600;this.onload=function(){if(this.width>600) this.width=600;};});
	$("#rightContainer a[href$='#footer']").click(function(){
		$("#footer").animate({fontSize:'2em'},"fast").animate({fontSize:'1em'},"fast");
	});
});