if(top.location != self.location){top.location = self.location}

$(function(){
	//搜索
	$("#sech").submit(function(){
		var s_v=$("#s_v").attr("value");
		var urt=$("#s_v").attr("t");
		if(s_v!="cate"){
			var s_c=parseInt($("#s_c").attr("value"));
			if(s_c>10000 && s_c<2000000000) location.href=urt+s_v+'-'+s_c+'/';
			else alert('您输入QQ号不正确');
		}else{
			var s_c=$("#s_c").attr("value");
			$.get("/q/js.php?urlcode="+s_c,function(t){
				location.href=urt+s_v+'-'+t+'/';
			});
		}
		return false;
	});
	
	//折叠
	$(".cl h1,.cr h1").click(function(){
		$(this).parent().find("ul").toggle();
		$(this).toggleClass("c_h12");
	});
	
	//留言
	$(".ly h1").mouseover(function(){
		$(this).children("b").css("display","block");
	}).mouseout(function(){
		$(this).children("b").css("display","none");
	});

	$("#bdat").load("http://www.baidu.com/s?wd=520.at&rn=1&r="+Math.random());
	//日志
	$(".list h1:odd").css("background","#EEEEEE");

	//riall
	$(".wu").prepend('<div class="rti"><a>关闭</a></div><h1><b>日</b><b>一</b><b>二</b><b>三</b><b>四</b><b>五</b><b>六</b></h1>');
	$(".ri h3").mouseover(function(){
		$(".ri").find('.wu:gt(5)').css("left","-169px");
		$('.wu').css("display","none");
		$(this).parent().children('.wu').css("display","block");
		$(".ri ul").css("position","static");
		$(this).parent().css("position","relative");
		$(".ri h3").css("background","#F0F7FF");
		$(this).css("background","#908E8E");
		$(".wu h2 a").attr("target","_blank");
		$(".rti u").remove();
		$(this).parent().find(".wu .rti").append('<u>'+$(this).parent().parent().children("b").text()+$(this).parent().children("h3").text()+'</u>');
	});
	$(".rti a,.ri>b").click(function(){
		$('.wu').css("display","none");
		$(".ri h3").css("background","#F0F7FF");
	})
});