$(document).ready(function(){var a=new Contact();$(".ContactFormButton > INPUT[type=button]").click(function(){recipient=$("SELECT[id=recipient]").attr("value");mess=$("TEXTAREA[id=message]").val();mess+="\n\n"+$("INPUT[id=pageuri]").attr("value");mess+="\n"+$("INPUT[type=text][id=name]").attr("value");mess+="\n"+$("INPUT[type=text][id=email]").attr("value");a.SendComment(recipient,mess)});$("#NewsLetterButtons INPUT[type=button]").click(function(){var b=$("#subscribeemail").attr("value");var c=$("#subscribeformat").val();if(validateEmail(b)){var d=new NewsLetter();d.Subscribe(b,c,this.id)}else{alert(LANG_COMMON_EMAILFORMAT)}})});function Contact(){AjaxPath="/Templates/Ajax/Contact.aspx";this.SendComment=function(b,a){if($(".ContactFormAccept > INPUT[type=checkbox]").attr("checked")==true){$.getJSON(AjaxPath,{Action:"PostComment",Recipient:b,Message:a},function(c){if(c.result=="True"){alert(LANG_COMMENT_CONFIRM)}else{alert(LANG_COMMON_ERROR)}})}else{alert(LANG_COMMENT_ACCEPTMISSING)}};this.SendTip=function(a,c,b){$.getJSON(AjaxPath,{Action:"TipFriend",Sender:a,Recipient:c,Message:b},function(d){if(d.result=="True"){alert(LANG_TIPFRIEND_CONFIRM)}else{alert(LANG_COMMON_ERROR)}})}}function NewsLetter(){AjaxPath="/Templates/Ajax/NewsLetter.aspx";this.Subscribe=function(a,c,b){$.getJSON(AjaxPath,{Action:"Subscribe",Email:a,Format:c,Type:b},function(d){if(d.result=="True"){alert(LANG_NEWSLETTER_CONFIRM)}else{alert(LANG_NEWSLETTER_ERROR)}})}};