
// 共通処理の実行
$(document).ready(function(){	
	$('#topVisual').hide();	//静止画visualとナビ・ロゴ非表示
	$('#topNav').css('marginTop','-500px');	//ロゴ・ナビを画面外に移動
});	//END ready



// 関数定義
/* ビジュアルのフェードイン＋ロゴ出現アニメーション */
function animateIndex(){
	//ローディング非表示
	$('#topV1').empty().hide();	//loading＋Flashを削除
	$('#topV2').show();	//画像エリア表示
	// ビジュアル画像の出現
	$('#topVisual').delay(800).fadeIn(
		{duration:500,easing:"swing",
		//ビジュアル出現後、ロゴ出現
		complete: function(){
			$('#topNav').show().animate(
				{marginTop:0},
				{duration:1000,easing:"easeOutQuart"}
			);
		} //END complete
	}); //END fadeIn
	return false;
}


/* 画像表示アクション関数 */
function viewIndex(val){
	//alert(val);
	// [1] Flashを最後まで再生したとき	⇒ .htmlに記載のデフォルト#bnrをすぐに表示
	if(val == 9999){
		$('#topV1').empty().hide();	//Flashを削除
		$('#topV2').show();	//画像エリア表示
		$('#topVisual').show();	//画像表示＋ロゴ出現アニメ
		$('#topNav').show().animate(
			{marginTop:0},
			{duration:1000,easing:"easeOutQuart"}
		);	
	}
	// [2] Flashをスキップしたとき		⇒ .htmlに記載のデフォルト#bnrをフェードイン表示
	else if(val == 9998){
		animateIndex();
	}
}

// [3] Flash非表示(同一サイトから遷移)の場合:			⇒ランダム画像表示




