
jq(document).ready(function () {
 	var xz_str="";
	var hero_str="";
	var xtl_str="";
	var sh_str="";
	if(xz_str.length<=0){
		jq.ajax({
			type : "get",
	        dataType : "jsonp",
			url : CONTEXT_URI_DPI + "/rest/games/xz/servers?" + new Date().getTime(),
			success : function(json) {
				jq("#xz_list").html("");
				
			
			jq(json).each(function() {
				if(this.id!=26 && this.id!=24){
				if(this.status=='1'){
						xz_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+CONTEXT_URI_XZ+'/p/?s=platform&svrCode='+this.servCode+'" target="_blank" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
						if(this.servType=='0')
						xz_str+='新服 ';
						
						else if(this.servType=='1')
							xz_str+='火爆 ';
						xz_str+='</p>';
					
				}else if(this.status=='0'){
					xz_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="#this" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
						if(this.servType=='0')
						xz_str+='新服 ';
						
						else if(this.servType=='1')
							xz_str+='火爆 ';
						xz_str+='</p>';
				}
			}
				});
				
				jq("#xz_list").html(xz_str);
				
			},
			error : function (json) {
				alert("error");
			}
		});
	}else{
		jq("#xz_list").html("");
		jq("#xz_list").html(xz_str);
	}
	
	jq("#hero").mouseover(function(){
	//英雄之城
	if(hero_str.length<=0){
	jq.ajax({
		type : "get",
        dataType : "jsonp",
		url : CONTEXT_URI_DPI + "/rest/games/hero/servers?" + new Date().getTime(),
		success : function(json) {
			jq(".serverlist").html("");
		jq(json).each(function() {
			if(this.status=='1'){
					hero_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://dpi.yxqz.com/rest/hero-city/login/'+this.servCode+'" target="_blank" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					hero_str+='新服 ';
					
					else if(this.servType=='1')
						hero_str+='火爆 ';
					hero_str+='</p>';
				
			}else if(this.status=='0'){
				hero_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="#this" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					hero_str+='新服 ';
					
					else if(this.servType=='1')
						hero_str+='火爆 ';
					hero_str+='</p>';
			}
			});
			jq(".serverlist").html(hero_str);
			jq('.glist').hide();jq('.g1').show();
			
		},
		error : function (json) {
			alert("error");
		}
	});
}else{
	jq(".serverlist").html("");
	jq(".serverlist").html(hero_str);
			jq('.glist').hide();jq('.g1').show();
}
	});
	
	
	
	//玄天录
	/*	jq("#xtl").mouseover(function(){
	if(xtl_str.length<=0){
		jq.ajax({
		type : "get",
        dataType : "jsonp",
		url : CONTEXT_URI_DPI + "/rest/games/xtl/servers?" + new Date().getTime(),
		success : function(json) {
			
			
			jq("#xtl_list").html("");
		jq(json).each(function() {
			if(this.status=='1'){
					xtl_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://dpi.yxqz.com/rest/webgame/login/xtl/'+this.servCode+'" target="_blank" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					xtl_str+='新服 ';
					
					else if(this.servType=='1')
						xtl_str+='火爆 ';
					xtl_str+='</p>';
				
			}else if(this.status=='0'){
				xtl_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="#this" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					xtl_str+='新服 ';
					
					else if(this.servType=='1')
						xtl_str+='火爆 ';
					xtl_str+='</p>';
			}
			});
			jq("#xtl_list").html(xtl_str);
			jq('.glist').hide();jq('.g3').show();
		},
		error : function (json) {
			alert("error");
		}
	});
}else{
	jq("#xtl_list").html("");
	jq("#xtl_list").html(xtl_str);
			jq('.glist').hide();jq('.g3').show();
}
});


	
	//水浒
		jq("#sh").mouseover(function(){
			if(sh_str.length<=0){
	jq.ajax({
		type : "get",
        dataType : "jsonp",
		url : CONTEXT_URI_DPI + "/rest/games/sh/servers?" + new Date().getTime(),
		success : function(json) {
			
			
			jq("#sh_list").html("");
			
		jq(json).each(function() {
			if(this.status=='1'){
					sh_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://dpi.yxqz.com/rest/webgame/login/sh/'+this.servCode+'" target="_blank" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					sh_str+='新服 ';
					
					else if(this.servType=='1')
						sh_str+='火爆 ';
					sh_str+='</p>';
				
			}else if(this.status=='0'){
				sh_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="#this" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					sh_str+='新服 ';
					
					else if(this.servType=='1')
						sh_str+='火爆 ';
					sh_str+='</p>';
			}
			});
			jq("#sh_list").html(sh_str);
			jq('.glist').hide();jq('.g2').show();
			
		},
		error : function (json) {
			alert("error");
		}
	});
}else{
	jq("#sh_list").html("");
	jq("#sh_list").html(sh_str);
			jq('.glist').hide();jq('.g2').show();
}
});*/


	
	//星战
		jq("#xz").mouseover(function(){
	if(xz_str.length<=0){		
	jq.ajax({
		type : "get",
        dataType : "jsonp",
		url : CONTEXT_URI_DPI + "/rest/games/xz/servers?" + new Date().getTime(),
		success : function(json) {
			
			
			jq("#xz_list").html("");
		jq(json).each(function() {
			if(this.id!=26){
			if(this.status=='1'){
					xz_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://dpi.yxqz.com/rest/webgame/login/xz/'+this.servCode+'" target="_blank" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					xz_str+='新服 ';
					
					else if(this.servType=='1')
						xz_str+='火爆 ';
					xz_str+='</p>';
				
			}else if(this.status=='0'){
				xz_str+='<p align="left">&nbsp;&nbsp;<span class="ico ico_1_1">&nbsp;</span>&nbsp;&nbsp;'+this.netLineName+'&nbsp;&nbsp;&nbsp;&nbsp;<a href="#this" class="red">'+this.servName+'</a>&nbsp;&nbsp;';
					if(this.servType=='0')
					xz_str+='新服 ';
					
					else if(this.servType=='1')
						xz_str+='火爆 ';
					xz_str+='</p>';
			}
		}
			});
			jq("#xz_list").html(xz_str);
			jq('.glist').hide();jq('.g4').show();
			
		},
		error : function (json) {
			alert("error");
		}
	});
}else{
	jq("#xz_list").html("");
	jq("#xz_list").html(xz_str);
			jq('.glist').hide();jq('.g4').show();
}
});


});

