PageSourceSearch

https://www.gcdentalcampus.com/site/www.gcdentalcampus.com/js/scripts.js?v=1773401877

js gcdentalcampus.com collected 2026-09-26 05:31:22 UTC 7,944 bytes, 266 lines download raw bytes

1$(function () {
2    var currentPath = window.location.pathname.replace(/\/$/, '');
3
4    $('.main-menu .menu li a').each(function () {
5        var linkPath = new URL(this.href).pathname.replace(/\/$/, '');
6
7        if (currentPath === linkPath) {
8            $(this).addClass('active');
9        }
10    });
11});
12
13
14
15$(document).ready(function () {
16    $(".slider.owl-carousel").owlCarousel({
17        margin: 0,
18        items: 1,
19        loop: true,
20        nav: false,
21        autoplay: false,
22        autoplayTimeout: 5000,
23        autoplaySpeed: 500,
24        navText: ["", ""],
25        dots: true,
26        dotsEach: false,
27        mouseDrag: true,
28        autoHeight: true,
29        responsive: {},
30    });
31
32    $(".listing.owl-carousel, .certificates.owl-carousel").each(function () {
33        let $carousel = $(this);
34        let $dots = $carousel.prev().find(".listing-dots");
35
36        $carousel.owlCarousel({
37            items: 2,
38            loop: true,
39            nav: false,
40            autoplay: false,
41            dots: true,
42            mouseDrag: true,
43            autoHeight: true,
44
45            responsive: {
46                0: {
47                    items: 1,
48                    margin: 0,
49                    dotsContainer: false, // 👈 IMPORTANT
50                },
51                992: {
52                    items: 2,
53                    margin: 40,
54                    dotsContainer: $dots,
55                },
56            },
57        });
58    });
59
60    $(window).on("resize", function () {
61        $(".listing.owl-carousel, .certificates.owl-carousel").trigger(
62            "refresh.owl.carousel",
63        );
64    });
65
66
67
68    
69
70    $(".symposia-banners.owl-carousel").each(function () {
71        let $carousel = $(this);
72        let $dots = $carousel.prev().find(".listing-dots");
73
74        $carousel.owlCarousel({
75            items: 1,
76            loop: true,
77            nav: false,
78            autoplay: false,
79            dots: true,
80            mouseDrag: true,
81            autoHeight: true,
82
83            responsive: {
84                0: {
85                    items: 1,
86                    margin: 0,
87                    dotsContainer: false, // 👈 IMPORTANT
88                },
89                992: {
90                    items: 1,
91                    margin: 40,
92                    dotsContainer: $dots,
93                },
94            },
95        });
96    });
97
98    $(window).on("resize", function () {
99        $(".symposia-banners.owl-carousel").trigger(
100            "refresh.owl.carousel",
101        );
102    });
103
104
105    $(".event-carousel.owl-carousel").each(function () {
106        let $carousel = $(this);
107        let $dots = $(this).prev().find(".listing-dots");
108
109        $carousel.owlCarousel({
110            margin: 10,
111            items: 6,
112            loop: true,
113            nav: true,
114            autoplay: true,
115            autoplayTimeout: 3000,
116            autoplaySpeed: 500,
117            navText: [
118                '<i class="fa-thin fa-angle-left"></i>',
119                '<i class="fa-thin fa-angle-right"></i>',
120            ],
121            dots: true,
122            dotsEach: false,
123            autoplayHoverPause: true,
124            mouseDrag: true,
125            autoHeight: true,
126            responsive: {
127                0: {
128                    items: 2,
129                    margin: 20,
130                    dotsContainer: false, // 👈 IMPORTANT
131                },
132                992: {
133                    items: 3,
134                    margin: 20,
135                     dotsContainer: $dots,
136                },
137                1200: {
138                    items: 6,
139                    margin: 20,
140                },
141            },
142        });
143    });
144
145    // Create the floating zoom preview container
146    let $zoom = $(
147        '<div id="event-carousel-preview" class="hidden"></div>',
148    ).appendTo("body");
149    let zoomTimer = null;
150
151    // Hover in: start delay timer
152    $(".event-carousel").on("mouseenter", ".owl-item", function () {
153        const $item = $(this).find(".elem").clone();
154        const rect = this.getBoundingClientRect();
155
156        // Start 1-second delay before showing zoom
157        zoomTimer = setTimeout(() => {
158            $zoom
159                .html($item.html())
160                .css({
161                    top: rect.top + "px",
162                    left: rect.left + "px",
163                    width: rect.width + "px",
164                    height: rect.height - 10 + "px",
165                })
166                .removeClass("hidden");
167        }, 500); // 1000ms = 1 second
168    });
169
170    // Hover out: cancel timer and hide zoom
171    $(".event-carousel").on("mouseleave", ".owl-item", function () {
172        clearTimeout(zoomTimer);
173        $zoom.addClass("hidden");
174    });
175
176    $(document).on("scroll", function () {
177        clearTimeout(zoomTimer);
178        $zoom.addClass("hidden");
179    });
180
181    function setItemMinHeightPerRow() {
182        $(".listing:not(.owl-carousel)").each(function () {
183            const $listing = $(this);
184            const items = $listing.find(".item");
185            const columns = parseInt($listing.data("columns")) || 2;
186
187            // reset heights
188            items.css("min-height", "");
189            items.find(".text").css("min-height", "");
190
191            // loop per row
192            for (let i = 0; i < items.length; i += columns) {
193                const rowItems = items.slice(i, i + columns);
194                let maxHeight = 0;
195
196                rowItems.each(function () {
197                    const textHeight = $(this).find(".text").outerHeight();
198                    const photoHeight = $(this)
199                        .find("> .photo img")
200                        .outerHeight();
201                    maxHeight = Math.max(maxHeight, textHeight, photoHeight);
202                });
203
204                rowItems.css("min-height", maxHeight + "px");
205                rowItems.find(".text").css("min-height", maxHeight + "px");
206            }
207        });
208    }
209
210    $(document).ready(function () {
211        // Run after all images inside each .listing are loaded
212        $(".listing").each(function () {
213            const $listing = $(this);
214            $listing.imagesLoaded(function () {
215                setItemMinHeightPerRow();
216            });
217        });
218
219        // Re-run on resize
220        $(window).on("resize", function () {
221            $(".listing").each(function () {
222                const $listing = $(this);
223                $listing.imagesLoaded(function () {
224                    setItemMinHeightPerRow();
225                });
226            });
227        });
228    });
229});
230
231function setOwlCarouselItemHeight() {
232    $(".listing.owl-carousel").each(function () {
233        const $carousel = $(this);
234        const items = $carousel.find(".owl-item .item");
235
236        // reset heights
237        items.css("min-height", "");
238        items.find(".text").css("min-height", "");
239
240        let maxHeight = 0;
241
242        items.each(function () {
243            const textHeight = $(this).find(".text").outerHeight();
244            const photoHeight = $(this).find("> .photo img").outerHeight();
245            maxHeight = Math.max(maxHeight, textHeight, photoHeight);
246        });
247
248        items.css("min-height", maxHeight + "px");
249        items.find(".text").css("min-height", maxHeight + "px");
250    });
251}
252
253// Run after Owl Carousel initializes
254$(".listing.owl-carousel").on("initialized.owl.carousel", function () {
255    const $carousel = $(this);
256    $carousel.imagesLoaded(function () {
257        setOwlCarouselItemHeight();
258    });
259});
260
261$(".listing.owl-carousel").on("resized.owl.carousel", function () {
262    const $carousel = $(this);
263    $carousel.imagesLoaded(function () {
264        setOwlCarouselItemHeight();
265    });
266});

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.