$(document).ready(function(){
"use strict";
//WOW
new WOW().init();
// Scroll To Top
$.scrollUp({
scrollText: '',
easingType: 'linear',
scrollSpeed: 900,
animation: 'fade'
});
// Smooth Scroll
$('a.data-scroll').on("click", function(e) {
var anchor = $(this);
$('html, body').stop().animate({
scrollTop: $(anchor.attr('href')).offset().top - 0
}, 1500);
});
/*mobi_vdo_sidebar scroll */
(function($){
$(window).on("load",function(){
$(".mobi_vdo_sidebar").mCustomScrollbar();
});
})(jQuery);
//Search result
$('#searchInput').focus(function(){
$('#sresult').fadeIn(500);
}).focusout(function(){
$('#sresult').fadeOut(500);
});
$('#searchInputSm').focus(function(){
$('#sresult').fadeIn(500);
}).focusout(function(){
$('#sresult').fadeOut(500);
});
//travelToggleMenu collapse
$("#travelToggleMenuBtn").click(function () {
$("#travelToggleMenu").slideToggle();
});
// Slick slider4_partial
var $carousel = $('.slider4_partial');
var settings = {
dots: false,
arrows: false,
slide: '.mobi_sm4_slider_item',
slidesToShow: 4,
// centerMode: true,
autoplay: true,
responsive: [
{
breakpoint: 1000,
settings: {
slidesToShow: 3
}
},
{
breakpoint: 575,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 400,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 0,
settings: {
slidesToShow: 1
}
}
]
};
function setSlideVisibility() {
//Find the visible slides i.e. where aria-hidden="false"
var visibleSlides = $carousel.find('.mobi_sm4_slider_item[aria-hidden="false"]');
//Make sure all of the visible slides have an opacity of 1
$(visibleSlides).each(function() {
$(this).css('opacity', 1);
});
//Set the opacity of the first and last partial slides.
$(visibleSlides).first().prev().css('opacity', 0);
}
$carousel.slick(settings);
$carousel.slick('slickGoTo', 1);
setSlideVisibility();
$carousel.on('afterChange', function() {
setSlideVisibility();
});
// Slick slider3_partial
var $carousel = $('.slider3_partial');
var settings = {
dots: false,
arrows: false,
slide: '.slider3_partial_item',
slidesToShow: 2,
centerMode: true,
autoplay: true
};
function setSlideVisibility() {
//Find the visible slides i.e. where aria-hidden="false"
var visibleSlides = $carousel.find('.slider3_partial_item[aria-hidden="false"]');
//Make sure all of the visible slides have an opacity of 1
$(visibleSlides).each(function() {
$(this).css('opacity', 1);
});
//Set the opacity of the first and last partial slides.
$(visibleSlides).first().prev().css('opacity', 0);
}
$carousel.slick(settings);
$carousel.slick('slickGoTo', 1);
setSlideVisibility();
$carousel.on('afterChange', function() {
setSlideVisibility();
});
//kids_slider
$(' .kids_slider').owlCarousel({
items:2,
dots:false,
nav:false,
margin:15
});
//mobi_lg4_slider
$('.mobi_lg4_slider').owlCarousel({
loop:true,
autoplay:true,
dots:false,
nav:false,
margin:15,
navText:["
","
"],
responsiveClass:true,
responsive:{
0:{
items:3
},
320:{
items:3
},
600:{
items:4
},
1000:{
items:4,
margin:25
}
}
});
// Slick subcategory Slider 4
$('.subcategory_slider').slick({
dots: false,
infinite: false,
autoplay: false,
speed: 300,
slidesToShow: 4,
slidesToScroll: 4,
// centerMode: true,
focusOnSelect: false,
arrows: false,
responsive: [
{
breakpoint: 1000,
settings: {
slidesToShow: 4,
slidesToScroll: 4,
draggable: false,
touchMove: false,
swipe: false,
swipeToSlide: false,
touchMove: false,
}
},
{
breakpoint: 700,
settings: {
slidesToShow: 3,
slidesToScroll: 3
}
},
{
breakpoint: 575,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
},
{
breakpoint: 320,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
},
{
breakpoint: 0,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
});