	//获取高度，动态设置右边菜单栏高度
    window.onload = function(){
		$t_main_left = $('.t_main_left').height();
		if($t_main_left != null){
			$main_right = $('.main_right').height();
			$main_left = $('.t_main_left').height();
			if($main_left > $main_right){
				$('.main_right').css("height",$main_left);
			}else{
				$('.t_main_left').css("height",$main_right);
			}
		}else{
			$main_right = $('.main_right').height();
			$main_left = $('.main_left').height();
			if($main_left > $main_right){
				$('.main_right').css("height",$main_left);
			}else{
				$('.main_left').css("height",$main_right);
			}
		}
		
		//左栏内
		$two_area_l = $('.two_area_l').height();
		$two_area_r = $('.two_area_r').height();
		if($two_area_l > $two_area_r){
		$('.two_area_r').css("height",$two_area_l);
		}else{
		$('.two_area_l').css("height",$two_area_r);
		}
	
		//邀请按钮
		$(".invite_img").mouseover(function(){
			$(".invite_img").css("display","none");
			$(".invite_move_img").css("display","block");
		});
		$(".invite_move_img").mouseout(function(){
			$(".invite_move_img").css("display","none");
			$(".invite_img").css("display","block");
		});
			
		//订阅消息
		$('.sub_text').focus(function(){
			var sub_text = $('.sub_text').val();
			if(sub_text == "请输入您的E-Mail..."){
				$('.sub_text').val("");
			}
		});
		
		$('.sub_button').click(function(){
			var sub_text = $('.sub_text').val();
			if(sub_text == "" || (sub_text != "" && !/.+@.+\.[a-zA-Z]{2,4}$/.test(sub_text))){
				$('.sub_button + span').html('请输入正确的Email');
			}else{
				$.post("http://www.wetuan.com/sub.php",{
					email: $('.sub_text').val()
					},function (data, textStatus){
					if(data == "0"){
						$('.sub_button + span').html('恭喜您，成功订阅！');
					}else{
						$('.sub_button + span').html('抱歉，该邮箱已参与订阅');
					}
				});
			}			
		});
		
		//猜猜猜
		$('.guess_button').click(function(){
			if($('.userdiv').html()){
				var select = $(':radio[checked]').val();
				if(!select){
					$('.guess_button + span').html('！请在上面列表中选择您猜的项目～');
				}else{
					$.post("guess.php",{
						guess: $(':radio[checked]').val(),
						userid: $('.userid').val()
						},function (data, textStatus){
						if(data == "1"){
							$('.guess_button + span').html('提交成功喽，希望你能猜对哦～');
						}else{
							$('.guess_button + span').html('抱歉，提交错误，你可能已经猜过了');
						}
					});
				}
			}else{
				$('.guess_button + span').html('！请先登录围团网，才可以竞猜哦～');
			}		
		});
		
	}

	function _fc(){
		//January February March April May June July August September October November December
		var endtime=new Date(overtime+" 00:00:00");
		var nowtime = new Date();
		var leftsecond=parseInt((endtime.getTime()-nowtime.getTime())/1000);
		if(leftsecond<0){leftsecond=0;}
		__d=parseInt(leftsecond/3600/24);
		__h=parseInt((leftsecond/3600)%24);
		__m=parseInt((leftsecond/60)%60);
		__s=parseInt(leftsecond%60);
		//__all = __d+"天"+__h+"小时"+__m+"分"+__s+"秒";
		if(__d == 0){
			__all = "还剩"+__h+"小时"+__m+"分"+__s+"秒";
		}else{
			__all = "还剩"+__d+"天"+" "+__h+":"+__m+":"+__s;
		}
		$(".fc").html(__all);
	}
	
	function orderinfo_open(id){
		$('.orderinfo').hide();
		$(id).show();
	}
	
	function orderinfo_close(id){
		$(id).hide();
	}
	
	function inviteinfo_open(id){
		$('.inviteinfo').hide();
		$(id).show();
	}
	
	function inviteinfo_close(id){
		$(id).hide();
	}
	
	function fahuoinfo_open(id){
		$('.fahuoinfo').hide();
		$(id).show();
	}
	
	function fahuoinfo_close(id){
		$(id).hide();
	}