sync
[bootswatch] / Eshopper / js / contact.js
1 jQuery(function($) {'use strict',
2
3         var form = $('.contact-form');
4         form.submit(function () {'use strict',
5                 $this = $(this);
6                 $.post("sendemail.php", $(".contact-form").serialize(),function(result){
7                         if(result.type == 'success'){
8                                 $this.prev().text(result.message).fadeIn().delay(3000).fadeOut();
9                         }
10                 });
11                 return false;
12         });
13
14 });
15
16 // Google Map Customization
17 (function(){
18
19         var map;
20
21         map = new GMaps({
22                 el: '#gmap',
23                 lat: 43.1580159,
24                 lng: -77.6030777,
25                 scrollwheel:false,
26                 zoom: 14,
27                 zoomControl : false,
28                 panControl : false,
29                 streetViewControl : false,
30                 mapTypeControl: false,
31                 overviewMapControl: false,
32                 clickable: false
33         });
34
35         var image = 'images/map-icon.png';
36         map.addMarker({
37                 lat: 43.1580159,
38                 lng: -77.6030777,
39                 // icon: image,
40                 animation: google.maps.Animation.DROP,
41                 verticalAlign: 'bottom',
42                 horizontalAlign: 'center',
43                 backgroundColor: '#ffffff',
44         });
45
46         var styles = [ 
47
48         {
49                 "featureType": "road",
50                 "stylers": [
51                 { "color": "" }
52                 ]
53         },{
54                 "featureType": "water",
55                 "stylers": [
56                 { "color": "#A2DAF2" }
57                 ]
58         },{
59                 "featureType": "landscape",
60                 "stylers": [
61                 { "color": "#ABCE83" }
62                 ]
63         },{
64                 "elementType": "labels.text.fill",
65                 "stylers": [
66                 { "color": "#000000" }
67                 ]
68         },{
69                 "featureType": "poi",
70                 "stylers": [
71                 { "color": "#2ECC71" }
72                 ]
73         },{
74                 "elementType": "labels.text",
75                 "stylers": [
76                 { "saturation": 1 },
77                 { "weight": 0.1 },
78                 { "color": "#111111" }
79                 ]
80         }
81
82         ];
83
84         map.addStyle({
85                 styledMapName:"Styled Map",
86                 styles: styles,
87                 mapTypeId: "map_style"  
88         });
89
90         map.setStyle("map_style");
91 }());