

//▼Header挿入分CSS

$('head').append('<style type="text/css">.fadein {display:none;}#entryform {display:none;}#footer_area {bottom:-60px;}#footer_area_member {bottom:-180px;}#login_open_btn {margin-top:-20px;}#login_window {display:none;} #login_window_top {display:none;}#reg_window {display:none;} #standard_table {display:block;} #member_table {display:none;} #point_table {display:none;} #new_block {display:none;} #new_block_pass {display:none;} #new_block_name {display:none;} #message_box {display:none;}</style>')


// ▼ロールオーバー用 ******************************************

$(function(){
	
	// 自動置き換え「_r」
	
	$("img.roll").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"));
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_r(\.[a-z]+)$/, "$1$2"));
		
	// 画像のプリロード
	
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"));
	});
	
});


// ▼画面フェードイン ******************************************

$(function(){
	//$("body").fadeIn("slow");	
	
	$(".fadein").fadeIn("slow",function(){
		// ▼トップエントリー部フェードイン ******************************************
		//$("#entryform:not(:animated)").animate({
		//			marginTop : "400px"
		//		},500,"swing");
	});
});

// ▼アンカースムーズスクロール ******************************************

jQuery(function($){
	$('a[href^="#"]').click(function(){
		$('html, body').animate(
			{ scrollTop : $($(this).attr('href')).offset().top }
		, 1800 ,"easeOutQuart");
		return false;
	});
});


// ▼通常idで飛ぶアンカースムーズスクロール ******************************************

function scrollToAnchor() {
	$("a[href*=#]").click(function() {
		var target = this.hash;
		var offset = $(target).offset().top;
		if (offset > $(document).height()-$(window).height()) {
			offset = $(document).height()-$(window).height();
			}
		$("html, body").animate({scrollTop:offset}, {duration:1000, easing:"easeOutQuart"});
		return false;
	});
}



// ▼スクロールすると「ページトップへ」ボタンが出現 ******************************************

var scrolltotop={

	//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
	setting: {startline:100},

	state: {isvisible:false, shouldvisible:false},

	togglecontrol:function(){

		var scrolltop=jQuery(window).scrollTop()

		this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false
		if (this.state.shouldvisible && !this.state.isvisible){
			jQuery("#btn2pagetop").fadeIn("fast");
			this.state.isvisible=true;

		}
		else if (this.state.shouldvisible==false && this.state.isvisible){
			jQuery("#btn2pagetop").fadeOut("fast");
			this.state.isvisible=false;
		}
	},

	init:function(){
		jQuery(document).ready(function($){
			jQuery("#btn2pagetop").hide();
			var mainobj=scrolltotop;

			$(window).bind('scroll resize', function(e){
				mainobj.togglecontrol();
			})
		})
	}
}
scrolltotop.init();

// 独自のアンカースムーズスクロール

$(function(){
	$("#btn2pagetop").click(function(){
		$((navigator.userAgent.indexOf("Opera") != -1) ? document.compatMode == 'BackCompat' ? 'body' : 'html' :'html,body').animate({scrollTop:0}, 'slow');
	})
})

// ▼inputラベル用 ******************************************
    	
$(function(){
		$("label").inFieldLabels();
});

// ▼エントリー部 ******************************************
    	

		
	$(function(){
		
			//チェックボックス
			$("input#rule").click(function() {
				if($(this).attr('checked') == true) {
					//checked=true
					$("p#mini:not(:animated)").fadeOut();
				} else {
					//checked=false
					$("p#mini:not(:animated)").fadeIn();
				}
			});
			
		//トップページ	
		
			//CLOSEボタン
			$("#entryform #closebtn").click(function(){
				$("#entryform:not(:animated)").fadeOut("slow",function(){
					$("#openbtn").fadeIn("slow");
					});
				});
			
			//OPENボタン
			$("#openbtn").click(function(){
				$("#entryform").css("margin-top","400px");
				$("#entryform:not(:animated)").fadeIn("slow",function(){
					$("#openbtn").fadeOut("slow");
					});
				});
				
			//OPENボタン2
			$("#reg_open_btn").click(function(){
				$("#entryform:not(:animated)").fadeIn("slow");
				$("#entryform:not(:animated)").animate({
						marginTop : "340px"
					},300,"swing");
				});	
		
		//通常ページ
					
			//CLOSEボタン
			$("#closebtn").click(function(){
				$("#reg_window:not(:animated)").fadeOut("slow",function(){
					//$("#reg_open_btn").show();
					});
				});
			
			//OPENボタン
			$("#reg_open_btn").click(function(){
				$("#reg_window:not(:animated)").fadeIn("slow",function(){
					//$("#reg_open_btn").hide();
					});
				});		

	});

// ▼ ログインウィンドウ部 ******************************************	
        
		//トップページ
		
		$(function(){
			
			
			//OPENボタン
			
			    // hover用
				
				//$("#login_open_btn_top").hover(function(){
				//	$(this).css({
				//		background: "url(img/login_open_top_r-trans.png) no-repeat"
				//	});
				//	$("#login_open_btn_top:not(:animated)").animate({
				//		marginLeft : "825px",
				//		width : "65px"
				//	},300,"swing");
				//},
				//function(){
				//	$(this).css({
				//		background: "url(img/login_open_top-trans.png) no-repeat"
				//	});
				//	$("#login_open_btn_top:not(:animated)").animate({
				//		marginLeft : "835px",
				//		width : "55px"
				//	},300,"swing");
				//});
			
				$("#login_open_btn_top").toggle(function(){
					$(this).css({
						background: "url(/img/login_open_top_r-trans.png) no-repeat"
					});
					$("#login_open_btn_top:not(:animated)").animate({
						marginLeft : "590px" ,
						width : "300px"
					},100,"swing");
					//ログインウィンドウ本体
					$("#login_window_top:not(:animated)").fadeIn("slow");
				},function(){
					$(this).css({
						background: "url(/img/login_open_top-trans.png) no-repeat"
					});
					$("#login_open_btn_top:not(:animated)").animate({
						marginLeft : "835px",
						width : "55px"
					},100,"swing");
					//ログインウィンドウ本体
					$("#login_window_top:not(:animated)").fadeOut();
				});
			
			//CLOSEボタン
			
			//$("#login_window_top #closebtn").click(function(){
			//	$("#login_window_top:not(:animated)").fadeOut()
			//	$("#login_open_btn_top").css("background","url(img/login_open_top-trans.png) no-repeat");
			//	$("#login_open_btn_top:not(:animated)").animate({
			//		marginLeft : "835px",
			//		width : "55px"
			//	},100,"swing");
			//});
			
						
		});
		
		
		
		//通常ページ
		
		$(function(){
			
			//OPENボタン
			
			$("#login_open_btn").toggle(function(){
					$(this).css({
						background: "url(img/login_open_btn_r-trans.png) no-repeat"
					});
					$("#login_open_btn:not(:animated)").animate({
						marginTop : "0"
					},100,"swing");
					//ログインウィンドウ本体
					$("#login_window:not(:animated)").fadeIn("slow");
				},function(){
					$(this).css({
						background: "url(img/login_open_btn-trans.png) no-repeat"
					});
					$("#login_open_btn:not(:animated)").animate({
						marginTop : "-143px"
					},100,"swing");
					//ログインウィンドウ本体
					$("#login_window:not(:animated)").fadeOut();
			});
									
		});

// ▼ 的中実績  ******************************************			

$(function(){
	
	//var timerID = setInterval(function(){
	//	$("#carouselNext").click();
	//},5000);
	
	//$("#carouselPrev,#carouselNext").click(function(){
	//	clearInterval(timerID);
	//});
	
	$("#carouselInner").css("width",950*$("#carouselInner ul.column").size()+"px");
	$("#carouselInner ul.column:last").prependTo("#carouselInner");
	$("#carouselInner").css("margin-left","-950px")
	
	
	$("#carouselPrev").click(function(){
		$("#carouselNext:not(:animated)t,#carouselPrev:not(:animated)").fadeOut("slow");
		$("#carouselInner:not(:animated)").animate({
			marginLeft : parseInt($("#carouselInner").css("margin-left"))+950+"px"
		},"slow","swing" , 
		function(){
			$("#carouselInner").css("margin-left","-950px")
			$("#carouselInner ul.column:last").prependTo("#carouselInner");
			$("#carouselNext:not(:animated),#carouselPrev:not(:animated)").fadeIn("slow");
		})
	})
	
	$("#carouselNext").click(function(){
		$("#carouselNext:not(:animated),#carouselPrev:not(:animated)").fadeOut("slow");
		$("#carouselInner:not(:animated)").animate({
			marginLeft : parseInt($("#carouselInner").css("margin-left"))-950+"px"
		},"slow","swing" , 
		function(){
			$("#carouselInner").css("margin-left","-950px")
			$("#carouselInner ul.column:first").appendTo("#carouselInner");
			$("#carouselNext:not(:animated),#carouselPrev:not(:animated)").fadeIn("slow");
		})
	})
	
});


// ▼ 利用者の声  ******************************************			

	
	$(function() {	
	//ticker切り替え速度(ms)
	var interval = 3000;
	//fadeIn/fadeOut速度(ms)
	var fadetime = 250;
	//移動速度(ms)
	var movetime = 1000;
	//#tickerの高さを取得
	var ticker_height = $('#user_voice ul li').height();
	//初期設定
	$("#user_voice ul li:not(:first)").css({"opacity":0}).hide();
	function move(){
		//setInterval
		var tim = setInterval(function(){
			//1番目の要素をフェイドアウト
			$("#user_voice ul li:first").animate({"opacity":0},fadetime);
			//2番目の要素をフェイドイン
			$("#user_voice ul li:eq(1)").show().animate({"opacity":1},fadetime);
			//ul全体を上に移動
			$("#user_voice ul").animate({"margin-top": 0 - ticker_height + "px"},{easing: 'easeOutBounce', duration: movetime, complete:function(){
										//移動終了後、先頭の要素を末尾へ移動し、アニメーションした分だけ下へ移動
										$("#user_voice ul li:first").appendTo("#user_voice ul").hide();
										$("#user_voice ul").css("margin-top", "0px");
									}
			});
		},interval);
	}
	//実行
	move();
});
	
// ▼ 利用者の声（右カラム用）  ******************************************			

$(function() {	
	//ticker切り替え速度(ms)
	var interval = 5000;
	//fadeIn/fadeOut速度(ms)
	var fadetime = 500;
	//移動速度(ms)
	var movetime = 500;
	//#tickerの幅を取得
	var ticker_width = $('#user_voice_right ul li').width();
	//初期設定
	$("#user_voice_right ul li:not(:first)").css({"opacity":0}).hide();
	function move(){
		//setInterval
		var tim = setInterval(function(){
			//1番目の要素をフェイドアウト
			$("#user_voice_right ul li:first").animate({"opacity":0},fadetime);
			//2番目の要素をフェイドイン
			$("#user_voice_right ul li:eq(1)").show().animate({"opacity":1},fadetime);
			//ul全体を上に移動
			$("#user_voice_right ul").animate({"margin-right": 0 - ticker_width + "px"},{easing: 'easeOutQuart', duration: movetime, complete:function(){
										//移動終了後、先頭の要素を末尾へ移動し、アニメーションした分だけ下へ移動
										$("#user_voice_right ul li:first").appendTo("#user_voice_right ul").hide();
										$("#user_voice_right ul").css("margin-right", "0px");
									}
			});
		},interval);
	}
	//実行
	move();
});
	
	
// ▼ フォームのエラーチェック  ******************************************			

  // 必須項目 : class="required" を指定
  // URLの値 : class="url" を指定
  // メールアドレスで必須 : class="required email" を指定
  // 最小値を設定 : minlenght="2" を指定


jQuery.extend(jQuery.validator.messages, {
	required: "入力必須項目です。",
	maxlength: jQuery.format("{0} 文字以下を入力してください。"),
	minlength: jQuery.format("{0} 文字以上を入力してください。"),
	rangelength: jQuery.format("{0} 文字以上 {1} 文字以下で入力してください。"),
	email: "不正なメールアドレスです。",
	url: "URLを入力してください。",
	dateISO: "日付を入力してください。",
	number: "半角数字を入力してください。",
	digits: "0-9までを入力してください。",
	equalTo: "同じ値を入力してください。",
	range: jQuery.format(" {0} から {1} までの値を入力してください。"),
	max: jQuery.format("{0} 以下の値を入力してください。"),
	min: jQuery.format("{0} 以上の値を入力してください。"),
	creditcard: "クレジットカード番号を入力してください。"
});

// ▼ 会員登録ＳＴＥＰ  ******************************************		

// 入力チェック
$(function(){
    $("#form_reg_step").validate();
});
/*
function regist_step(){
	
	// フォームの値を参照して代入(form name) 
	fOBJ  = document.form_reg_step;
	
	name  = fOBJ.name.value;
	sex  = fOBJ.sex.value;
	birth_y  = fOBJ.birth_y.value;
	birth_m  = fOBJ.birth_m.value;
	birth_d  = fOBJ.birth_d.value;
	state  = fOBJ.state.value;

    if( name != "" & sex != "" & birth_y != "" & birth_m != "" & birth_d != "" & state != ""  ) {
	      //location.href = 'regist_step2.php';
		  $("#form_reg_step").attr("action","regist_step2.php");
	}
}
*/
// ▼ お問い合わせ  ******************************************			


// 入力チェック
$(function(){
    $("#form_contact").validate();
});
// 入力チェック完了後ボタン画像変化
/*
function change(){	
	// フォームの値を参照して代入(form name) 
	fOBJ4  = document.form_contact;
	mailad2  = fOBJ4.mailad2.value;
//	name     = fOBJ4.name.value;
	subject  = fOBJ4.subject.value;
	textarea = fOBJ4.textarea.value;

//  if( mailad2 != "" & name != "" & textarea != "" & subject != 0 ) {
	if( mailad2 != "" & textarea != "" & subject != 0 ) {
				  $("#contact_submit").addClass("contact_submit");
				  $("#form_contact").attr("action","javascript:contact();");
				  $("#contact_submit").removeAttr("id");
	}
	else {
		$("#contact_submit").removeClass("contact_submit");
		$("#form_contact").attr("action","javascript:void();");
		$("#contact_submit").attr("id","contact_submit");
		
	}
}
*/
/*
function contact(){
	
	// フォームの値を参照して代入(form name) 
	fOBJ4  = document.form_contact;
	mailad2  = fOBJ4.mailad2.value;
//	name     = fOBJ4.name.value;
	textarea = fOBJ4.textarea.value;
	subject  = fOBJ4.subject.value;
	action   = fOBJ4.RedirectURL.value;  // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	ad_code  = fOBJ4.AD_CODE.value;      // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
//	param =  "?AD_CODE="+ad_code+"&USER_ID="+name+"&FROM_ADRR="+mailad2+"&SEND_BODY="+textarea+"&subject="+subject; // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	param =  "?AD_CODE="+ad_code+"&FROM_ADRR="+mailad2+"&SEND_BODY="+textarea+"&subject="+subject; // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	
//  if( mailad2 != "" & name != "" & textarea != "" ) {
	if( mailad2 != "" & textarea != "" ) {
				  alert ('お問い合わせを受け付けました。\n順次対応して参りますので返信をお待ちください。');
				  location.href = action+param; // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	}
}
*/
// ▼ パスワードを忘れた  ******************************************			

// 入力チェック
$(function(){
    $("#form_forget").validate();
});	
/*
function forget(){
	
	// フォームの値を参照して代入(form name) 
	fOBJ4  = document.form_forget;
	mailad3 = fOBJ4.mailad3.value;
	action   = fOBJ4.RedirectURL.value;  // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	ad_code  = fOBJ4.AD_CODE.value;      // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	param =  "?AD_CODE="+ad_code+"&FROM_ADRR="+mailad3; // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi

    if( mailad3 != "" ) {
				  alert ('ご登録されたメールアドレスにメールを送信致しました。\nメール内容をご確認の上、記載されたURLより再度パスワード設定を行って下さい。');
				  location.href = action+param; // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
			  }
}
*/
// ログインフォーム
/*
function login(){
	
	// フォームの値を参照して代入(form name) 
	fOBJ3  = document.loginform;
	mailad_top = fOBJ3.mailad_top.value;
	pw_top = fOBJ3.pw_top.value;

    if( mailad_top != ""){
			  if(!mailad_top.match(/.+@.+\..+/)){
				  // メールアドレスが不正の場合は警告ダイアログを表示
				  alert ('メールアドレスが正しくありません。\n正しいメールアドレスを再度ご入力ください。');
			  }	
	  　　　　else {
					if( pw_top == ""){
						alert ('パスワードが正しくありません。\n正しいパスワードを再度ご入力ください。');
					}
					else {
					  location.href = 'http://wakuwakumail4.sakura.ne.jp/keiba_member/';
					}
	          }

	}
	else {
	  if( pw_top == ""){
		  alert ('パスワードが正しくありません。\n正しいパスワードを再度ご入力ください。');
	  }
	  else {
			  alert ('メールアドレスが正しくありません。\n正しいメールアドレスを再度ご入力ください。');
	  }
	}
}
*/
// ▼ サイトマップ  ******************************************	
	
	$(function(){
	　
	 // 標準ページ
	 	
		//閉じるとき
			//$("#standard_h4").toggle(function(){
			//	$("#standard_table:not(:animated)")
			//		.slideUp("slow");
		//開くとき							
			//},function(){
			//	$("#standard_table:not(:animated)")
			//		.slideDown("slow")
			//	});
	
	 // 会員ページ
	 	
		//開くとき
		$("#member_h4").toggle(function(){
			$("#member_table:not(:animated)")
				.slideDown("slow");
		//閉じるとき							
		},function(){
			$("#member_table:not(:animated)")
				.slideUp("slow")
			});
		
	// ポイントページ
	 	
		//開くとき
		$("#point_h4").toggle(function(){
			$("#point_table:not(:animated)")
				.slideDown("slow");
		//閉じるとき							
		},function(){
			$("#point_table:not(:animated)")
				.slideUp("slow")
			});
		});		
	
// ▼ フッター ******************************************	
	
	$(function(){
		
		//開くとき
		$("#menulist_btn").toggle(function(){
			$("#footer_area:not(:animated)").animate({
					bottom : "0"
				},"fast","swing");
			$("#menulist_btn:not(:animated)").animate({
					bottom : "60px"
				},"fast","swing");
			$("img#menulist_btnimg").attr("alt","メニューを閉じます")
			                        .attr("title","メニューを閉じます")
									.attr("src","/img/menulist_btn_close.gif")
		//閉じるとき							
		},function(){
			$("#footer_area:not(:animated)").animate({
					bottom : "-60px"
				},"fast","swing");
			$("#menulist_btn:not(:animated)").animate({
					bottom : "0"
				},"fast","swing");
			$("img#menulist_btnimg").attr("alt","メニューを開きます")
			                        .attr("title","メニューを開きます")
									.attr("src","/img/menulist_btn.gif")
			});
		});	


// ▼ 会員登録送信ダイアログ ******************************************	
/*
function regist(){
	
	// フォームの値を参照して代入(form name) 
	fOBJ  = document.regform;
	mail = fOBJ.mailad.value;
	rule = fOBJ.rule.value;
	ad_code  = fOBJ.AD_CODE.value;      // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	param =  "?AD_CODE="+ad_code+"&mail="+mail; // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi

	if(!document.regform.rule.checked){
		alert ('ご登録の前にご利用規約に同意してください。');
	}
	else {
		if( mail != ""){
			  if(!mail.match(/.+@.+\..+/)){
				  // メールアドレスが不正の場合は警告ダイアログを表示
				  alert ('メールアドレスが正しくありません。\n正しいメールアドレスを再度ご入力ください。');
			  }	
	  　　　　else {
				  alert ('ご登録されたメールアドレスにメールを送信致しました。\nメール内容をご確認の上、記載されたURLより本登録を行って下さい。');
				  location.href = 'regist_send.php'+param;
			  }
		}
		else {
			  alert ('メールアドレスが入力されておりません。');
		}
	}
}
*/

// モバイル登録　仮登録メール送信
/*
function submit_mobile(){
	
	// フォームの値を参照して代入(form name) 
	fOBJ2  = document.regform_m;
	mailad_m = fOBJ2.mailad_m.value;
	redirect_url = fOBJ2.RedirectURL.value;
	action   = fOBJ2.MobileSendURL.value;  // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	ad_code  = fOBJ2.AD_CODE.value;      // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi
	param =  "?AD_CODE="+ad_code+"&RedirectURL="+redirect_url+"&mail="+mailad_m; // 指定したURLにリダイレクトするよう変更 2011-05-11 Nakaguchi

    if( mailad_m != ""){
			  if(!mailad_m.match(/.+@.+\..+/)){
				  // メールアドレスが不正の場合は警告ダイアログを表示
				  alert ('メールアドレスが正しくありません。\n正しいメールアドレスを再度ご入力ください。');
			  }	
	  　　　　else {
				  alert ('ご登録されたメールアドレスにメールを送信致しました。\nメール内容をご確認の上、記載されたURLより本登録を行って下さい。');
				  location.href = action+param;
			  }
		}
		else {
			  alert ('メールアドレスが入力されておりません。');
		}
}
*/	

// ▼ フッター（ログイン後） ******************************************	
	
	$(function(){
		
		//開くとき
		$("#menulist_btn_member").toggle(function(){
			$("#footer_area_member:not(:animated)").animate({
					bottom : "0"
				},"fast","swing");
			$("#menulist_btn_member:not(:animated)").animate({
					bottom : "180px"
				},"fast","swing");
			$("img#menulist_btnimg").attr("alt","メニューを閉じます")
			                        .attr("title","メニューを閉じます")
									.attr("src","img/menulist_btn_close.gif")
		//閉じるとき							
		},function(){
			$("#footer_area_member:not(:animated)").animate({
					bottom : "-180px"
				},"fast","swing");
			$("#menulist_btn_member:not(:animated)").animate({
					bottom : "0"
				},"fast","swing");
			$("img#menulist_btnimg").attr("alt","メニューを開きます")
			                        .attr("title","メニューを開きます")
									.attr("src","img/menulist_btn.gif")
			});
		});	
		


  

	  
// ###################################################
// メール受信設定

$(function(){
	
	$("#selectbtn_00").click(function(){
		  
		  // 選択外ブロック非表示
		  $("#docomo ,#ez-web ,#softbank ,#yahoo ,#hotmail ,#gmail").css("display","none");
		  
		  // 選択外ボタンチェンジ
		  $("#selectbtn_01 ,#selectbtn_02 ,#selectbtn_03 ,#selectbtn_04 ,#selectbtn_05 ,#selectbtn_06").css("background-image","url('./img/domain_select_box_r.gif')");
		  
		  $("#extra_service").fadeIn();
	  });
	
	$("#selectbtn_01").click(function(){
		  
		  // 選択外ブロック非表示
		  $("#ez-web ,#softbank ,#yahoo ,#hotmail ,#gmail ,#extra_service").css("display","none");
		  
		  // 選択外ボタンチェンジ
		  $("#selectbtn_02 ,#selectbtn_03 ,#selectbtn_04 ,#selectbtn_05 ,#selectbtn_06").css("background-image","url('./img/domain_select_box_r.gif')");
		  
		  // 選択ボタンチェンジ
		  $("#selectbtn_01").css("background-image","url('./img/domain_select_box.gif')");
		  
		  $("#docomo").fadeIn();
	  });
	  
	$("#selectbtn_02").click(function(){
		
		 // 選択外ブロック非表示
		  $("#docomo ,#softbank ,#yahoo ,#hotmail ,#gmail ,#extra_service").css("display","none");
		  
		  // 選択外ボタンチェンジ
		  $("#selectbtn_01 ,#selectbtn_03 ,#selectbtn_04 ,#selectbtn_05 ,#selectbtn_06").css("background-image","url('./img/domain_select_box_r.gif')");
		  
		  // 選択ボタンチェンジ
		  $("#selectbtn_02").css("background-image","url('./img/domain_select_box.gif')");
		  
		  $("#ez-web").fadeIn();
	  });
	
	$("#selectbtn_03").click(function(){
		
		  // 選択外ブロック非表示
		  $("#ez-web ,#docomo ,#yahoo ,#hotmail ,#gmail ,#extra_service").css("display","none");
		  
		  // 選択外ボタンチェンジ
		  $("#selectbtn_01 ,#selectbtn_02 ,#selectbtn_04 ,#selectbtn_05 ,#selectbtn_06").css("background-image","url('./img/domain_select_box_r.gif')");
		  
		  // 選択ボタンチェンジ
		  $("#selectbtn_03").css("background-image","url('./img/domain_select_box.gif')");
		  
		  $("#softbank").fadeIn();
	  });
	  
	$("#selectbtn_04").click(function(){
		
		  // 選択外ブロック非表示
		  $("#ez-web ,#docomo ,#softbank ,#hotmail ,#gmail ,#extra_service").css("display","none");
		  
		  // 選択外ボタンチェンジ
		  $("#selectbtn_01 ,#selectbtn_02 ,#selectbtn_03 ,#selectbtn_05 ,#selectbtn_06").css("background-image","url('./img/domain_select_box_r.gif')");
		  
		  // 選択ボタンチェンジ
		  $("#selectbtn_04").css("background-image","url('./img/domain_select_box.gif')");
		  
		  $("#yahoo").fadeIn();
	  });
	
	$("#selectbtn_05").click(function(){
		
		  // 選択外ブロック非表示
		  $("#ez-web ,#docomo ,#softbank ,#yahoo ,#gmail ,#extra_service").css("display","none");
		  
		  // 選択外ボタンチェンジ
		  $("#selectbtn_01 ,#selectbtn_02 ,#selectbtn_03 ,#selectbtn_04 ,#selectbtn_06").css("background-image","url('./img/domain_select_box_r.gif')");
		  
		  // 選択ボタンチェンジ
		  $("#selectbtn_05").css("background-image","url('./img/domain_select_box.gif')");
		  
		  $("#hotmail").fadeIn();
	  });
	
	$("#selectbtn_06").click(function(){
		
		  // 選択外ブロック非表示
		  $("#ez-web ,#docomo ,#softbank ,#yahoo ,#hotmail ,#extra_service").css("display","none");
		  
		  // 選択外ボタンチェンジ
		  $("#selectbtn_01 ,#selectbtn_02 ,#selectbtn_03 ,#selectbtn_04 ,#selectbtn_05").css("background-image","url('./img/domain_select_box_r.gif')");
		  
		  // 選択ボタンチェンジ
		  $("#selectbtn_06").css("background-image","url('./img/domain_select_box.gif')");
		  
		  $("#gmail").fadeIn();
	  });           
	
});

// ビットキャッシュ認証用
	  	  
	  /*
	  * validate method plugin for the jQuery validation plugin.
	  * Language: JA
	  */
	  
	  //全角ひらがな・カタカナのみ
	  jQuery.validator.addMethod("kana", function(value, element) {
		  return this.optional(element) || /^([ァ-ヶーぁ-ん]+)$/.test(value);
		  }, "全角ひらがな・カタカナを入力してください"
	  );
	  
	  //全角ひらがなのみ
	  jQuery.validator.addMethod("hiragana", function(value, element) {
		  return this.optional(element) || /^([ぁ-ん]+)$/.test(value);
		  }, "全角ひらがなを入力してください"
	  );
	  
	  //全角カタカナのみ
	  jQuery.validator.addMethod("katakana", function(value, element) {
		  return this.optional(element) || /^([ァ-ヶー]+)$/.test(value);
		  }, "全角カタカナを入力してください"
	  );
	  
	  //半角カタカナのみ
	  jQuery.validator.addMethod("hankana", function(value, element) {
		  return this.optional(element) || /^([ァ-ン゛゜]+)$/.test(value);
		  }, "半角カタカナを入力してください"
	  );
	  
	  //半角アルファベット（大文字・小文字）のみ
	  jQuery.validator.addMethod("alphabet", function(value, element) {
		  return this.optional(element) || /^([a-zA-z\s]+)$/.test(value);
		  }, "半角英字を入力してください"
	  );
	  
	  //半角アルファベット（大文字・小文字）もしくは数字のみ
	  jQuery.validator.addMethod("alphanum", function(value, element) {
		  return this.optional(element) || /^([a-zA-Z0-9]+)$/.test(value);
		  }, "半角英数字を入力してください"
	  );
	  
	  //郵便番号（例:012-3456）
	  jQuery.validator.addMethod("postnum", function(value, element) {
		  return this.optional(element) || /^\d{3}\-\d{4}$/.test(value);
		  }, "郵便番号を入力してください（例:123-4567）"
	  );
	  
	  //携帯番号（例:010-2345-6789）
	  jQuery.validator.addMethod("mobilenum", function(value, element) {
		  return this.optional(element) || /^0\d0-\d{4}-\d{4}$/.test(value);
		  }, "携帯番号を入力してください（例:010-2345-6789）"
	  );
	  
	  //電話番号（例:012-345-6789）
	  jQuery.validator.addMethod("telnum", function(value, element) {
		  return this.optional(element) || /^[0-9-]{12}$/.test(value);
		  }, "電話番号を入力してください（例:012-345-6789）"
	  );
