function stickyHeader() {
    if ($(".navigation_bar").length) {
        var a = 100;
        if ($(window).scrollTop() > a) {
            $(".navigation_bar").removeClass("fadeIn animated");
            $(".navigation_bar").addClass("stricky-fixed fadeInDown animated")
        } else {
            if ($(this).scrollTop() <= a) {
                $(".navigation_bar").removeClass("stricky-fixed fadeInDown animated");
                $(".navigation_bar").addClass("slideIn animated")
            }
        }
    }
}
jQuery(window).on("scroll", function () {
    (function (a) {
        stickyHeader()
    })(jQuery)
});

function mobiletNavToggler() {
    if ($(".navigation").length) {
        $(".navigation .navbar button").on("click", function () {
            $(".navigation .menu").slideToggle();
            $(this).toggleClass('open');
            return false
        });
        $(".navigation .cs-submenu").children("a").append(function () {
            return '<button class="dropdown-expander"><i class="fa fa-chevron-down"></i></button>'
        });
        $(".navigation .menu .dropdown-expander").on("click", function () {
            $(this).parent().parent().children(".cs-dropdown").slideToggle();
            console.log($(this).parents("li"));
            return false
        })
    }
}
jQuery(document).on("ready", function () {
    (function (a) {
        mobiletNavToggler()
    })(jQuery)
});


if (document.documentElement.clientWidth < 980) {
$(document).click(function (e) {
        if (!$(e.target).closest('.navigation .navbar button').length) {
            $('.menu').stop(true).slideUp();
            $(".navigation .navbar button").removeClass('open');
            
        }
    });
}
  /*
  ** Search on click
  */
 /* $(".search-top .icon-search").on('click', function(){
    $(".search-top #sw_search").fadeToggle();
    $('.search-top .icon-search').toggleClass("closex");
  });*/
$(document).ready(function () {
   
    
    
    $(window).scroll(function(){
        if ($(window).scrollTop() >= 330) {
          $('#rs-header').addClass('fixed');
         }
         else {
          $('#rs-header').removeClass('fixed');
         }
    });


    var a = $("#slider");
    a.owlCarousel({
        loop: true,
        margin: 0,
        navSpeed: 500,
        nav: true,
        navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
        autoplay: true,
        dots: false,
        animateOut: "fadeOut",
        items: 1
    });
    var a = $("#arrvals");
    a.owlCarousel({
        loop: true,
        margin: 9,
        navSpeed: 500,
        nav: true,
        navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
        autoplay: true,
        dots: false,
        items: 4,
        responsiveClass: true,
        responsive: {
            0: {
                items: 1,
                nav: true
            },
            600: {
                items: 2,
                nav: false
            },
            1000: {
                items: 4,
                nav: true,
                loop: true
            }
        }
    });
    
    var a = $("#shop_look");
    a.owlCarousel({
        loop: true,
        margin: 9,
        navSpeed: 500,
        nav: true,
        navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
        autoplay: true,
        dots: false,
        items: 4,
        responsiveClass: true,
        responsive: {
            0: {
                items: 1,
                nav: true
            },
            600: {
                items: 2,
                nav: false
            },
            1000: {
                items: 4,
                nav: true,
                loop: true
            }
        }
    });
    
    var a = $(".instagram-slides");
    a.owlCarousel({
        loop: true,
        margin: 0,
        navSpeed: 500,
        nav: false,
        autoplay: true,
        dots: false,
        items: 9,
        responsiveClass: true,
        responsive: {
            0: {
                items: 4,
                nav: false
            },
            600: {
                items: 5,
                nav: false
            },
            1000: {
                items: 7,
                nav: false,
                loop: true
            }
        }
    });
    


   
});
wow = new WOW({
    animateClass: "animated",
    offset: 100,
    mobile: false
});
wow.init();

// $('.add-form').onClick(function(){
// //   $('.form-style-content').addClass('show')
// $('.add-form').addClass('hide')
// });

$('.add-form').on('click', function(){
    $('.form-style-content').addClass('show');
    $(this).addClass('hide');
});