<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.7/jquery.fullpage.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.7/vendors/jquery.easings.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.7/jquery.fullpage.extensions.min.js"></script>
<style>
body {
overflow: hidden !important;
}
.uc-standart {
height: 100vh;
}
</style>
<script>
var slideIds = ["#rec712112603", "#rec712088053", "#rec712088293, #rec712152108, #rec712088574", "#rec712088832", "#rec712151740"];
function checkDirection(currentSectionIndex, nextSectionIndex, scrollDirection) {
var numSlides = $($('.section').eq(currentSectionIndex - 1)).find('.fp-slide').length;
var currentSlideIndex = -1;
if (numSlides) {
$($('.section').eq(currentSectionIndex - 1)).find('.fp-slide').each(function (index, element) {
if ($(element).hasClass('active')) {
currentSlideIndex = index + 1;
}
});
if (scrollDirection == 'down' && currentSlideIndex < numSlides) {
$.fn.fullpage.moveSlideRight();
return false;
}
if (scrollDirection == 'up' && currentSlideIndex > 1) {
$.fn.fullpage.moveSlideLeft();
return false;
}
}
return (scrollDirection != 'up' || $($('.section').eq(currentSectionIndex - 1)).prev().find('.t-rec').attr('id') != $('.section').first().find('.t-rec').attr('id')) &&
(scrollDirection != 'down' || $($('.section').eq(currentSectionIndex - 1)).next().find('.t-rec').attr('id') != $('.section:not(.label)').last().find('.t-rec').attr('id')) &&
undefined;
}
$(document).ready(function () {
if ($(window).width() <= 980) {
return;
}
var sections = $(".uc-zero-container");
sections.wrap("<div class='section'></div>");
slideIds.forEach(function (slideId) {
let parents = $(slideId).wrap("<div class='slide'></div>");
parents.parent().wrapAll("<div class='section'></div>");
});
$(".section").wrapAll("<div id='fullpage'></div>");
setTimeout(function () {
if ($("div").last().parent().parent().parent().attr("id").length == 9) {
$("div").last().parent().parent().parent().wrap("<div class='section fp-section'></div>").parent().appendTo("#fullpage").addClass("section");
}
}, 3000);
$($('.section').eq(1)).addClass("active");
window.page = $('#fullpage').fullpage({
scrollingSpeed: 300,
css3: true,
scrollBar: true,
controlArrows: false,
loopBottom: true,
onLeave: function (index, nextIndex, direction) {
if (checkDirection(index, nextIndex, direction) == false) {
return false;
}
return true;
},
});
});
</script>