 //Black_win
runOnLoad(function(){
   $("#Black_win").fadeOut("slow");
   $("#flashcontent3").fadeIn("slow");
});



//new window open
function nw_open(url){
	window.open(url);	
} 
 

//news loading
function index_func(news_main) {  		
	news_main.find("a").click(function(){
		//alert($(this).attr("class"));		
	var xxx = $(this).attr("href");
		
		if ($(this).attr("class") == "thickbox") {
			
			//alert($(this).attr("href"));	
			 	
			return false;	
		}
		
		if ($(this).attr("class") == "backbt"){
		var url = "news.php";	
		act(url); 
		}
	
		else if ($(this).attr("class") == "newsbt"){
			var s = xxx.indexOf("?");
				 	url = "news.php" + xxx.substring(s);	
		act(url); 
		}
	
		else if (xxx.indexOf("http://") != -1)  {	
		nw_open(xxx);
		}
		
		else if ($(this).attr("id") == "comm") {		
		nw_open(xxx);		 
		}
		
		else {
		var url = $(this).attr("href");		
		act(url);
		}	
		
	
			function act(url) {
				news_main.hide('slow',function(){
					$(this).empty(); 
					$("#loading").show();
				   
						$.get(url,{}, function(response){ 
							$("#loading").hide();
								   
							news_main.append(response).fadeIn("slow");
							index_func(news_main);	     
						});                 
				});
			}		       
	return false;
	//}
	});
}		


//flash loading
function index_func3(div, url) {
	   	
	//alert("s 3" + "\n" + div.attr("id") + "\n" + url);
	div.hide('slow',function(){
	$(this).empty();
	$("#loading").show(); 
				   
		$.get(url,{}, function(response){
			$("#loading").hide(); 	   
			div.append(response).fadeIn("slow");
			index_func(div);
			$.ajax({
  				url: "lib/thickbox.js",
  				dataType: "script"
			});					  		     
		});                 
	});       
}


//fan zone page loading
function page13(xz) {
	if($.browser.opera == false) {
	$("#Black_win").show(); }
	location.href=xz;

			
}

//enter page loading
function index_func2() { 			
	var enter_img_img_f = $("#index_enter_img_f");
				
	enter_img_img_f.click( function(){
		if($.browser.opera == false) {
		$("#Black_win").show();
		}
			});	
}


//jq start
$(document).ready(function(){
  
if (page_id == 0){		
index_func2();		
}


else if (page_id == 1){
var id = $("#news_main");		
index_func(id);			
}

//jq end
});