!(function (o) {
    "use strict";
    function e() {
        o(".main-header").length && (250 <= o(window).scrollTop() ? (o(".main-header").addClass("fixed-header"), o(".scroll-to-top").fadeIn(300)) : (o(".main-header").removeClass("fixed-header"), o(".scroll-to-top").fadeOut(300)));
    }
    var t, a, n;
    e(),
        o(".main-header li.dropdown ul").length &&
            (o(".main-header li.dropdown").append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>'),
            o(".main-header li.dropdown .dropdown-btn").on("click", function () {
                o(this).prev("ul").slideToggle(500);
            }),
            o(".navigation li.dropdown > a").on("click", function (e) {
                e.preventDefault();
            })),
        o(".main-slider .tp-banner").length &&
            ((a = (t = o(".main-slider")).attr("data-start-height")),
            (n = "'" + t.attr("data-slide-overlay") + "'"),
            o(".main-slider .tp-banner")
                .show()
                .revolution({
                    dottedOverlay: n,
                    delay: 1e4,
                    startwidth: 1200,
                    startheight: a,
                    hideThumbs: 600,
                    thumbWidth: 80,
                    thumbHeight: 50,
                    thumbAmount: 5,
                    navigationType: "bullet",
                    navigationArrows: "0",
                    navigationStyle: "preview3",
                    touchenabled: "on",
                    onHoverStop: "off",
                    swipe_velocity: 0.7,
                    swipe_min_touches: 1,
                    swipe_max_touches: 1,
                    drag_block_vertical: !1,
                    parallax: "mouse",
                    parallaxBgFreeze: "on",
                    parallaxLevels: [7, 4, 3, 2, 5, 4, 3, 2, 1, 0],
                    keyboardNavigation: "off",
                    navigationHAlign: "center",
                    navigationVAlign: "bottom",
                    navigationHOffset: 0,
                    navigationVOffset: 40,
                    soloArrowLeftHalign: "left",
                    soloArrowLeftValign: "center",
                    soloArrowLeftHOffset: 20,
                    soloArrowLeftVOffset: 20,
                    soloArrowRightHalign: "right",
                    soloArrowRightValign: "center",
                    soloArrowRightHOffset: 20,
                    soloArrowRightVOffset: 20,
                    shadow: 0,
                    fullWidth: "on",
                    fullScreen: "off",
                    spinner: "spinner4",
                    stopLoop: "off",
                    stopAfterLoops: -1,
                    stopAtSlide: -1,
                    shuffle: "off",
                    autoHeight: "off",
                    forceFullWidth: "on",
                    hideThumbsOnMobile: "on",
                    hideNavDelayOnMobile: 1500,
                    hideBulletsOnMobile: "on",
                    hideArrowsOnMobile: "on",
                    hideThumbsUnderResolution: 0,
                    hideSliderAtLimit: 0,
                    hideCaptionAtLimit: 0,
                    hideAllCaptionAtLilmit: 0,
                    startWithSlide: 0,
                    videoJsPath: "",
                    fullScreenOffsetContainer: "",
                })),
        o(".single-item-carousel").length &&
            o(".single-item-carousel").owlCarousel({
                loop: !0,
                margin: 0,
                nav: !0,
                smartSpeed: 500,
                autoplay: 4e3,
                navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>'],
                responsive: { 0: { items: 1 }, 600: { items: 1 }, 800: { items: 1 }, 1024: { items: 1 }, 1200: { items: 1 } },
            }),
        o(".two-item-carousel").length &&
            o(".two-item-carousel").owlCarousel({
                loop: !0,
                margin: 30,
                nav: !0,
                smartSpeed: 500,
                autoplay: 4e3,
                navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>'],
                responsive: { 0: { items: 1 }, 600: { items: 2 }, 800: { items: 2 }, 1024: { items: 2 }, 1200: { items: 2 } },
            }),
        o(".three-item-carousel").length &&
            o(".three-item-carousel").owlCarousel({
                loop: !0,
                margin: 30,
                nav: !0,
                smartSpeed: 500,
                autoplay: 4e3,
                navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>'],
                responsive: { 0: { items: 1 }, 600: { items: 2 }, 800: { items: 2 }, 1024: { items: 3 }, 1200: { items: 3 } },
            }),
        o(".four-item-carousel").length &&
            o(".four-item-carousel").owlCarousel({
                loop: !0,
                margin: 30,
                nav: !0,
                smartSpeed: 500,
                autoplay: 4e3,
                navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>'],
                responsive: { 0: { items: 1 }, 600: { items: 2 }, 800: { items: 3 }, 1024: { items: 3 }, 1200: { items: 3 } },
            }),
        o("#search-popup").length &&
            (o(".search-box-btn").on("click", function (e) {
                e.preventDefault(), o("#search-popup").addClass("popup-visible");
            }),
            o(".close-search").on("click", function () {
                o("#search-popup").removeClass("popup-visible");
            })),
        o(".accordion-box").length &&
            o(".accordion-box").on("click", ".acc-btn", function () {
                var e = o(this).parents(".accordion");
                if ((!0 !== o(this).hasClass("active") && o(".accordion .acc-btn").removeClass("active"), o(this).next(".acc-content").is(":visible"))) return !1;
                o(this).addClass("active"), o(".accordion").removeClass("active-block"), o(".accordion .acc-content").slideUp(300), e.addClass("active-block"), o(this).next(".acc-content").slideDown(300);
            }),
        o(".lightbox-image").length && o(".lightbox-image").fancybox({ openEffect: "fade", closeEffect: "fade", helpers: { media: {} } }),
        o(".filter-list").length && o(".filter-list").mixItUp({}),
        o("#contact-form").length && o("#contact-form").validate({ rules: { firstname: { required: !0 }, lastname: { required: !0 }, email: { required: !0, email: !0 }, message: { required: !0 } } }),
        o(".scroll-to-target").length &&
            o(".scroll-to-target").on("click", function () {
                var e = o(this).attr("data-target");
                o("html, body").animate({ scrollTop: o(e).offset().top }, 1e3);
            }),
        o(".wow").length && new WOW({ boxClass: "wow", animateClass: "animated", offset: 0, mobile: !1, live: !0 }).init(),
        o(window).on("scroll", function () {
            e(),
                o(".fact-counter").length &&
                    o(".fact-counter .counter-column.animated").each(function () {
                        var e = o(this),
                            t = e.find(".count-text").attr("data-stop"),
                            a = parseInt(e.find(".count-text").attr("data-speed"), 10);
                        e.hasClass("counted") ||
                            (e.addClass("counted"),
                            o({ countNum: e.find(".count-text").text() }).animate(
                                { countNum: t },
                                {
                                    duration: a,
                                    easing: "linear",
                                    step: function () {
                                        e.find(".count-text").text(Math.floor(this.countNum));
                                    },
                                    complete: function () {
                                        e.find(".count-text").text(this.countNum);
                                    },
                                }
                            ));
                    });
        }),
        o(window).on("load", function () {
            o(".preloader").length && o(".preloader").delay(200).fadeOut(500);
        });
})(window.jQuery);
