main.js
3.51 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*jQuery anonymous function calls*/
(function($) {
/**
* *************************************************************************************************
* Documetn Ready
* *************************************************************************************************
*/
$(function() {
/**
* *************************************************************************************************
* Home Page Carosel
* *************************************************************************************************
*/
if( $('#qt_home_carosel').length ){
$('#qt_home_carosel').carousel({
interval: 4000
});
var click_event = false;
$('#qt_home_carosel').on('click', '.qt-carosel-nav a', function() {
click_event = true;
$('.qt-carosel-nav li').removeClass('active');
$(this).parent().addClass('active');
}).on('slid.bs.carousel', function(e) {
if(!click_event) {
var count = $('.qt-carosel-nav').children().length -1;
var current = $('.qt-carosel-nav li.active');
current.removeClass('active').next().addClass('active');
var id = parseInt(current.data('slide-to'));
if(count == id) {
$('.qt-carosel-nav li').first().addClass('active');
}
}
click_event = false;
});
}
/**
* *************************************************************************************************
* Home Page Carosel WIDE
* *************************************************************************************************
*/
if( $('#qt_home_carosel_wide').length ){
$('#qt_home_carosel_wide').carousel({
interval: 4000
});
}
/**
* *************************************************************************************************
* Magnific Popup Lightbox
* *************************************************************************************************
*/
if( $('.qt-photo-gallery-single').length ){
$('.qt-photo-gallery-single').magnificPopup({
delegate: 'a', // child items selector, by clicking on it popup will open
type: 'image',
gallery: {
enabled:true
}
// other options
});
}
/**
* *************************************************************************************************
* Contact Page Maps
* *************************************************************************************************
*/
if( $('#qt_contact_google_map').length ){
/*
Note: you can find Latitude and Longitude for any address with the help of below website.
http://www.latlong.net/
*/
// Our temporary location is: Stratford, London, UK
// change values below with your business locaiton - Longitude & Latitude
var location_latitude = 51.543270;
var location_longitude = -0.001870;
// large map
// ==========================
var qt_contact_map = new GMaps({
div: '#qt_contact_google_map',
lat: location_latitude,
lng: location_longitude,
zoom: 14,
scrollwheel: false,
navigationControl: false,
mapTypeControl: false,
scaleControl: false,
zoomControl: true,
//draggable: false,
disableDoubleClickZoom: true
});
qt_contact_map.addMarker({
lat: location_latitude,
lng: location_longitude
});
}
/**
* *************************************************************************************************
* *************************************************************************************************
*/
});
/**
* *************************************************************************************************
* End: Document Ready
* *************************************************************************************************
*/
})(jQuery);