$(function () {
    //home-slider
    slickSlider($('.-home-slider .-items'), {
        autoplay: true,
        fade: true,
        speed: 1000,
    });
    slickSlider($('.-slideshow .-slides'), {
        variableWidth: true,
        centerMode: true,
        responsive: [
        {
            breakpoint: 768,
            settings: {
                arrows: false,
            }
        }
        ]
    });
    slickEvent($('.-home-slider .-items'), 'beforeChange', 'remove');
    slickEvent($('.-home-slider .-items'), 'afterChange', 'add');

    //home-product-image-slider
    slickSlider($('.-home-products-image-slider'), {
        asNavFor: '.-home-products-text-slider'
    });

    //home-product-text-slider
    slickSlider($('.-home-products-text-slider'), {
        dots: false,
        arrows: false,
        swipe: false,
        fade: true,
        speed: 500,
    });

    //home-brand-slider
    slickSlider($('.-home-brand-slider'), {
        variableWidth: true,
        centerMode: true,
        responsive: [
        {
            breakpoint: 768,
            settings: {
                arrows: false,
            }
        }
        ]
    });

    //home-brand-slider
    slickSlider($('.-archive .-links'), {
        dots: false,
        infinite: false,
        variableWidth: true,
        responsive: [
          {
              breakpoint: 1024,
              settings: {
                  arrows: false,
              }
          }
        ]
    });

    //-news-slideshow-left
    slickSlider($('.-news-slideshow-image'), {
        dots: false,
        arrows: false,
        swipe: false,
        fade: true,
        speed: 500,
        responsive: [
           {
               breakpoint: 768,
               settings: {
                   asNavFor: '.-news-slideshow-text',
                   swipe: true,
               }
           }
        ]
    });

    //home-product-text-slider
    slickSlider($('.-news-slideshow-text'), {
        asNavFor: '.-news-slideshow-image',
        responsive: [
           {
               breakpoint: 768,
               settings: {
                   arrows: false,
               }
           }
        ]
    });

    //Stick Header
    headerStick();

    //ScrollSpy
    $('.-page-scrollspy .navbar a').click(function (e) {
        scrollAnimation($(this), e);
    });

    //ScrollSpy
    $('.-page-scrollspy .-top a,.-page-scrollspy .-bottom a').click(function (e) {
        e.preventDefault();
        scroller($(this).data('direction'));
    });

    //scrollTop 
    scrollFunction(window);

    //Form Label animation 
    $('input[type="text"],input[type="password"], select,textarea', $('.-form')).each(function (e) {
        inpLabel($(this));
    });

    //Fix modal
    $('.modal').each(function () {
        $('body').append($(this));
    });

    //landing show modals
    landingShow(); 3

    $('.-right-menu').click(function (e) {
        if ($(".-page-scrollspy").hasClass("-right-menu-open")) {
            $(".-page-scrollspy").removeClass("-right-menu-open");
        } else {
            $(".-page-scrollspy").addClass("-right-menu-open");
        }
    });

    

    myVar = setTimeout(function () { $(".-page-scrollspy").removeClass("-right-menu-open"); }, 800);

    $('.-page-scrollspy .nav-item').click(function (e) {
        $(".-page-scrollspy").removeClass("-right-menu-open");
        return false;
    })
});

