PageSourceSearch

https://cityofdenhamsprings.com/Content/themes/Public/js/custom.js

js cityofdenhamsprings.com collected 2026-09-24 09:32:36 UTC 11,682 bytes, 402 lines download raw bytes

1jQuery(document).ready(function($) {
2    "use strict"
3
4
5    // ------- Navigation ------- //
6    if ($('ul.nav li.dropdown').length) {
7        $('ul.nav li.dropdown').on('hover', function() {
8            $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
9        }, function() {
10            $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
11        });
12    }
13    // ------- Navigation End ------- //
14
15
16    // ------- Home Slider Start ------- //
17    if ($('#home-slider').length) {
18        $('#home-slider').owlCarousel({
19            loop: true,
20            margin: 0,
21            nav: false,
22            items: 1,
23            autoplay: true,
24
25        })
26    }
27    // ------- Home Slider End ------- //
28
29
30    // ------- Home Slider Start ------- //
31    if ($('#highlight-slider').length) {
32        $('#highlight-slider').owlCarousel({
33            loop: true,
34            margin: 5,
35			dots:false,
36            responsiveClass: true,
37            responsive: {
38                0: {
39                    items: 1,
40                    nav: true,
41                    loop: false,
42                },
43                600: {
44                    items: 2,
45                    nav: true,
46                    loop: false,
47                },
48                1000: {
49                    items: 4,
50                    nav: true,
51                    loop: false
52                }
53            }
54        })
55    }
56    // ------- Home Slider End ------- //
57
58
59    // ------- Home Slider Start ------- //
60    if ($('#highlight-slider-2').length) {
61        $('#highlight-slider-2').owlCarousel({
62            loop: true,
63            margin: 0,
64            dots: false,
65            responsiveClass: true,
66            responsive: {
67                0: {
68                    items: 1,
69                    nav: true,
70                    loop: false,
71                },
72                700: {
73                    items: 2,
74                    nav: true,
75                    loop: false,
76                },
77                1000: {
78                    items: 3,
79                    nav: true,
80                    loop: false
81                }
82            }
83        })
84    }
85    // ------- Home Slider End ------- //
86
87
88
89    // ------- Pretty Photo Start ------- // 
90    if ($('.gallery').length) {
91        $("area[data-rel^='prettyPhoto']").prettyPhoto();
92        $(".gallery:first a[data-rel^='prettyPhoto']").prettyPhoto({
93            animation_speed: 'normal',
94            theme: 'light_square',
95            slideshow: 3000,
96            autoplay_slideshow: false
97        });
98
99    }
100    // ------- Pretty Photo End ------- // 
101
102
103   
104
105
106
107
108    // ------- Event Slider Start ------- //
109    if ($('.recent-event-slider').length) {
110        $('.recent-event-slider').slick({
111            slidesToShow: 1,
112            slidesToScroll: 1,
113            arrows: false,
114        });
115        $('.recent-event-slider-nav').slick({
116            slidesToShow: 4,
117            slidesToScroll: 1,
118            asNavFor: '.recent-event-slider',
119            dots: false,
120            centerMode: false,
121            focusOnSelect: true,
122        });
123    }
124    // ------- Event Slider End ------- //	
125
126
127    // ------- Home Slider Start ------- //
128    if ($('#h3team-slider').length) {
129        $('#h3team-slider').owlCarousel({
130            loop: true,
131            margin: 30,
132
133            dots: false,
134            responsiveClass: true,
135            responsive: {
136                0: {
137                    items: 1,
138                    nav: true
139                },
140                600: {
141                    items: 2,
142                    nav: true
143                },
144                1000: {
145                    items: 2,
146                    nav: true,
147                    loop: false
148                }
149            }
150        })
151    }
152    // ------- Home Slider End ------- //
153
154
155
156    // ------- Close Btn ------- //
157    if ($('#closebtn').length) {
158        $('#closebtn').on('click', function() {
159            $('#closetopbar').slideUp().empty();
160        });
161
162        $(function() {
163            $('#closetopbar').slideDown();
164        });
165    }
166    // ------- Close Btn ------- //
167
168
169
170    // ------- Events Counter ------- //
171    if ($('#defaultCountdown').length) {
172        var austDay = new Date();
173        austDay = new Date(2019, 12, 18, 14);
174        $('#defaultCountdown').countdown({
175            until: austDay
176        });
177        $('#year').text(austDay.getFullYear());
178    }
179
180
181    // ------- Filter Gallery Start ------- //
182    if ($('.filter-gallery').length) {
183        if ($('.filter-gallery .isotope').length) {
184            var $container = $('.filter-gallery .isotope');
185            $container.isotope({
186                itemSelector: '.item',
187                transitionDuration: '0.6s',
188                masonry: {
189                    columnWidth: $container.width() / 12
190                },
191                layoutMode: 'masonry'
192            });
193            $(window).on("resize", function() {
194                $container.isotope({
195                    masonry: {
196                        columnWidth: $container.width() / 12
197                    }
198                });
199            });
200        }
201        if ($('.filter-gallery #filters').length) {
202            $('.filter-gallery #filters').on('click', 'button', function() {
203                var filterValue = $(this).attr('data-filter');
204                $container.isotope({
205                    filter: filterValue
206                });
207            });
208            // change is-checked class on buttons
209            $('.filter-gallery .button-group').each(function(i, buttonGroup) {
210                var $buttonGroup = $(buttonGroup);
211                $buttonGroup.on('click', 'button', function() {
212                    $buttonGroup.find('.is-checked').removeClass('is-checked');
213                    $(this).addClass('is-checked');
214                });
215            });
216
217        }
218    }
219
220    // ------- Classic Gallery ------- //
221
222    if ($('.classic-gallery').length) {
223        if ($('.classic-gallery .isotope').length) {
224            var $container = $('.classic-gallery .isotope');
225            $container.isotope({
226                itemSelector: '.item',
227                transitionDuration: '0.6s',
228                masonry: {
229                    columnWidth: $container.width() / 12
230                },
231                layoutMode: 'masonry'
232            });
233            $(window).on("resize", function() {
234                $container.isotope({
235                    masonry: {
236                        columnWidth: $container.width() / 12
237                    }
238                });
239            });
240        }
241    }
242
243
244    // ------- Filter Gallery End ------- //
245
246
247    // ------- Post Slider ------- //
248    if ($('#newsletterTiles').length) {
249        $('#newsletterTiles').owlCarousel({
250            loop: true,
251            margin: 30,
252            responsiveClass: true,
253            autoHeight: true,
254            autoplay: true,
255            center: true,
256            responsive: {
257                0: {
258                    items: 1,
259                },
260                600: {
261                    items: 2,
262                },
263                1000: {
264                    items: 3,
265                    loop: true,
266                }
267            }
268        })
269    }
270
271
272    // ------- Testimonials Page Slider Start ------- //
273    if ($('#h3testimonials').length) {
274        $('#h3testimonials').owlCarousel({
275            loop: true,
276            margin: 30,
277            responsiveClass: true,
278            autoHeight: true,
279            autoplay: true,
280            center: true,
281            responsive: {
282                0: {
283                    items: 1,
284                },
285                600: {
286                    items: 2,
287                },
288                1000: {
289                    items: 3,
290                    loop: true,
291                }
292            }
293        })
294    }
295
296    // ------- Testimonials 2nd Option ------- //
297
298    if ($('#testimonials').length) {
299        $('#testimonials').owlCarousel({
300            loop: true,
301            margin: 30,
302            responsiveClass: true,
303            autoHeight: true,
304            autoplay: true,
305            responsive: {
306                0: {
307                    items: 1,
308                },
309                600: {
310                    items: 2,
311                },
312                1000: {
313                    items: 4,
314                    loop: true,
315                }
316            }
317        })
318    }
319    // ------- Testimonials Page Slider End ------- //
320
321
322
323    // ------- Counter Start ------- //
324    if ($('.countdown').length) {
325        var austDay = new Date();
326        austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
327        $('.countdown').countdown({
328            until: austDay
329        });
330        $('#year').text(austDay.getFullYear());
331    }
332    // ------- Counter End ------- // 
333
334    // ------- Search Overlay Start ------- //
335    if ($('a[href="#search"]').length) {
336        $(function() {
337            $('a[href="#search"]').on('click', function(event) {
338                event.preventDefault();
339                $('#search').addClass('open');
340                $('#search > form > input[type="search"]').focus();
341            });
342            $('#search, #search button.close').on('click keyup', function(event) {
343                if (event.target == this || event.target.className == 'close' || event.keyCode == 27) {
344                    $(this).removeClass('open');
345                }
346            });
347            $('form').submit(function(event) {
348                event.preventDefault();
349                return false;
350            })
351        });
352    }
353
354    // ------- Search Overlay End ------- //
355	
356	 if ($('#dismiss, .overlay').length) {
357       $('#dismiss, .overlay').on('click', function () {
358       $('#sidebar').removeClass('active');
359       $('.overlay').removeClass('active');
360       });
361
362       $('#sidebarCollapse').on('click', function () {
363       $('#sidebar').addClass('active');
364       $('.overlay').addClass('active');
365       $('.collapse.in').toggleClass('in');
366       $('a[aria-expanded=true]').attr('aria-expanded', 'false');
367       });
368	 }
369
370
371}); //End
372
373
374 // ------- Site Sticky Footer Start ------- //
375    if ($('#site-footer').length) {
376        if ($('#site-footer').length) {
377            siteFooter();
378            $(window).on('resize', function() {
379                siteFooter();
380            });
381
382            function siteFooter() {
383                var siteContent = $('#site-footer');
384                var siteContentHeight = siteContent.height();
385                var siteContentWidth = siteContent.width();
386
387                var siteFooter = $('#call-2-action');
388                var siteFooterHeight = siteFooter.height();
389                var siteFooterWidth = siteFooter.width();
390
391                // console.log('Content Height = ' + siteContentHeight + 'px');
392                // console.log('Content Width = ' + siteContentWidth + 'px');
393                // console.log('Footer Height = ' + siteFooterHeight + 'px');
394                // console.log('Footer Width = ' + siteFooterWidth + 'px');
395
396                siteContent.css({
397                    "margin-bottom": siteFooterHeight + 50
398                });
399            };
400        }
401    }
402    // ------- Site Sticky Footer End ------- //	

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.