$(function(){
//slide-intro
var $owlintro = $(".slide-intro .owl-carousel"),
$videos = $(".slide-intro .owl-carousel video");
$owlintro.owlCarousel({
autoplay:true,
loop:true,
//nav:true,
//navText: ['',''],
dots: true,
dotsData:true,
dotsContainer: '.dots',
animateIn:'fadeIn',
animateOut:'fadeOut',
autoplayTimeout: 10000,
autoplayHoverPause:false,
autoHeight: true,
items: 1,
responsive: {
768: {
onChanged: function (e) {
$videos.each(function () {
$(this).get(0).pause();
})
var thisVideo = $('.owl-item:eq(' + e.item.index + ') video');
if( thisVideo.length > 0 ) {
thisVideo.get(0).play();
}
},
},
}
});
$('.dots').on('mouseover',function(e){
$owlintro.trigger('stop.owl.autoplay');
});
$('.dots').on('mouseleave',function(e){
$owlintro.trigger('play.owl.autoplay');
});
$('.dots div').click(function () {
$owlintro.trigger('to.owl.carousel',[$(this).index(),500]);
});
$('.nav .Prev').click(function () {
$owlintro.trigger('prev.owl.carousel');
});
$('.nav .Next').click(function () {
$owlintro.trigger('next.owl.carousel');
});
$('.nav .Prev,.nav .Next').on('mouseover',function (e) {
$owlintro.trigger('stop.owl.autoplay');
});
$('.nav .Prev,.nav .Next').on('mouseleave',function (e) {
$owlintro.trigger('play.owl.autoplay');
});
//slide-profile
var owlprofile = $(".slide-profile");
owlprofile.owlCarousel({
autoplay: true,
loop: true,
nav: false,
dots: true,
autoplayTimeout: 3000,
autoplayHoverPause:true,
autoHeight: true,
//center: true,
margin: 10,
items: 1,
responsive: {
1024: {
items: 3,
},
768: {
items: 2,
},
},
});
//slide-solutions
var owlsolutions = $(".slide-solutions");
owlsolutions.owlCarousel({
autoplay: true,
loop: true,
nav: false,
dots: true,
autoplayTimeout: 3000,
autoplayHoverPause:true,
autoHeight: true,
//center: true,
//margin: 10,
items: 1,
responsive: {
1200: {
items: 4,
},
768: {
items: 2,
},
},
});
});