<div id="slider" class="slider-parallax swiper_wrapper full-screen clearfix">
<div class="swiper-container swiper-parent">
<div class="swiper-wrapper">
<div class="swiper-slide dark" style="background-image: url('/ASC_CMS/_image.aspx/3YndmoX6NU2-4vLGCcYcjQ==/ASC-Sliders-24_7-Imagen_3750x1500.png');"> <a href="http://www.escogeasc.com/licencia">
<div class="container clearfix">
<div class="slider-caption slider-caption-center">
</div>
</div>
</div>
<div class="swiper-slide dark" style="background-image: url('/ASC_CMS/_image.aspx/PMCFXqyIXgCCITjqQbgvXQ==/ASC-Slider-2048x819.jpg');"> <a href="https://www.escogeasc.com/#inspeccion">
<div class="container clearfix">
<div class="slider-caption slider-caption-center">
</div>
</div>
</div>
<div class="swiper-slide dark" style="background-image: url('https://ascpr-dev.outsystemsenterprise.com/ASC_CMS/_image.aspx/PZaeQjkqK3togXcMt7ipoQ==/SignatureBannerPremiacion2021.jpg');"> <a href="http://www.asctucompulsorio.com">
<div class="container clearfix">
<div class="slider-caption slider-caption-center">
</div>
</div>
</div>
</div>
<div id="slider-arrow-left"><i class="icon-angle-left"></i></div>
<div id="slider-arrow-right"><i class="icon-angle-right"></i></div>
<div id="slide-number"><div id="slide-number-current"></div><span>/</span><div id="slide-number-total"></div></div>
</div>
<script>
jQuery(document).ready(function($){
var swiperSlider = new Swiper('.swiper-parent',{
paginationClickable: false,
slidesPerView: 1,
grabCursor: true,
loop: true,
autoplay: 30000,
loopAdditionalSlides: 0,
onSwiperCreated: function(swiper){
$('[data-caption-animate]').each(function(){
var $toAnimateElement = $(this);
var toAnimateDelay = $(this).attr('data-caption-delay');
var toAnimateDelayTime = 0;
if( toAnimateDelay ) { toAnimateDelayTime = Number( toAnimateDelay ) + 750; } else { toAnimateDelayTime = 750; }
if( !$toAnimateElement.hasClass('animated') ) {
$toAnimateElement.addClass('not-animated');
var elementAnimation = $toAnimateElement.attr('data-caption-animate');
setTimeout(function() {
$toAnimateElement.removeClass('not-animated').addClass( elementAnimation + ' animated');
}, toAnimateDelayTime);
}
});
},
onSlideChangeStart: function(swiper){
$('#slide-number-current').html(swiper.activeIndex + 1);
$('[data-caption-animate]').each(function(){
var $toAnimateElement = $(this);
var elementAnimation = $toAnimateElement.attr('data-caption-animate');
$toAnimateElement.removeClass('animated').removeClass(elementAnimation).addClass('not-animated');
});
},
onSlideChangeEnd: function(swiper){
$('#slider .swiper-slide').each(function(){
if($(this).find('video').length > 0) { $(this).find('video').get(0).pause(); }
});
$('#slider .swiper-slide:not(".swiper-slide-active")').each(function(){
if($(this).find('video').length > 0) {
if($(this).find('video').get(0).currentTime != 0 ) $(this).find('video').get(0).currentTime = 0;
}
});
if( $('#slider .swiper-slide.swiper-slide-active').find('video').length > 0 ) { $('#slider .swiper-slide.swiper-slide-active').find('video').get(0).play(); }
$('#slider .swiper-slide.swiper-slide-active [data-caption-animate]').each(function(){
var $toAnimateElement = $(this);
var toAnimateDelay = $(this).attr('data-caption-delay');
var toAnimateDelayTime = 0;
if( toAnimateDelay ) { toAnimateDelayTime = Number( toAnimateDelay ) + 300; } else { toAnimateDelayTime = 300; }
if( !$toAnimateElement.hasClass('animated') ) {
$toAnimateElement.addClass('not-animated');
var elementAnimation = $toAnimateElement.attr('data-caption-animate');
setTimeout(function() {
$toAnimateElement.removeClass('not-animated').addClass( elementAnimation + ' animated');
}, toAnimateDelayTime);
}
});
}
});
$('#slider-arrow-left').on('click', function(e){
e.preventDefault();
swiperSlider.swipePrev();
});
$('#slider-arrow-right').on('click', function(e){
e.preventDefault();
swiperSlider.swipeNext();
});
$('#slide-number-current').html(swiperSlider.activeIndex + 1);
$('#slide-number-total').html(swiperSlider.slides.length);
});
</script>
</div>