   $(document).ready(function() {  
		//LoginChecker
		swfobject.embedSWF("./common/swf/userLoginChecker_renew.swf","loginchecker","10","10","9.0.0");

	   $(".modal a").fancybox({  
		   'hideOnContentClick': true  
	   });
	   $("a#custom_1, a#custom_2").fancybox({  
		   'zoomSpeedIn':  0,   
		   'zoomSpeedOut': 0  
	   });  
	   $("#login_bt").fancybox({
		   'width': 200,
		   'height': 224,
		   'autoScale': false,
		   'transitionIn': 'none',
		   'transitionOut': 'none',
		   'type': 'swf',
	   }); 
	   $("#regist_bt").fancybox({
		   'width': 460,
		   'height': 360,
		   'autoScale': false,
		   'transitionIn': 'none',
		   'transitionOut': 'none',
		   'type': 'swf'
	   }); 

	   $('#gotoContactPage').fancybox({
		   'width': 600,
		   //'height': 640,
		   'autoScale': false,
		   'transitionIn': 'none',
		   'transitionOut': 'none',
		   'type': 'ajax'
	   });

       $("#how2use").click(function() {
		$.fancybox([
			'./common/img/how2use/step1.png',
			'./common/img/how2use/step2.png',
			'./common/img/how2use/step3.png',
			'./common/img/how2use/step4.png',
			'./common/img/how2use/step5.png',
			{
				'href' : './common/img/how2use/step6.png',
			}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0
		});
	});

	if( $('#butai').height() < $('#gakuya').height() ){
		$('#butai').height( $('#gakuya').height() );

	}

});


   function getGroupItems(opts) {  
	   jQuery.each(imageList, function(i, val) {  
		   opts.itemArray.push(val);  
	   });  
   } 

//ASからログインユーザ情報取得。
      function receiveUserInfo(userInfo) {
		  //alert(userInfo.name);
		  //ログインパネルクローズ
		  $.fancybox.close();
		  //$("div#userInfo").empty().append(userInfo.name + '｜ <a id="logout_bt" href="#" onclick="logoutHandler()">LOG OUT</a>');
		  $("div#userInfo").empty().append('<img src="' + userInfo.imageUrl + '" alt="" width="31" height="31" border="0" />' + userInfo.name + '｜<span id="logout_bt" style="margin:0;padding:0;"></span>');
		swfobject.embedSWF("./common/swf/userLogoutHandler_renew.swf","logout_bt","82","18","9.0.0");

	  }
//ASからログインチェック情報取得。
      function receiveLoginCheckerInfo(loginUserInfo) {

		  $("div#userInfo").empty().append('<img src="' + loginUserInfo.imageUrl + '" alt="" width="31" height="31" border="0" />' + loginUserInfo.name + '｜<span id="logout_bt" style="margin:0;padding:0;"></span>');
		swfobject.embedSWF("./common/swf/userLogoutHandler_renew.swf","logout_bt","82","18","9.0.0");

	  }

//ASからログアウト情報取得。
      function receiveUserLogout(userInfo) {
		  //alert(userInfo.status);
		  if(userInfo.status == "success"){
			$("div#userInfo").empty().append('<a id="login_bt" href="./common/swf/userLoginPanel_renew.swf">LOGIN</a> ｜ <a id="regist_bt" href="./common/swf/RegistPanel_renew.swf">新規登録</a>');
		  } else{
			  alert('ログアウトできません。自動ログアウトした可能性がありますのでリロードしてみてください。');
		  }
	  }


//新規登録完了時のASからの指令
function receiveCloser(){
	//ログインパネルクローズ
	$.fancybox.close();	
}


