$(function() {
	
	//CATEGORY TOP
	$(".ctop").each(function(){
		$('#standings-mini tbody').find('tr:even').addClass('odd');
	});

	//SCHEDULE
	$(".schedule").each(function(){
		$('#calender-list tbody').find('tr:even').addClass('even');
	});

	//-----------------------------------
	//SCORE
	//縞々カラーのテーブル
	$('.zebra').find('tr:even').addClass('even');
	$('.pitcher-t').find('tr:last').addClass('total');
	$('.batter-t').find('tr:last').addClass('total');
	$('.progress-batter table tr td:last').addClass('last');
	$('.progress-batter table tr td:nth-child(3)').addClass('batter-name');
	$('.progress-batter table tr td:nth-child(5)').addClass('result');
	$('.bench-container table tr td:nth-child(2)').addClass('name');
	
});

//-------------------------------
// スコアボード表示用
var tgScoreUtil = {
	
	//メインのスコア表示用
	addScoreBoard : function( visitorFlg ){
		
		var swf = visitorFlg ? "/game/score/swf/score_visitor.swf" : "/game/score/swf/score.swf";
		//var swf = "/game/score/swf/score_off.swf";
		
		swfobject.embedSWF( swf, this.targetID, "780", "463", this.version, "/common/swf/expressInstall.swf", null, this.params, null, function(e){
			if ( e.success == false ) {
				// no Flash
			}
		});
	},
	
	//カテゴリトップのスコア表示用
	addScoreBoardMini : function( scoreFile, bannerFile ) {
		
		var swf = "/game/score/swf/score_result_top.swf";
		//var swf = "/game/score/swf/score_result_top_off.swf";
		
		var sFile = scoreFile ? scoreFile : "/game/score/flash/score_data.txt";
		
		var bFile = bannerFile ? bannerFile : "/game/score/flash/flash_banner.dat";
		
		var fv = {
			scoreFilePath : sFile,
			bannerFilePath : bFile
		};
		
		swfobject.embedSWF( swf, this.targetID, "720", "278", this.version, "/common/swf/expressInstall.swf", fv, this.params, null, function(e){
			if ( e.success == false ) {
				// no Flash
			}
		});
	},
	
	//試合結果のスコア表示用
	addScoreBoardMini2 : function( scoreFile ) {
		
		var swf = "/game/score/swf/score_result.swf";
		
		var sFile = scoreFile ? scoreFile : "/game/score/flash/score_data.txt";
		
		var fv = {
			scoreFilePath : sFile
		};
		
		swfobject.embedSWF( swf, this.targetID, "688", "142", this.version, "/common/swf/expressInstall.swf", fv, this.params, null, function(e){
			if ( e.success == false ) {
				// no Flash
			}
		});
	},
	
	//swfobject default params object
	params : {
		menu: "false",
		wmode: "opaque",
		align: "BL"
	},
	
	//target version
	version : "8",
	
	//target id
	targetID : "scoreBoard"
	
};

