function initialize() {
var mapOptions = {
center: new google.maps.LatLng(48.6114165,7.70202),
zoom: 15,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var marker = new google.maps.Marker({
position: new google.maps.LatLng(48.6114165,7.713302),
animation: google.maps.Animation.DROP,
title: "Codactiv - Adeliom"
});
var adresseInfoOption = {
maxWidth:400,
content:
'
Codactiv - Adeliom
'+
'3 avenue de l\'Europe
67300 SCHILTIGHEIM - FRANCE
Tél : 03 67 10 08 49
'
};
var adresseInfo = new google.maps.InfoWindow(adresseInfoOption);
var map = new google.maps.Map(document.getElementById("map"),mapOptions);
marker.setMap(map);
adresseInfo.open(map,marker);
google.maps.event.addListener(marker, 'click', function() {
adresseInfo.open(map,marker);
});
google.maps.visualRefresh = true;
}
google.maps.event.addDomListener(window, 'load', initialize);
$('.contact-form').validate({
submitHandler: function() {
$('.submit').addClass("disabled").attr("disabled", "true");
$.post("pages/contact.action.php",$('.contact-form').serialize(),
function(data){
if(data.code==0){
showInfo(data.msg,"success");
$(":input",".contact-form").not(':button, :submit, :reset, :hidden').val("");
$('.submit').removeClass("disabled").attr("disabled", "false");
}
else{
showInfo(data.msg,"failure");
$('.submit').removeClass("disabled").attr("disabled", "false");
}
},"json"
);
},
errorPlacement: function(error, element) {
error.insertBefore(element);
},
rules: {
telephone: {
required: true,
}
}
});
$("#object-select").change(function(){
if($(this).val()==0){
$("#message").text("Vous souhaitez utiliser Codactiv en tant que revendeur et en marque blanche ? Posez-nous vos questions.");
}
else if($(this).val()==1){
$("#message").text("Vous souhaitez avoir plus d'informations sur Codactiv ? Posez-nous vos questions.");
}
else{
$("#message").text(" ");
}
})