$(function(){ $(".messageto").live("click",function(){ location.hash = $(this).attr("href").replace(".html",""); return false; }); $(".mailto").live("click",function(){ var SubjectFor = $(this).parent("p").parent("div").children("h2").text(); $("body").prepend('
×
')}); return false; }); $("#form_close").live("click",function(){ $(".light_box").fadeOut(function(){$(this).remove()}); }); $(".mail_form textarea").live("focus",function(){ if(this.value == "message"){ $(this).val("").css("color","#333"); } }); $(".mail_form textarea").live("blur",function(){ if(this.value == ""){ $(this).val("message").css("color","#999"); } }); $(".mail_form input[name='a_mail']").live("focus",function(){ if(this.value == "mail address"){ $(this).val("").css("color","#333"); } }); $(".mail_form input[name='a_mail']").live("blur",function(){ if(this.value == ""){ $(this).val("mail address").css("color","#999"); } }); $(".mail_form input[name='a_name']").live("focus",function(){ if(this.value == "name"){ $(this).val("").css("color","#333"); } }); $(".mail_form input[name='a_name']").live("blur",function(){ if(this.value == ""){ $(this).val("name").css("color","#999"); } }); $(".mail_form .post").live("click",function(){ var WhatsUp=$(".mail_form input[name='a_subject']").val(); var Hogetxt =$(".mail_form textarea").val(); var WhatMail =$(".mail_form input[name='a_mail']").val(); var mrWho = $(".mail_form input[name='a_name']").val(); if(Hogetxt == "message"){ Hogetxt=""; alert("メッセージが未入力です"); } if(WhatMail== "mail address"){ WhatMail=""; alert("メールアドレスが未入力です"); } if(mrWho == "name"){ mrWho=""; alert("名前が未入力です"); } if(WhatsUp!="" && Hogetxt!="" && WhatMail!="" && mrWho!=""){ $.ajax({ type: 'post', url: 'file/mailto.php', data: { 'a_subject': WhatsUp, 'a_text': Hogetxt, 'a_mail': WhatMail, 'a_name': mrWho }, success: function(data){ alert(data); $(".light_box").fadeOut(2000,function(){$(this).remove()}); } }); } return false; }); $("#footer").fadeIn(3000); }); /* * * * * * * * * * * * * * * * * * * * * CopyrightⒸwebstudio WhitePallet™ * * * * * * * * * * * * * * * * * * * * */