$(document).ready(function() {
    $(".fancybox").fancybox(), $("#getQuote").on("hidden.bs.modal", function(e) {
        $("body").removeAttr("style")
    }), $(".formSection .form-control").on("focus", function() {
        $(this).parent(".form-group").addClass("fix-label")
    }), $(".formSection .form-control").on("blur", function() {
        $(this).val().length > 0 ? $(this).parent(".form-group").addClass("fix-label") : $(this).parent(".form-group").removeClass("fix-label")
    }), $(".navicon .nav-toggle").on("click", function() {
        $(this).toggleClass("active"), $(".detailHeader").toggleClass("active"), $("body").toggleClass("headerOpen")
    }), $(".client-logo").owlCarousel({
        loop: !0,
        margin: 10,
        nav: !0,
        dots: !1,
        autoplay: !0,
        autoplayTimeout: 2e3,
        autoplayHoverPause: !0,
        responsive: {
            0: {
                items: 2,
            },
            600: {
                items: 3
            },
            1000: {
                items: 5
            }
        }
    }),
    $(".pricing-slider").owlCarousel({
        loop: true,
        margin: 0,
        nav: false,
        dots: true,
        mouseDrag: true,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 1
            },
            768: {
                items: 1
            },
            1000: {
                items: 3
            }
        }
    }),
    $(".package-box .package-detail ul").slimScroll({
            height: "300px",
            color: "rgb(186 131 26)"
        }), 0 != $(".scroll").length && $(".scroll").slimScroll({
            height: "150px",
            size: "6px",
            color: "rgb(186 131 26)",
            alwaysVisible: !0,
            distance: "16px",
            railVisible: !0,
            railColor: " rgb(186 131 26)",
            railOpacity: 1,
            railBorderRadius: "0px",
            wheelStep: 10,
            disableFadeOut: !1
        }),
     $(".porfolio-carousel").owlCarousel({
        loop: !0,
        margin: 30,
        nav: !1,
        dots: !0,
        responsive: {
            0: {
                items: 2
            },
            600: {
                items: 2
            },
            1000: {
                items: 4
            }
        }
    }), $(".review_carousel").owlCarousel({
        loop: !0,
        margin: 30,
        nav: !1,
        dots: !0,
        autoplay: !0,
        autoplayTimeout: 2500,
        autoplayHoverPause: !0,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 1
            },
            1000: {
                items: 2
            }
        }
    }), $(".team-c").owlCarousel({
        loop: !0,
        margin: 30,
        nav: !1,
        dots: !0,
        autoplay: !0,
        autoplayTimeout: 2500,
        autoplayHoverPause: !0,
        items:1,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 1
            },
            1000: {
                items: 1
            }
        }
    });
    var e = $("#parent .child").length,
        o = $(".child").height(),
        t = e * o - $("#parent").height();
    $(document).on("click", "#down", function() {
        var e = $("#parent").scrollTop();
        $("#parent").scrollTop(o + e), e == t ? $(this).hide() : $("#up").show()
    }), $(document).on("click", "#up", function() {
        var e = parseInt($("#parent").scrollTop());
        $("#parent").scrollTop(e - o), o + e == o ? $(this).hide() : $("#down").show()
    })
}),
function(e) {
    e.fn.countTo = function(o) {
        return o = o || {}, e(this).each(function() {
            var t = e.extend({}, e.fn.countTo.defaults, {
                    from: e(this).data("from"),
                    to: e(this).data("to"),
                    speed: e(this).data("speed"),
                    refreshInterval: e(this).data("refresh-interval"),
                    decimals: e(this).data("decimals")
                }, o),
                a = Math.ceil(t.speed / t.refreshInterval),
                n = (t.to - t.from) / a,
                s = this,
                i = e(this),
                r = 0,
                l = t.from,
                u = i.data("countTo") || {};

            function p(e) {
                var o = t.formatter.call(s, e, t);
                i.html(o)
            }
            i.data("countTo", u), u.interval && clearInterval(u.interval), u.interval = setInterval(function() {
                r++, p(l += n), "function" == typeof t.onUpdate && t.onUpdate.call(s, l), r >= a && (i.removeData("countTo"), clearInterval(u.interval), l = t.to, "function" == typeof t.onComplete && t.onComplete.call(s, l))
            }, t.refreshInterval), p(l)
        })
    }, e.fn.countTo.defaults = {
        from: 0,
        to: 0,
        speed: 1e3,
        refreshInterval: 100,
        decimals: 0,
        formatter: function(e, o) {
            return e.toFixed(o.decimals)
        },
        onUpdate: null,
        onComplete: null
    }
}(jQuery), $(function(e) {
    e(".count-number").data("countToOptions", {
        formatter: function(e, o) {
            return e.toFixed(o.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ",")
        }
    }), e(".timer").each(function(o) {
        var t = e(this);
        o = e.extend({}, o || {}, t.data("countToOptions") || {}), t.countTo(o)
    })
}), $(window).width() <= 568 && 0 != ".service-responsive-slider".length && ($(".service-responsive-slider").addClass("owl-carousel owl-theme"), $(".service-responsive-slider").owlCarousel({
    loop: !1,
    margin: 0,
    nav: !1,
    dots: !0,
    autoplay: !0,
    autoplayTimeout: 4e3,
    autoplayHoverPause: !0,
    mouseDrag: !0,
    responsive: {
        0: {
            items: 1
        },
        480: {
            items: 2
        },
        567: {
            items: 2
        }
    }
})), $(window).width() <= 2100 && 0 != ".Comprehensive-responsive-slider".length && ($(".Comprehensive-responsive-slider").addClass("owl-carousel owl-theme"), $(".Comprehensive-responsive-slider").owlCarousel({
    loop: !1,
    margin: 0,
    nav: !1,
    dots: !0,
    rewind: !0,
    autoplay: !0,
    autoplayTimeout: 4e3,
    autoplayHoverPause: !0,
    mouseDrag: !0,
    responsive: {
        0: {
            items: 1
        },
        767: {
            items: 2
        },
        1280: {
            items: 3
        },
        1900: {
            items: 3
        }
    }
})), $(window).width() <= 991 && 0 != ".video-responsive-slider".length && ($(".video-responsive-slider").addClass("owl-carousel owl-theme"), $(".video-responsive-slider").owlCarousel({
    loop: !1,
    margin: 0,
    nav: !1,
    dots: !0,
    autoplay: !0,
    autoplayTimeout: 4e3,
    autoplayHoverPause: !0,
    mouseDrag: !0,
    responsive: {
        0: {
            items: 1
        },
        767: {
            items: 1
        },
        991: {
            items: 2
        }
    }
})),

$("#entry-box_close").click(function() {
    $("#entry-popup").fadeOut()
}),

$(".box_close2").click(function() {
     $("#rev-popup").fadeOut()
}),



$(".open-popup").click(function() {
    $("#input-box").html(""), null != $(this).data("price") && ($("#input-box").append('<input type="hidden" name="customers_meta[price]" value="' + $(this).data("price") + '">'), $("#input-box").append('<input type="hidden" name="customers_meta[name]" value="' + $(this).data("name") + '">')), $("#entry-popup").css("display", "flex").fadeIn()
}),

$(".open-popup2").click(function() {
  $("#rev-popup").css("display", "flex").fadeIn()
}),

AOS.init();






 // intel Tel Input
let ip; 
let ip_value;
 $("#phone-country,#phone-coun").intlTelInput({
     
      // allowDropdown: false,
      // autoHideDialCode: false,
      // autoPlaceholder: "off",
      // dropdownContainer: "body",
      // excludeCountries: ["us"],
      // formatOnDisplay: false,
    geoIpLookup: function(callback) {
            $.get('https://ipinfo.io/', function() {}, "jsonp").always(function(resp) {
              var countryCode = (resp && resp.country) ? resp.country : "";
              callback(countryCode);
              ip=resp.ip;
            
              
            });
          },
       initialCountry: "us",
       nationalMode: true,
       separateDialCode: true,
      // onlyCountries: ['us', 'gb', 'ch', 'ca', 'do'],
      // placeholderNumberType: "MOBILE",
      // preferredCountries: ['cn', 'jp'],
     // utilsScript: "<?php echo $basesurl;?>js/utils.js"
    });

// setTimeout(function(){
//     $('input[name="pc"]').val($('.selected-dial-code').text());
//     $('input[name="cip"]').val(ip);
//     $('input[name="ctry"]').val( $('.country-list .country.active .country-name').text());
// }, 3000);


// $('body').delegate('.country','click',function(){
// $('input[name="pc"]').val($(this).find('.dial-code').text());
// $('input[name="cip"]').val(ip);
// $('input[name="ctry"]').val($(this).closest("form").find('.country-list .country.active .country-name').text());

//  });



