/* File: js/scripts.js, Ratio: 23.3% */

$(function()
{$("form#subForm:submit").click(function(){$('form#subForm').submit(function(){return false;});formAction=$("form").attr("action");emailId=formAction.replace("http://YOURSITEADDRESS.createsend.com/t/r/s/","");emailId=emailId.replace("/","");emailId=emailId+"-"+emailId;if(!checkEmail(emailId))
{alert("Please enter a valid email address");return;}
var str=$("form").serialize();final=str+"&action="+formAction;$.ajax({url:"proxy.php",type:"POST",data:final,success:function(html){$("#theForm").hide();$("#confirmation").slideDown("slow");}});});});function checkEmail(email)
{var pattern=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;var emailVal=$("#"+email).val();return pattern.test(emailVal);}
$(document).ready(function(){if(typeof($('#googleMap').attr('id'))!='undefined'){var map=new GMap2(document.getElementById("googleMap"));map.setCenter(new GLatLng(38.629041,-90.193548),15);map.setUIToDefault();var seventh=new GLatLng(38.62594,-90.192261);var thirteen_hundred=new GLatLng(38.627717,-90.19972);var thirteen_hundred_m=new GMarker(thirteen_hundred);var seventh_m=new GMarker(seventh);GEvent.addListener(thirteen_hundred_m,"click",function(){thirteen_hundred_m.openInfoWindowHtml("<h3>1300 Market</h3><p><a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1300+Market+St,+St+Louis,+MO+63103&sll=38.626192,-90.192282&sspn=0.010812,0.022659&g=Market+St+%26+N+7th+St,+St+Louis,+MO&ie=UTF8&ll=38.628622,-90.199256&spn=0.010812,0.022659&z=16&iwloc=A&iwstate1=dir'>Get Directions</a></p>");});GEvent.addListener(seventh_m,"click",function(){seventh_m.openInfoWindowHtml("<h3>Market & 7th</h3><p><a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Market+St+%26+N+7th+St,+St+Louis,+MO&sll=38.629041,-90.193548&sspn=0.010812,0.022659&ie=UTF8&ll=38.626192,-90.192282&spn=0.010812,0.022659&z=16&iwloc=A&iwstate1=dir'>Get Directions</a></p>");});map.addOverlay(seventh_m);map.addOverlay(thirteen_hundred_m);}});