//-------------------------------------
//这里是自定义的javaScript代码，包括各种插件

//下边是关于jQuery的代码
// 开始符号
jQuery(function(){

//块高度相等的代码  left的高度等于container的高度

   var right = jQuery(".right").height();
var container = jQuery(".container").height();
   	 jQuery(".right").height(container);
var left_ = jQuery(".left").height();
var right = jQuery(".right").height();
   	 jQuery(".left").height(right);   


//--------------------------------------------
   //鼠标划过，显示背景色

   
   jQuery(".gy_lb_table").hover(function(){
      jQuery(this).addClass("gylb");
   },function(){
      jQuery(this).removeClass("gylb");
   }) 
  
//--------------------------------------------
   //回复框
   jQuery(".lb_hfk_tc").hide(); 
   jQuery(".gylb_button a:contains(回复)").click(function(){
      jQuery(".lb_hfk_tc").show();
   })
   jQuery("#hide_hfk").click(function(){
      jQuery(".lb_hfk_tc").hide(); 
   })
   //隐藏回复框
   jQuery(".lb_hfk_tc img").click(function(){
		jQuery(".lb_hfk_tc").hide(); 		
		});
  
  //回复框标题调用列表个人名称  
   var hf_title = jQuery(".gy_lb_table_text_title a:eq(1)").text();
//--------------------------------------------   

   //热词话题，折叠效果
   jQuery(".reci_box_title a").toggle(function(){
        jQuery(".reci_box_a").hide();
		jQuery(this).attr("class","reci_box_title_right1");
					//以下代码是为了保证[.right]高度不变形
					var _left = jQuery(".left").height();
   					var _right = jQuery(".right").height();
					if(_left>_right){
				 	 jQuery(".right").height(_left); 
			   			}else{
				   	 jQuery(".left").height(_right);
			   			}
	},function(){
	    jQuery(".reci_box_a").show();
		jQuery(this).attr("class","reci_box_title_right2");
	})


//--------------------------------------------
   //热词鼠标划过弹出菜单  鼠标划过展开和折叠
   /*jQuery(".rc_kj").hover(标准示例
			function(){jQuery(".ceshi").slideToggle(800);},
			function(){jQuery(".ceshi").slideUp(1000)}
			)*/
   jQuery(".rc_kj").mouseover(function(){
			jQuery("#left_ul").slideToggle("fast");
			})
   jQuery("html").click(function(){
			jQuery("#left_ul").slideUp("fast");					 
			})


	 
//--------------------------------------------
   //注册弹窗
   jQuery("#zhuCe").click(function(){
	  jQuery(".zhu_ce").show();					   
	})
   jQuery("#quit_login").click(function(){
	  jQuery(".zhu_ce").hide();									
	})
//--------------------------------------------
   //缩略图放大和旋转关闭等等
   jQuery("#photo_x2").click(function(){
	   var photo_d = "<div id='photo_d'><div><div id='left_90'></div><div id='quit_photo'></div><div id='right_90'></div></div><img id='photo' src='img/pic_d.jpg' width='470' height='348'/></div>";
	   jQuery(".lie_biao_slt").append(photo_d);
	   jQuery(".lie_biao_slt img:eq(0)").hide();   
	    jQuery("#photo").click(function(){
			   jQuery("#photo_d").remove();
			   jQuery("#quit_photo").remove();
			   jQuery("#left_90").remove();
			   jQuery("#right_90").remove();
			   jQuery(".lie_biao_slt img:eq(0)").show(); 
		  })
		  jQuery("#left_90").click(function(){
					jQuery("#photo").rotate({angle:-90});					
					   })
			        
		  jQuery("#quit_photo").click(function(){
					jQuery("#photo").rotate({angle:0}) 
					   })
		  jQuery("#right_90").click(function(){
					   jQuery("#photo").rotate({angle:90});
	       		})		 		
   })
//--------------------------------------------
   //分组框
   //关注按钮
   jQuery("#grzy_button00").click(function(){
		jQuery(".grzy_gzt").show();
			jQuery("#fz_middle_quit").click(function(){
				jQuery(".grzy_gzt").hide();
			})		
						   })
   
   jQuery(".fz_middle_top a").click(function(){
        jQuery(".grzy_gzt").hide();
		jQuery("#cao_zuo_cheng_gong").show("slow").animate({top:"0px"},3000).hide("slow");//.animate({top:"0px"},1000)延迟1秒在播放后面的动画
		jQuery(".grzy_right_heand_button00").hide();
//		jQuery(".guan_zhu_zhong").show();
		jQuery(".grzy_right_heand_button02").show();
		})
   
   //新建分组功能
   jQuery("#fz_xin_jian").click(function(){
	    jQuery("#newgroup").val('');
	    jQuery(".fz_xin_jian a").hide();
		jQuery("#fz_name").show();
		});
//   jQuery("#fz_name_button").click(function(){
//	   
//											
//		});
   
   //提示图片 “跟随后他的微博会出现在你的首页”
   jQuery(".grzy_right_heand_button00 span").mouseover(function(){
		var tishi_pic = "<div class='tishi_pic00'></div>";
		jQuery(".grzy_right_heand_button00").append(tishi_pic);
						   });
		jQuery(".grzy_right_heand_button00 span").mouseout(function(){
		jQuery(".tishi_pic00").hide();
		});
   //解除关注
//   jQuery("#grzy_button02").click(function(){
//		jQuery(".grzy_right_heand_button02").hide();
//		jQuery(".grzy_right_heand_button00").show();
//		jQuery(".guan_zhu_zhong").hide();
//		jQuery("#cao_zuo_cheng_gong").show("slow").animate({top:"0px"},3000).hide("slow");
//    })
     
//--------------------------------------------
   //收起和展开
   jQuery("#zhan_kai").hide();
   jQuery("#shou_qi").click(function(){
		jQuery(".shou_qi").hide("slow");
		jQuery(this).hide();
		jQuery("#zhan_kai").show();
		   jQuery("#zhan_kai").click(function(){
			  jQuery(".shou_qi").show("slow");
		      jQuery(this).hide();
			  jQuery("#shou_qi").show();
				})
	})

//--------------------------------------------
   //聊聊回复框
   jQuery("#grzy_button01").click(function(){
		jQuery(".liao_liao").show();							   
		})
   jQuery("#liao_liao_bu").click(function(){
		jQuery(".liao_liao").hide();			   
		})
   
   //名人微博鼠标划过缩略图变大

   var x = 20;
   var y = 0;
    jQuery("a.aaa").mouseover(function(e){
		this.myTitle = this.title;
		this.title = "";
		var imgTitle = this.myTitle? "<br/>" + this.myTitle: "";
		var img_over = "<div id='imgid'><img src='"+ this.href +"'/> "+imgTitle+" </div>";
    jQuery("body").append(img_over);
        jQuery("#imgid").css({
						"top": (e.pageY+y) + "px",
						"left": (e.pageX+x) + "px"
						}).show("fast");	    
		
	});
    
	jQuery("a.aaa").mouseout(function(){
		this.title = this.myTitle;
		jQuery("#imgid").remove();								  
										  });
	jQuery("a.aaa").mousemove(function(e){
		jQuery("#imgid").css({
						"top": (e.pageY+y) + "px",
						"left": (e.pageX+x) + "px"
						});								  
										  });

	//私人收藏
    jQuery(".sr_bt").attr("title","设为私人收藏");
    jQuery(".sr_bt2").attr("title","设为公开收藏");
    jQuery(".fz_bt").attr("title","复制收藏地址(IE)");
	jQuery(".sc_bt").attr("title","删除收藏");


});//结束符号	
//--------------------------------------------
//
//上边是关于jQuery的代码 结束