(function($){
	$().ready(function(){
		
		$("#btnSelect").bind("click",function(){
			if($("#sltType").css("display") == "none"){
				$("#sltType").fadeIn("fast");
				var top = "-" + (($("#sltType").height() - 22) / 2) + "px";
				$("#sltType").css("top",top);
			}else{
				$("#sltType").fadeOut("fast");
			}
		});
		$("#sltType a").bind("click",function(){
			$("#sltType a").each(function(){
				$(this).attr("class","");
			});
			$(this).addClass("current");
			$("#btnSelect").val($(this).text());
			$("#sltType").fadeOut("fast");
		});
		$("#navigator>li").bind("mouseover",function(){
			$(this).find("ul").show();
		});
		$("#navigator>li").bind("mouseout",function(){
			$(this).find("ul").hide();
		});
		$(".txt-search").focus(function(){
			$(this).val("");
			$(this).css("color","#333");
		});
		$(".txt-search").blur(function(){
			if($(this).val() == ""){
				
				$(this).val("...");
				$(this).css("color","#bebebe");
			}
		})
	})		  
})(jQuery)
function addfried (userid,user){
			$.ajax({
			url:"addfriend.asp",
			type:"POST",
			data:"user_id="+userid+"&user="+user,
			success:function(date){alert(date)},
			error:function(){alert("通信出错")}
		})			   
}
function addgj (userid,user){
			$.ajax({
			url:"addgj.asp",
			type:"POST",
			data:"user_id="+userid+"&user="+user,
			success:function(date){alert(date)},
			error:function(){alert("通信出错")}
		})
}
function showload(){
	$("<div id='masklayer'></div>").css({"width":$(document).width(),"height":$(document).height(),"background":"#000","opacity":"0.5","position":"absolute","top":"0","left":"0","z-index":"50"}).appendTo("body");
$(" <iframe src='kk.asp' scrolling='no' id='show_main'  frameborder='0'></iframe>").css({"width":328,"height":273,"position":"absolute","top":($(window).height()-270)/2,"left":($(window).width()-330)/2,"z-index":"51"}).appendTo("body");
		if(navigator.appVersion.split(";")[1]==" MSIE 6.0"){
			$("<iframe id='layerFrame'>")
				.css({"width":$(window).width(),"height":$(document).height(),"opacity":"0"})
				.appendTo("#masklayer");
		}
	}
function closel(){
	$("#masklayer").remove()
	$("#show_main").remove()
	}