// JavaScript Document

function checkConfirm() 
{ 
	if(window.confirm('送信してよろしいですか？')){
		return true;
	}
	else{
		window.alert('キャンセルされました');
		return false;
	}
}

$(document).ready(function() {
	
	$("form").validation({
		extension: {
			position: "top",
			//top: -18,
			top: -18,
			left: 0
		}
	});
	
	/*
	$("#form").validate({
		rules: {
			name: "required",
			sex: "required",
			age: "required",
			birth_year: "required",
			birth_day: "required",
			//メールアドレス
			email: {
				required: true,
				email: true
			},
			email_confirm: {
				required: true,
				email: true,
				equalTo: "#email"
			},
			phone: "required",
			purpose: "required"
		},
		messages: {
			name: "必須項目です",
			sex: "必須項目です",
			age: "必須項目です",
			birth_year: "必須項目です",
			birth_day: "必須項目です",
			//メールアドレス
			email: {
				required: "必須項目です",
				email: "正しいメールアドレスを入力してください"
			},
			email_confirm: {
				required: "必須項目です",
				email: "正しいメールアドレスを入力してください",
				equalTo: "メールアドレスが一致しません"
			},
			phone: "必須項目です",
			purpose: "必須項目です"
		}
	});
	*/ 
	
	// Resizable
	$(".resizable").resizable({
		//maxHeight: 250,
		maxWidth: 400,
		//minHeight: 150,
		minWidth: 400
	});
	
	// Datepicker
	$('.datepicker').datepicker({
			inline: true,
			changeMonth: true,
			changeYear: true,
			dateFormat: "yy/mm/dd",
			dayNamesMin: ['日', '月', '火', '水', '木', '金', '土'],
			monthNamesShort: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
		}
	);
	
	window.refresh();
});