PageSourceSearch

https://www.dpaonthenet.net/js/scripts.js

js dpaonthenet.net collected 2026-10-03 20:52:45 UTC 23,719 bytes, 655 lines download raw bytes

1// All functions  ------------------
2function initGmag() {
3    $('head').append('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">');
4    "use strict";
5    //   date------------------
6    var date = new Date(),
7        monthsCal = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"],
8        curdate = date.getDate(),
9        getMon = monthsCal[date.getMonth()],
10        getyear = date.getFullYear();
11    $(".date_num").text(curdate);
12    $(".date_mounth").text(getMon);
13    $(".date_year").text(getyear);
14    //   ticker------------------
15    $('.header_news-ticker').easyTicker({
16        direction: 'up',
17        easing: 'swing',
18        interval: 2500,
19        mousePause: true,
20        controls: {
21            up: '.n_btn',
22            down: '.p_btn',
23
24        },
25    });
26    $('.picker-wrap').easyTicker({
27        direction: 'up',
28        visible: 3,
29        interval: 3500,
30        controls: {
31            up: '.pwc_up',
32            down: '.pwc_down',
33            toggle: '.pwc_pause'
34        }
35    });
36    $(".pwc_pause").on("click", function () {
37        $(this).toggleClass("pwc_tog-pp");
38
39    });
40    var maxL = 42;
41    $(".grid-post-content h3 a").each(function (i, div) {
42        var text = $(div).text();
43        if (text.length > maxL) {
44            var begin = text.substr(0, maxL),
45                end = text.substr(maxL);
46            $(div).html(begin).append($('<div class="hidden" />').html(end));
47        }
48    });
49    var maxLp = 90;
50    $(".grid-post-content p").each(function (i, div) {
51        var textp = $(div).text();
52        if (textp.length > maxLp) {
53            var beginp = textp.substr(0, maxLp),
54                end = textp.substr(maxLp);
55            $(div).html(beginp).append($('<div class="hidden" />').html(end));
56        }
57    });
58    $(".style-select").niceSelect();
59    //   lightGallery------------------
60    function lightGalleryInit() {
61        $(".image-popup").lightGallery({
62            selector: "this",
63            cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)",
64            download: false,
65            counter: false
66        });
67        var o = $(".lightgallery"),
68            p = o.data("looped");
69        o.lightGallery({
70            selector: ".lightgallery a.popup-image",
71            cssEasing: "cubic-bezier(0.25, 0, 0.25, 1)",
72            download: false,
73            loop: false,
74            counter: false
75        });
76        $('#html5-videos').lightGallery({
77            selector: 'this',
78            counter: false,
79            download: false,
80            zoom: false
81        });
82    }
83    lightGalleryInit();
84    // tabs ------------------
85    $(".tabs-menu a").on("click", function (a) {
86        a.preventDefault();
87        $(this).parent().addClass("current");
88        $(this).parent().siblings().removeClass("current");
89        var b = $(this).attr("href");
90        $(this).parents(".tabs-act").find(".tab-content").not(b).css("display", "none");
91        $(b).fadeIn();
92    });
93    $(".sicb_btn").on("click", function (e) {
94        e.preventDefault();
95        $(".cookie-info-bar").animate({
96            opacity: "0",
97            bottom: "-100px"
98        }, 500);
99        setTimeout(function () {
100            $(".cookie-info-bar").remove();
101        }, 1500);
102    });
103    // isotope------------------
104    function n() {
105        if ($(".gallery-items").length) {
106            var $grid = $(".gallery-items").isotope({
107                singleMode: true,
108                columnWidth: ".grid-sizer, .grid-sizer-second, .grid-sizer-three",
109                itemSelector: ".gallery-item, .gallery-item-second, .gallery-item-three"
110            });
111            $grid.imagesLoaded(function () {
112                $grid.isotope("layout");
113            });
114            $(".gallery-filters").on("click", "a.gallery-filter", function (b) {
115                b.preventDefault();
116                var c = $(this).attr("data-filter"),
117                    d = $(this).text();
118                if ($(".gallery-items").hasClass('sf_true')) {
119                    setTimeout(function () {
120                        $grid.isotope({
121                            filter: c
122                        });
123                    }, 500);
124                    $('html, body').animate({
125                        scrollTop: $("#scroll-folio").offset().top - 80
126                    }, 400);
127                } else {
128                    $grid.isotope({
129                        filter: c
130                    });
131                }
132                $(".gallery-filters a").removeClass("gallery-filter-active");
133                $(this).addClass("gallery-filter-active");
134            });
135            var gat = $(".gallery-filter-active").text();
136        }
137
138    }
139    n();
140    // Other functions ------------------
141    function initbg() {
142        var n = $(".bg");
143        n.each(function (a) {
144            if ($(this).attr("data-bg")) $(this).css("background-image", "url(" + $(this).data("bg") + ")");
145        });
146    }
147    initbg();
148    //   RangeSlider------------------
149    $(".rage-slider").ionRangeSlider({
150        postfix: "px",
151    });
152    $(".shop-price").ionRangeSlider({
153        keyboard: true,
154        prefix: "$"
155    });
156    $(".smact").on("click", function (e) {
157        e.preventDefault();
158        $(this).toggleClass("smact_vis");
159        $(this).parents(".smpar").find(".show-more-snopt-tooltip").toggleClass("show-more-snopt-tooltip_vis");
160    });
161    var maxL = 90;
162    $(".dbig p").each(function (i, div) {
163        var text = $(div).text();
164        if (text.length > maxL) {
165            var begin = text.substr(0, maxL),
166                end = text.substr(maxL);
167            $(div).html(begin).append($('<div class="hidden" />').html(end));
168        }
169    });
170    $(".custom-scroll-link").on("click", function () {
171        var a = 50;
172        if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") || location.hostname == this.hostname) {
173            var b = $(this.hash);
174            b = b.length ? b : $("[name=" + this.hash.slice(1) + "]");
175            if (b.length) {
176                $("html,body").animate({
177                    scrollTop: b.offset().top - a
178                }, {
179                    queue: false,
180                    duration: 1200,
181                    easing: "easeInOutExpo"
182                });
183                return false;
184            }
185        }
186    });
187    //   Contact form------------------
188    $(document).on('submit', '#contactform', function () {
189        var a = $(this).attr("action");
190        $("#message").slideUp(750, function () {
191            $("#message").hide();
192            $("#submit").attr("disabled", "disabled");
193            $.post(a, {
194                name: $("#name").val(),
195                email: $("#email").val(),
196                comments: $("#comments").val()
197            }, function (a) {
198                document.getElementById("message").innerHTML = a;
199                $("#message").slideDown("slow");
200                $("#submit").removeAttr("disabled");
201                if (null != a.match("success")) $("#contactform").slideDown("slow");
202            });
203        });
204        return false;
205    });
206    $(document).on('keyup', '#contactform input, #contactform textarea', function () {
207        $("#message").slideUp(1500);
208    });
209    //   mailchimp------------------
210    $("#subscribe").ajaxChimp({
211        language: "eng",
212        url: "https://gmail.us1.list-manage.com/subscribe/post?u=1fe818378d5c129b210719d80&amp;id=a2792f681b"
213    });
214    $.ajaxChimp.translations.eng = {
215        submit: "Submitting...",
216        0: '<i class="fal fa-check"></i> We will be in touch soon!',
217        1: '<i class="fal fa-exclamation-circle"></i> You must enter a valid e-mail address.',
218        2: '<i class="fal fa-exclamation-circle"></i> E-mail address is not valid.',
219        3: '<i class="fal fa-exclamation-circle"></i> E-mail address is not valid.',
220        4: '<i class="fal fa-exclamation-circle"></i> E-mail address is not valid.',
221        5: '<i class="fal fa-exclamation-circle"></i> E-mail address is not valid.'
222    };
223    $(".to-top").on("click", function (a) {
224        a.preventDefault();
225        $("html, body").animate({
226            scrollTop: 0
227        }, 800);
228        return false;
229    });
230    if ($(".header-cart_wrap_container").length > 0) {
231        var aps = new PerfectScrollbar('.header-cart_wrap_container', {
232            swipeEasing: true,
233            minScrollbarLength: 20
234        });
235    }
236    if ($(".video-links-wrap").length > 0) {
237        var aps = new PerfectScrollbar('.video-links-wrap', {
238            swipeEasing: true,
239            minScrollbarLength: 20
240        });
241    }
242    var scwrp = $(".header-search-wrap"),
243        swlink = $(".show_search-btn");
244    function showSearch() {
245        scwrp.fadeIn(1).addClass("vis-search").removeClass("novis_sarch")
246        swlink.addClass("scwllink2");
247        hideCart();
248        hideShare();
249    }
250    function hideSearch() {
251        scwrp.fadeOut(1).removeClass("vis-search").addClass("novis_sarch");
252        swlink.removeClass("scwllink2");
253    }
254    swlink.on("click", function () {
255        if (scwrp.hasClass("novis_sarch")) showSearch();
256        else hideSearch();
257    });
258    var wlwrp = $(".header-cart_wrap"),
259        wllink = $(".sc_btn");
260
261    function showCart() {
262        wlwrp.fadeIn(1).addClass("vis-cart").removeClass("novis_cart")
263        aps.update();
264        wllink.addClass("scwllink");
265        // hideShare();
266        hideSearch();
267    }
268    function hideCart() {
269        wlwrp.fadeOut(1).removeClass("vis-cart").addClass("novis_cart");
270        wllink.removeClass("scwllink");
271    }
272    wllink.on("click", function () {
273        if (wlwrp.hasClass("novis_cart")) showCart();
274        else hideCart();
275    });
276
277
278    // duplicate -----------------
279    $.fn.duplicate = function (a, b) {
280        var c = [];
281        for (var d = 0; d < a; d++) $.merge(c, this.clone(b).get());
282        return this.pushStack(c);
283    };
284    var cr = $(".star-rating");
285    cr.each(function (cr) {
286        var starcount = $(this).attr("data-starrating");
287        $("<i class='fas fa-star'></i>").duplicate(starcount).prependTo(this);
288    });
289    $(window).on("scroll", function () {
290        var a = $(document).height();
291        var b = $(window).height();
292        var c = $(this).scrollTop();
293        var d = c / (a - b) * 100;
294        $(".progress-bar").css({
295            width: d + "%"
296        });
297        $('.hero-section_bg .bg').css('transform', 'translate3d(0, ' + +(c * 0.25) + 'px, 0)');
298        if ($(this).scrollTop() > 150) {
299            $(".top-bar").addClass("scroll-sticky");
300            $(".aside-panel").addClass("vis_secnav");
301        } else {
302            $(".top-bar").removeClass("scroll-sticky");
303            $(".aside-panel").removeClass("vis_secnav");
304        }
305    });
306    // swiper -----------------
307    if ($(".single-slider").length > 0) {
308        var j2 = new Swiper(".single-slider .swiper-container", {
309            preloadImages: false,
310            slidesPerView: 1,
311            spaceBetween: 0,
312            loop: true,
313            autoHeight: true,
314            grabCursor: true,
315            mousewheel: false,
316            pagination: {
317                el: '.ss-slider-pagination',
318                clickable: true,
319            },
320            navigation: {
321                nextEl: '.ss-slider-cont-next',
322                prevEl: '.ss-slider-cont-prev',
323            },
324        });
325    }
326    if ($(".video_carousel").length > 0) {
327        var j2 = new Swiper(".video_carousel .swiper-container", {
328            preloadImages: false,
329            freeMode: false,
330            slidesPerView: 3,
331            spaceBetween: 20,
332            loop: true,
333            grabCursor: true,
334            mousewheel: false,
335            navigation: {
336                nextEl: '.cc-next',
337                prevEl: '.cc-prev',
338            },
339            pagination: {
340                el: '.vc-pagination',
341                clickable: true,
342            },
343            breakpoints: {
344                1064: {
345                    slidesPerView: 3,
346                },
347                768: {
348                    slidesPerView: 2,
349                },
350                100: {
351                    slidesPerView: 1,
352                },
353            }
354        });
355    }
356    if ($(".single-grid-slider").length > 0) {
357        var teamCarousel = new Swiper(".single-grid-slider .swiper-container", {
358            preloadImages: false,
359            loop: true,
360            centeredSlides: false,
361            freeMode: false,
362            slidesPerView: 1,
363            spaceBetween: 0,
364            grabCursor: true,
365            mousewheel: false,
366            parallax: false,
367            speed: 1400,
368            pagination: {
369                el: '.sgs-pagination',
370                clickable: true,
371            }
372        });
373    }
374    if ($(".fs-carousel").length > 0) {
375        var teamCarousel = new Swiper(".fs-carousel .swiper-container", {
376            preloadImages: false,
377            loop: true,
378            centeredSlides: false,
379            freeMode: false,
380            slidesPerView: 4,
381            spaceBetween: 0,
382            grabCursor: true,
383            mousewheel: false,
384            parallax: true,
385            speed: 1400,
386            navigation: {
387                nextEl: '.gc-button-next',
388                prevEl: '.gc-button-prev',
389            },
390            breakpoints: {
391                1700: {
392                    slidesPerView: 4,
393                },
394                1268: {
395                    slidesPerView: 3,
396                },
397                764: {
398                    slidesPerView: 2,
399                },
400                100: {
401                    slidesPerView: 1,
402                },
403            }
404        });
405    }
406    if ($(".hero-carousel").length > 0) {
407        var teamCarousel = new Swiper(".hero-carousel .swiper-container", {
408            preloadImages: false,
409            loop: true,
410            centeredSlides: true,
411            freeMode: false,
412            slidesPerView: 3,
413            spaceBetween: 10,
414            grabCursor: true,
415            mousewheel: false,
416            parallax: false,
417            speed: 1400,
418            navigation: {
419                nextEl: '.hc-cont-next',
420                prevEl: '.hc-cont-prev',
421            },
422            pagination: {
423                el: '.hero-carousel-pag',
424                clickable: true,
425            },
426            breakpoints: {
427                1068: {
428                    slidesPerView: 3,
429                },
430                640: {
431                    slidesPerView: 2,
432                },
433                100: {
434                    slidesPerView: 1,
435                },
436            }
437        });
438    }
439    if ($(".multi-slider").length > 0) {
440        var ms2 = new Swiper(".multi-slider_control .swiper-container", {
441            preloadImages: false,
442            loop: true,
443            speed: 2400,
444            spaceBetween: 30,
445            slidesPerView: 3,
446            watchSlidesProgress: true,
447            effect: "slide",
448        });
449        var ms1 = new Swiper(".multi-slider .swiper-container", {
450            preloadImages: false,
451            loop: true,
452            speed: 2400,
453            spaceBetween: 0,
454            effect: "slide",
455            grabCursor: true,
456            parallax: false,
457            pagination: {
458                el: '.multi-pag',
459                clickable: true,
460            },
461            thumbs: {
462                swiper: ms2,
463            },
464            navigation: {
465                nextEl: '.fs-slider-button-next',
466                prevEl: '.fs-slider-button-prev',
467            },
468            autoplay: {
469                delay: 3500,
470                disableOnInteraction: false
471            },
472
473        });
474        ms1.on("slideChangeTransitionStart", function () {
475            $(".slider-progress-bar").removeClass("act-slider");
476        });
477        ms1.on("slideChangeTransitionEnd", function () {
478            $(".slider-progress-bar").addClass("act-slider");
479        });
480    }
481
482    // video -----------------
483    var mianVidLink = $('.video-links-wrap .video-item'),
484        mianVidLinkAct = $('.video-links-wrap .video-item.video-item_active'),
485        videoHolder = $(".vh-main"),
486        videoHolderTitle = $(".video-holder-title"),
487        stisDataUrlPopupAct = mianVidLinkAct.data("video-link"),
488        stisDataUrlAct = mianVidLinkAct.data("url"),
489        stisDataUrlbgAct = mianVidLinkAct.find('img').attr("src"),
490        stisDataUrlCatAct = mianVidLinkAct.find('.post-category-marker').text(),
491        stisDataUrlCatUrlAct = mianVidLinkAct.find('.post-category-marker').attr("href"),
492        stisTitleAct = mianVidLinkAct.find('.video-item-title h4').text(),
493        stisTitleDateAct = mianVidLinkAct.find('.video-date strong').text();
494    videoHolder.attr("href", stisDataUrlPopupAct);
495    videoHolder.find(".bg").css("background-image", "url(" + stisDataUrlbgAct + ")");
496    videoHolderTitle.find(".video-holder-title_item a").attr("href", stisDataUrlAct);
497    videoHolderTitle.find(".video-holder-title_item a").text(stisTitleAct);
498    videoHolderTitle.find(".video-date strong").text(stisTitleDateAct);
499    videoHolderTitle.find(".post-category-marker").text(stisDataUrlCatAct);
500    videoHolderTitle.find(".post-category-marker").attr("href", stisDataUrlCatUrlAct);
501    mianVidLink.on("click", function () {
502        var that = $(this),
503            stisDataUrlPopup = that.data("video-link"),
504            stisDataUrl = that.data("url"),
505            stisDataUrlbg = that.find('img').attr("src"),
506            stisDataUrlCat = that.find('.post-category-marker').text(),
507            stisDataUrlCatUrl = that.find('.post-category-marker').attr("href"),
508            stisTitle = that.find('.video-item-title h4').text(),
509            stisTitleDate = that.find('.video-date strong').text();
510        $(".vh-preloader ").fadeIn(400).delay(100).fadeOut(400);
511        setTimeout(function () {
512            videoHolder.attr("href", stisDataUrlPopup);
513            videoHolder.find(".bg").css("background-image", "url(" + stisDataUrlbg + ")");
514            videoHolderTitle.find(".video-holder-title_item a").attr("href", stisDataUrl);
515            videoHolderTitle.find(".video-holder-title_item a").text(stisTitle);
516            videoHolderTitle.find(".video-date strong").text(stisTitleDate);
517            videoHolderTitle.find(".post-category-marker").text(stisDataUrlCat);
518            videoHolderTitle.find(".post-category-marker").attr("href", stisDataUrlCatUrl);
519        }, 500);
520        mianVidLink.removeClass("video-item_active");
521        that.addClass("video-item_active");
522    });
523    // Mob Menu------------------
524    $(".nav-button-wrap").on("click", function () {
525        $(".main-menu").toggleClass("vismobmenu");
526    });
527    function mobMenuInit() {
528        var ww = $(window).width();
529        if (ww < 1048) {
530            $(".menusb").remove();
531            $(".main-menu").removeClass("nav-holder");
532            $(".main-menu nav").clone().addClass("menusb").appendTo(".main-menu");
533            $(".menusb").menu();
534        } else {
535            $(".menusb").remove();
536            $(".main-menu").addClass("nav-holder");
537        }
538    }
539    mobMenuInit();
540    $("#menu2").menu();
541    $(".categories_nav-inner a.nav").parent("li").addClass("submen-dec");
542    //   css ------------------
543    var $window = $(window);
544    $window.on("resize", function () {
545        mobMenuInit();
546    });
547    $(".show-hidd-filters").on("click", function (w) {
548        w.preventDefault();
549        $(".mob-hid_filters").slideToggle(300);
550    });
551
552    // weather -----------------
553    var datacityw = $("#weather-widget").data("city");
554    $("#weather-widget").ideaboxWeather({
555        location: datacityw,
556    });
557    $(".fontSize input").on("input", function () {
558        $('#font_chage').find("p").css("font-size", $(this).val() + "px");
559    });
560    // ajax news -----------------
561    $(".ajax-nav li a").click(function () {
562        $("#ajax-content").animate({
563            opacity: "0"
564        }, 500);
565        $(".ajax-nav li a").removeClass('current_page');
566        $(this).addClass('current_page');
567        $(".ajax-loader").fadeIn(100);
568        setTimeout(function () {
569            $("#ajax-content").empty();
570        }, 500);
571        $.ajax({
572            url: this.href,
573            success: function (html) {
574                setTimeout(function () {
575                    $("#ajax-content").animate({
576                        opacity: "1"
577                    }, 500);
578                    $("#ajax-content").empty().append(html);
579                    initbg();
580                    $(".ajax-loader").fadeOut(100);
581                }, 500);
582            }
583        });
584        return false;
585    });
586    if ($("#ajax-content").length > 0) {
587        $("#ajax-content").empty();
588        $.ajax({
589            url: 'ajax/category1.html',
590            success: function (html) {
591                $("#ajax-content").empty().append(html);
592                initbg();
593            }
594        });
595    }
596    // scrolltofixed -----------------
597    $(".fix-bar").scrollToFixed({
598        minWidth: 1064,
599        marginTop: 120,
600        removeOffsets: true,
601        limit: function () {
602            var a = $(".limit-box").offset().top - $(".fix-bar").outerHeight(true) + 36;
603            return a;
604        }
605    });
606    $(".left_fix-bar").scrollToFixed({
607        minWidth: 1064,
608        marginTop: 90,
609        removeOffsets: true,
610        limit: function () {
611            var a = $(".limit-box").offset().top - $(".left_fix-bar").outerHeight(true) + 36;
612            return a;
613        }
614    });
615    $(".single-post-content_column").scrollToFixed({
616        minWidth: 856,
617        marginTop: 90,
618        removeOffsets: true,
619        limit: function () {
620            var a = $(".limit-box2").offset().top - $(".single-post-content_column").outerHeight(true);
621            return a;
622        }
623    });
624    if ($(".fixed-bar").outerHeight(true) < $(".fix-container-init").outerHeight(true)) {
625        $(".fixed-bar").addClass("fixbar-action");
626        $(".fixbar-action").scrollToFixed({
627            minWidth: 1064,
628            marginTop: function () {
629                var a = $(window).height() - $(".fixed-bar").outerHeight(true) - 10;
630                if (a >= 0) return 0;
631                return a;
632            },
633            removeOffsets: true,
634            limit: function () {
635                var a = $(".limit-box").offset().top - $(".fixed-bar").outerHeight();
636                return a;
637            }
638        });
639    } else $(".fixed-bar").removeClass("fixbar-action");
640    $(".picker-wrap-controls ul").scrollToFixed({
641        marginTop: 90,
642        removeOffsets: true,
643        limit: function () {
644            var a = $(".controls-limit").offset().top - $(".picker-wrap-controls ul").outerHeight(true);
645            return a;
646        }
647    });
648}
649document.addEventListener('gesturestart', function (e) {
650    e.preventDefault();
651});
652// Init all functions------------------
653$(document).ready(function () {
654    initGmag();
655});

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.