-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.js
74 lines (61 loc) · 1.9 KB
/
site.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Implementing the embeded Google map
function initialize(){
var vibyCoord = new google.maps.LatLng(59.060328, 14.871228);
var betaniaCoord = new google.maps.LatLng(59.124188,15.081001);
var mapProp = {
center: new google.maps.LatLng(59.095964, 14.960823),
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
var vibyMarker = new google.maps.Marker({
position: vibyCoord,
map: map,
title: 'Viby Kyrka'
});
var betaniaMarker = new google.maps.Marker({
position: betaniaCoord,
map: map,
title: 'Betaniakyrkan'
});
var vibyInfoContent = '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h3>Viby kyrka</h3>'+
'<div id="bodyContent">'+
'<p>Här kommer vi vigas.</p>'+
'<p>Viby Församling, 694 95 Vretstorp</p>' +
'</div>'+
'</div>';
var betaniaInfoContent = '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h3>Betaniakyrkan</h3>'+
'<div id="bodyContent">'+
'<p>Du som fått inbjudan är välkommen hit på bröllopsfest efter vigseln.</p>'+
'<p>Betania Åbytorp, Portföljgatan 2, Kumla</p>' +
'</div>'+
'</div>';
var vibyInfo = new google.maps.InfoWindow({
content: vibyInfoContent
});
var betaniaInfo = new google.maps.InfoWindow({
content: betaniaInfoContent
});
google.maps.event.addListener(vibyMarker, 'click', function(){
vibyInfo.open(map, vibyMarker);
});
google.maps.event.addListener(betaniaMarker, 'click', function(){
betaniaInfo.open(map, betaniaMarker);
});
}
google.maps.event.addDomListener(window, 'load', initialize);
// Making img fit well inside the section split
$('.fill-img img').load(function(){
var height = $(this).height();
var width = $(this).width();
if (width > height)
$(this).addClass('wide-img');
else
$(this).addClass('tall-img');
});