//推荐公会弹窗
(function($){
$.fn.floatBox = function(){
	var _this = this;
	//var height = _this.height();
	this.fadeIn(1200);
	//onBottom(height);
	$(".close",this).click(function(){
		_this.hide();
		return false;
	});
	/*function onBottom(height){
		var windowHeight = $(this).height();
		_this.css('top',($(window).scrollTop()+windowHeight-height).toString()+'px');
		$(window).scroll(function(){
			
			//_this.css('top',($(this).scrollTop()+windowHeight-height).toString()+'px');
		});
	}*/
	_this.commonGroup();
}

$.fn.commonGroup = function(){
	var _this = this;
	$(".nav a",this).each(
		function(i){
			$(this).click(function(){
				$(".inner",_this).hide();
				$(".body" + (i+1),_this).show();
				$(".nav li").removeClass('active');
				$(this).parent().addClass('active');
				return false;
			});
		}					  
	);
	$("#inGame").click(function(){
		var id = $("#serverId").val();
		$(this).attr('href','/games_center/play/server_id/' + id);
		return true;							
	});
}
})(jQuery)
$(function(){
	setTimeout(function(){$("#commonGroup").floatBox()},200);		   
})

