/*-------------------------------------------------------
* 说明：基于jQuery编写
* 作者：Gavin
* 创建时间：2008-10-27
* 最后一次修改时间：2008-12-25 
-------------------------------------------------------*/

$(document).ready(function(){
	
	//首页Tag
	$("#tagsBar li:first").toggleClass("current1");
	
	var temp=0;
	var over=0;
	$("#tagsBar").find("li").each(function(i){
		$(this).mouseover(function(){
			over=i;
			
			if(over!=temp){
				$("#tagsBar li:eq("+over+")").toggleClass("current"+(over+1));
				$("#tagsBar li:eq("+temp+")").toggleClass("current"+(temp+1));
				$("#tagsContent div.tagsContent:eq("+over+")").show();
				$("#tagsContent div.tagsContent:eq("+temp+")").hide();
				temp=over;
			}
		});	
	});
	$(".tagsContentDiv:first").css("border-left","none");
	
	initMenu();
	
	//登录框无内容的时候显示"用户名..."
	var strForEmpty="用户名...";
	$("#login .text:lt(2)").val(strForEmpty);
	$("#login .text:lt(2)").focus(function(){
		if($(this).val()==strForEmpty){
			$(this).val("");
		}
	}).blur(function(){
		if($(this).val()==""){
			$(this).val(strForEmpty);
		}
	});
	
	$(".map ul").find("li:last").addClass("lastChild");
	
});	




