(function(){function e(n){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)}var f=49,r={stem:!0,tipJoint:new Opentip.Joint("right"),targetJoint:new Opentip.Joint("top left"),offset:[0,20]},u={stem:!1,tipJoint:new Opentip.Joint("top left"),targetJoint:new Opentip.Joint("bottom left"),offset:[-10,-4]},n=new Opentip(".js-nameTextbox","Please enter your name",{style:"error",containInViewport:!1}),t=new Opentip(".js-emailTextbox","Please enter a valid email address",{style:"error",containInViewport:!1}),i=new Opentip(".js-messageTextbox","Please enter a message",{style:"error",containInViewport:!1});$("#aspnetForm").submit(function(o){var h=$(".js-nameTextbox").val()==="",c=!e($(".js-emailTextbox").val()),l=$(".js-messageTextbox").val()==="",s;return!h&&!c&&!l?!0:(o.preventDefault(),s={stem:r.tipJoint,tipJoint:r.tipJoint,targetJoint:r.targetJoint,offset:r.offset},$(".js-nameTextbox").css("margin-bottom",""),$(".js-emailTextbox").css("margin-bottom",""),$(".js-messageTextbox").css("margin-bottom",""),$(document).width()<770&&(s={stem:u.stem,tipJoint:u.tipJoint,targetJoint:u.targetJoint,offset:u.offset},h&&$(".js-nameTextbox").css("margin-bottom",f),c&&$(".js-emailTextbox").css("margin-bottom",f),l&&$(".js-messageTextbox").css("margin-bottom",f)),n.options.stem=t.options.stem=i.options.stem=s.stem,n.options.tipJoint=t.options.tipJoint=i.options.tipJoint=s.tipJoint,n.options.targetJoint=t.options.targetJoint=i.options.targetJoint=s.targetJoint,n.options.offset=t.options.offset=i.options.offset=s.offset,h?(n.reposition(),n.show()):n.hide(),c?(t.reposition(),t.show()):t.hide(),l?(i.reposition(),i.show()):i.hide(),!1)})})()