﻿$(document).ready(function(){
	/*IE6.0浏览器提示版本过低*/
	if($.browser.msie && $.browser.version == "6.0"){
		alert("Please Upgrade Browser\nThe version of your web browser is too low for ByGamer.com. Some features and functionality may not work as designed. You may continue to browse the site, but we encourage you to upgrade your browser to take full advantage of your services.");
	}
	document.getElementById("quickGame").onchange();
	
	var incLogin = $("#incLogin");
	$.ajax({
		type: "GET",
		url: "/ajax/verifyLogin.cfm",
		cache: false,
		beforeSend: function(){
			incLogin.addClass("incLoginLoader");
		},
		success: function(data){
			incLogin.removeClass("incLoginLoader").html(data);
		}
	});
	
	/*首页轮换广告(若要增加或减少图片数量，需要重新调整参数,具体参数说明请参照jquery.d.imagechange.js)*/
	$("#banner").d_imagechange({
		data:_data,
		width:750,
		height:232,
		title:false,
		btnWidth:227,
		btnHeight:29,
		btnMargin:18,
		btnFontSize:18,
		bgHeight:38,
		playTime:4000,
		btnBackgroundClass:'indexAdBkg',
		btnBackgroundClass2:'indexAdBkg2',
		animateStyle: 'o'
	});
})

function switchNews(a,b,c){
	if(a == "WOWNews")
		$("#"+a).addClass("jsHightlightLong");
	else
		$("#"+a).addClass("jsHighlight");
		
	$("#"+b).removeClass("jsHighlight").removeClass("jsHightlightLong");
	$("#"+c).removeClass("jsHighlight").removeClass("jsHightlightLong");
	$("."+"s_"+a).removeClass("jsHide");
	$("."+"s_"+b).addClass("jsHide");
	$("."+"s_"+c).addClass("jsHide");
}

function BestToHot(a,b)
{
	$("#bym_cp_"+a).removeClass("hide");
	$("#bym_cp_"+b).addClass("hide");
	
	$("#"+a+"Nav").removeClass("bym_btn").addClass("bym_btn_active");
	$("#"+b+"Nav").removeClass("bym_btn_active").addClass("bym_btn");
}
