text: /*---------------------------------------------------------------
  
   jQuery.validation.js - ver 1.2.3
   
   jQuery required (tested on version 1.3.2)
   encoding UTF-8
  
   Copyright (c) 2008 nori (norimania@gmail.com)
   5509 - http://moto-mono.net
   Licensed under the MIT
   
   Document Archive:
   http://moto-mono.net/2008/08/22/realtimeformvalidation.html
  
   $Update: 2009-08-28 09:07
   $Date: 2008-08-20 20:00
   
   ----------------------------------------------------------------*/
   
  (function(a){a.tip={create:function(j,h,i,f,b){var e=document.createElement("div");a(e).addClass("validationTip").attr("id",j+"_tip");var g=function(){var m=a("#"+j).offset(),l={},k=function(o,n){l.top=o+f+m.top;l.left=n+b+m.left;};switch(i){case"top":k(0,0);break;case"bottom":k(a("#"+j).height(),0);break;case"even":k(0,b);break;default:k(0,a("#"+j).width());break;}return l;};var d=g();a(e).append("<div class='tipInner'>"+h+"</div><div class='tipRt'></div><div class='tipRb'></div>").hide().css({position:"absolute",top:d.top,left:d.left});a("body").append(e);a(window).resize(function(){var k=g();a(e).css({top:k.top,left:k.left});});},msg:function(d,b){a("#"+d+"_tip .tipInner").html(b);},fadeIn:function(b){a("#"+b+"_tip").fadeIn("normal");},fadeOut:function(b){a("#"+b+"_tip").fadeOut("normal");}};a.dialog={ids:{mat:"dlgmat",me:"dlg",top:"dlgtop",cont:"dlgcont",btm:"dlgbtm",close:"close"},create:function(f){var j=document.createElement("div");var b=document.createElement("div");var e=document.createElement("span");var i=a.dialog.ids;var h=function(){a(b).fadeTo(1,0).hide();a(j).fadeTo(1,0).hide();a("select:hidden,object:hidden").css("visibility","visible");};a("body").keyup(function(d){if(d.keyCode==27){h();}});a(j).attr("id",i.mat).hide().fadeTo(1,0).click(function(){h();});a(e).attr("id",i.close).click(function(){h();}).hover(function(){a(this).addClass("hover");},function(){a(this).removeClass("hover");});a(b).append("<div id='"+i.top+"'></div><div id='"+i.cont+"'><div><span></span></div></div><div id='"+i.btm+"'></div>");a("body").append(j).append(b);var g={width:a(b).width(),height:a(b).height()};a(b).attr("id",i.me).append(e);a("div span","#"+i.cont).html(f);a(b).css("display","inline");a("div",b).css("display","inline");a("div","#"+i.cont).css("display","block");if(typeof document.body.style.maxHeight=="undefined"){a(b).width(a(b).width());}a(b).hide().fadeTo(1,0);},fadeIn:function(f,b){var e=a.extend({duration:"fast",matOpacity:0.6,dialogOpacity:0.9,closeTitle:"このメッセージを閉じる"},b);var h=a.dialog.ids;a("#"+h.cont+" div span").html(f);a("#"+h.me).show();var g={width:a("#"+h.me).width(),height:a("#"+h.me).height()};a("#"+h.me).css("display","block");a("div","#"+h.me).css("display","block");a("#"+h.close).attr("title",e.closeTitle);a("#"+h.mat).show().fadeTo(e.duration,e.matOpacity);a("#"+h.me).fadeTo(e.duration,e.dialogOpacity).css({"margin-left":"-"+g.width/2+"px"});if(typeof document.body.style.maxHeight!="undefined"){a("#"+h.me).css({"margin-top":"-"+(parseInt(g.height/2))+"px"});if(document.all){a("#"+h.top+",#"+h.btm).css("min-width",g.width);}}else{a("select,object").css("visibility","hidden");}}};a.validate={chk:{required:function(b,e){if(a(e).hasClass("group")){var d=0;a("input,select",e).each(function(){if(a(this).val().length>0){d++;}});return b&&d==a("input,select",e).length;}else{return b&&b.length>0;}},hankaku:/^[a-zA-Z0-9@\;\:\[\]\^\=\/\!\*\"\#\$j\%\&\'\(\)\,\.\-\_\?\\\s]*$/,email:/^[a-zA-Z0-9_\.\-]+?@[A-Za-z0-9_\.\-]+\.+[A-Za-z\.\-\_]+$/,tel:/^[\d-]*$/,numonly:/^\d*$/,zip:/\d\d\d\-?\d\d\d\d/,check:function(b,d){return a("input:checked",d).length>0;},radio:function(b,d){return a("input:checked",d).length>0;},retype:function(b,f){var h=a("#"+a(f).attr("class").split("retype-")[1].split(/\b/)[0]);if(h.hasClass("group")){var g=a("input",h),b=a("input",f);for(var e=0,d=false;e<g.length;e++){if(g[e].value==b[e].value){d=true;}else{d=false;}}if(d){return true;}}else{return h.val()==b;}},min:function(b,d){var e=a(d).attr("class").match(/min(\d+)/)?RegExp.$1:null;if(b.length>0){return b.length>=e;}},max:function(b,d){var e=a(d).attr("class").match(/max(\d+)/)?RegExp.$1:null;if(b.length>0){return b.length<=e;}}},fn:function(i,h){msgs=a.extend({retype:"直前の項目と同じ内容を入力してください",email:"正しいEメールアドレスを入力してください",hankaku:"全角文字は使えません",tel:"正しい電話番号を入力してください",numonly:"数字のみで入力してください",zip:"正しい郵便番号を入力してください",min:"文字以上で入力してください",max:"文字以内で入力してください",check:"ひとつ以上を選択してください",radio:"いずれかを選択してください",required:"必須項目です",submit:"必須項目を正しく入力してください"},h);var b=a(i).attr("value");var g=a(i).attr("class");if(g.match(/group/)){b="";var f=a("input,select",i);f.each(function(j){b+=a(this).val();if(g.match(/email/)&&j==0&&a(this).val().length>0){b+="@";}});}var e={isError:false,failed:function(j,l){var k=msgs[l];if(l.match(/min/)&&g.match(/min(\d+)/)){k=RegExp.$1+msgs[l];}else{if(l.match(/max/)&&g.match(/max(\d+)/)){k=RegExp.$1+msgs[l];}}a.tip.msg(j.id,k);a.tip.fadeIn(j.id);this.isError=true;}};var d=a.validate.chk;for(c in d){if(g.match(/required|check|radio/)){a("#"+i.id+"_tip").addClass("requiredTip");}if(g.match(c)){if(typeof(d[c])!="function"){if(b&&!b.match(d[c])){e.failed(i,c);break;}}else{if(!d[c](b,i)){e.failed(i,c);break;}}}}if(!e.isError){a.tip.fadeOut(i.id);}}};a.fn.validation=function(d){if(a(this).length<1){return false;}var f=this,i=500;if(!d){var d={};}var e=a.extend({dialog:true,submit:"#submit",position:"left",top:0,left:15,AjaxZip2:false,zip:"zip",zip2:null,pref:"pref",addr1:"addr",addr2:null,addr3:null},d.extension);var b=a("input[type='text'],input[type='password'],textarea,select",f).filter(function(){return this.className.match(/required|retype|email|hankaku|numonly|tel|zip/);});var g=function(j){a.validate.fn(j,d.msgs);if(!e.dialog){setTimeout(function(){if(a("div.requiredTip:visible").length>0){a(e.submit).attr("disabled","disabled").addClass("disabled");}else{a(e.submit).removeAttr("disabled").removeClass("disabled");}},500);}};b.each(function(){a.tip.create(this.id,"",e.position,e.top,e.left,i--);g(this);a(this).keyup(function(){g(this);}).blur(function(){g(this);});a(this).filter("select").change(function(){g(this);});});a(".group,.check,.radio").each(function(){var j=this;a.tip.create(this.id,"",e.position,e.top,e.left);g(this);if(a(this).hasClass("group")){a("input",this).keyup(function(){g(j);}).blur(function(){g(j);});a("select",this).change(function(){g(j);});}else{a("input",this).click(function(){g(j);});}});if(e.dialog){a.dialog.create(msgs.submit);}a("*[type='submit'],input[type='image']",f).click(function(){if(a("div.requiredTip:visible").length>0){a.dialog.fadeIn(msgs.submit,d.dialog);return false;}});if(e.AjaxZip2){var h=function(){AjaxZip2.zip2addr(e.zip,e.pref,e.addr1,e.zip2,e.addr2,e.addr3);setTimeout(function(){b.each(function(){g(this);});},10);};a("input[name='"+(e.zip2!=null?e.zip2:e.zip)+"']").keyup(function(){h();}).blur(function(){h();});}};})(jQuery);