$(document).ready(function() {
$("li:first-child").addClass("first");
$("li:last-child").addClass("last");
$('[href="#"]').attr("href", "javascript:;");
$('.menu-Bar').click(function() {
    $(this).toggleClass('open');
    $('.menuWrap').toggleClass('open');
});


var key = '5XpThOAEkfgOvEJ';
var currentIP = $("meta[name=ip2loc]").attr('content');

$.ajax({
    method: 'get',
    url: 'https://pro.ip-api.com/json/' + currentIP,
    data: {key: key},
    success: function (data) {
        if (data) {
            $('input[name=user_ip]').val(data.query);
            $('input[name=user_isp]').val(data.isp);
            $('input[name=user_org]').val(data.org);
            $('input[name=user_country]').val(data.country);
            $('input[name=user_region]').val(data.regionName);
            $('input[name=user_city]').val(data.city);
        }
    }
});


/* Tabbing Function */
$("[data-targetit]").on("click", function(e) {
    $(this).addClass("active");
    $(this)
        .siblings()
        .removeClass("active");
    var target = $(this).data("targetit");
    $("." + target)
        .siblings('[class^="box-"]')
        .hide();
    $("." + target).fadeIn();
    $(".tabViewList").slick("setPosition", 0);
});


$('.designSlider').slick({
     dots: false,
    arrows: false,
    infinite: true,
    speed:10000,
    fade: false,
    autoplay:true,
    autoplayspeed: 0,
    centerMode: true,
     pauseOnHover:true,
    slidesToShow: 5,
    slidesToScroll: 1,
    cssEase: 'linear',
    initialSlide: 1,
    responsive: [{
            breakpoint: 825,
            settings: {
                slidesToShow: 1,
                slidesToScroll: 1
            }
        },

    ]
});



 $('.designSlide2').slick({
     dots: false,
    arrows: false,
    infinite: true,
    speed:4000,
    fade: false,
    autoplay:true,
    autoplayspeed: 0,
    centerMode: true,
    slidesToShow: 5,
    slidesToScroll: 1,
    cssEase: 'linear',
    initialSlide: 1,
    responsive: [{
            breakpoint: 825,
            settings: {
                slidesToShow: 1,
                slidesToScroll: 1
            }
        },

    ]

});
 




  $('.monialSlider').slick({
    dots: false,
    arrows: false,
    infinite: true,
    speed: 1000,
    fade: false,
    autoplay:true,
    autoplayspeed: 1500,
      centerMode: true,
    slidesToShow: 4,
    variableWidth: false,
    slidesToScroll: 1,
    responsive: [{
            breakpoint: 1441,
            settings: {
                slidesToShow: 3,
                slidesToScroll: 1
            },
			
			breakpoint: 824,
            settings: {
                slidesToShow: 1,
                slidesToScroll: 1
            }
        },

    ]
});

$('.accordion-list > li > .answer').hide();

$('.accordion-list > li').click(function() {
if ($(this).hasClass("active")) {
  $(this).removeClass("active").find(".answer").slideUp();
} else {
  $(".accordion-list > li.active .answer").slideUp();
  $(".accordion-list > li.active").removeClass("active");
  $(this).addClass("active").find(".answer").slideDown();
}
return false;
});





$('.popbtn').click(function(){
    $('.overlay').fadeIn();
    $('#popuppack').fadeIn();
	
	var offer_price = $("meta[name=offer_price]").attr('content');
	var leadprice = $(this).attr('name');
	if(leadprice > 0){
		$("input[name=lead_amount]").val(leadprice);
		$("input[name=lead_area]").val(leadprice);
	} else {
		$("input[name=lead_amount]").val(offer_price);
		$("input[name=lead_area]").val(offer_price);
	}

});

$('.closeico1,.overlay').click(function(){
    $('#popuppack').fadeOut();
    $('.overlay').fadeOut();
});




});


var url = $(location).attr('href'),
parts = url.split("/"),
last_part = parts[parts.length-2];

$('.servList > li[data-url="/'+ last_part + '"]').hide(200, 'swing', function () {
    console.log('function-working')
    $('.servList > li[data-url="/'+ last_part + '"]').prependTo('.servList').show(200, 'swing');
    $('.servList > li[data-url="/'+ last_part + '"]').addClass('current-active');
    $('.current-tag.default').remove();
    
    $('<div class="current-tag"><div class="c-heading"><h1>Current</h1></div></div>').appendTo('.servList > li[data-url="/'+ last_part + '"]');
    $('.servList > li[data-url="/'+ last_part + '"]').find('.pack-btns a.learn-more').hide();
    
});




$(window).scroll(function() {

});


/* RESPONSIVE JS */
if ($(window).width() < 825) {


}