(function($) {
   $.fn.validationEngineLanguage = function() {};
   $.validationEngineLanguage = {
     newLang: function() {
       $.validationEngineLanguage.allRules =
	 {"required":{
	    "regex":"none",
	    "alertText":"※ 入力してください",
	    "alertTextCheckboxMultiple":"※ 選択してください",
	    "alertTextCheckboxe":"※ 選択してください"
	  },
	  "length":{
	    "regex":"none",
	    "alertText":"※ ",
	    "alertText2":" 文字～ ",
	    "alertText3":" 文字を入力できます"
	  },
	  "minCheckbox":{
	    "regex":"none",
	    "alertText":"※ 選択した数が多過ぎます"
	  },
	  "confirm":{
	    "regex":"none",
	    "alertText":"※ 入力が一致しません"
	  },
	  "telephone":{
	    "regex":"/^[0-9\-\(\)\ ]+$/",
	    "alertText":"※ 電話番号は 0 ～ 9 ( ) - で入力してください"
	  },
	  "email":{
	    "regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/",
	    "alertText":"※ 無効なメールアドレスです"
	  },
	  "date":{
	    "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
	    "alertText":"※ YYYY-MM-DD 形式(年4桁-月2桁-日2桁)で入力してください"
	  },
	  "onlyNumber":{
	    "regex":"/^[0-9\ ]+$/",
	    "alertText":"※ 数字だけ使用できます"
	  },
	  "noSpecialCaracters":{
	    "regex":"/^[0-9a-zA-Z]+$/",
	    "alertText":"※ 数字とアルファベットだけ使用できます"
	  },
	  "onlyLetter":{
	    "regex":"/^[a-zA-Z\ \']+$/",
	    "alertText":"※ アルファベットだけ使用できます"
	  }
	 };
     }
   };
})(jQuery);
$(document).ready(
  function () {
    $.validationEngineLanguage.newLang();
    $('#comment').data('default', $('#comment').val()
      ).focus(
      function () {
	if ( $(this).val() === $(this).data('default') ) {
	  $(this).val('');
	}
	return;
      }).blur(
      function () {
	if ( $(this).val() === '' ) {
	  $(this).val($(this).data('default'));
	}
	return;
      });
});
