function googlemaps() { var latlng = new google.maps.LatLng(52.067897, 5.080983); var myOptions = { center: latlng, zoom: 15, panControl: false, zoomControl: false, mapTypeControl: false, scaleControl: false, streetViewControl: false, overviewMapControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map"), myOptions); var IFSLogo = new google.maps.MarkerImage('images/maps-marker.png', new google.maps.Size(238,137), new google.maps.Point(0,0), new google.maps.Point(267, 20)); var IFSMarker = new google.maps.Marker({ position: latlng, map: map, icon: IFSLogo, title:"IFS ilfa finance solutions" }); google.maps.event.addListener(IFSMarker, 'click', function() { var latitude = this.position.lat(); var longitude = this.position.lng(); window.open("https://maps.google.com/maps?q=Ptolemaeuslaan+56%2C+3528+BP+Utrecht&hl=nl&sll=40.651274,-79.743104&sspn=13.961334,29.245605&hnear=Ptolemaeuslaan+56%2C+3528+BP+Utrecht,+Nederland&t=m&z=16&source=gplus-ogsb"); }); } $(function() { //googlemaps(); // function myCustomSubmit(form) { //console.log('TODO: myCustomSubmit'); var jqxhr = $.ajax({ type: "POST", url: "/scripts/submit_contact.php", data: $(form).serialize() }) .done(function(data, textStatus, jqXHR) { //console.log('done - data.success: ' + data.success); $('#contactform').html(''); if (data.success) { $('#contactform').html('

Your mail has been send.

'); } else { $('#contactform').html('

Due to a technical problem, your email could not be send.

'); } }) .fail(function(jqXHR, textStatus, errorThrown) { //console.log('fail - data.success: ' + data.success); $('#contactform').html(''); $('#contactform').html('

Due to a technical problem, your email could not be send.

'); //console.log(errorThrown); }) .always(function() { // }); } // validate signup form on keyup and submit $("#contactform").validate({ submitHandler: function(form) { myCustomSubmit(form); }, rules: { name: { required: true }, company: { required: true }, email: { required: true, email: true }, phone: { required: true }, comment: { required: true } }, errorPlacement: function(error, element) {} }); });