AOS.init({
duration: 800,
easing: 'slide'
});
var windowsize = $(window).width();
$(window).resize(function () {
var windowsize = $(window).width();
if (windowsize < 1000) {
$(".filler").hide()
} else {
$(".filler").show()
}
});
if (windowsize < 1000) {
$(".filler").hide();
} else {
$(".filler").show()
}
if (windowsize < 500) {
$(".video h2").css('font-size', "25px");
$(".promo h3 ").css('font-size', "18px");
$(".promo p ").css('font-size', "12px");
$(".promo p ").css('font-size', "12px");
}
$(".mask").on('click', function (e) {
$(this).addClass('chosen');
$('.galeria h2').fadeIn();
$('.galeria .dim').fadeIn();
});
$(".galeria h2").on('click', function (e) {
$('.mask').removeClass('chosen');
$('.galeria h2').fadeOut();
$('.galeria .dim').fadeOut();
$('iframe').attr('src', $('iframe').attr('src'));
$("video").each(function () { this.pause() });
});
(function ($) {
"use strict";
$(window).stellar({
responsive: true,
parallaxBackgrounds: true,
parallaxElements: true,
horizontalScrolling: false,
hideDistantElements: false,
scrollProperty: 'scroll',
horizontalOffset: 0,
verticalOffset: 0
});
// Scrollax
$.Scrollax();
var fullHeight = function () {
$('.js-fullheight').css('height', $(window).height());
$(window).resize(function () {
$('.js-fullheight').css('height', $(window).height());
});
};
fullHeight();
// loader
var loader = function () {
setTimeout(function () {
if ($('#ftco-loader').length > 0) {
$('#ftco-loader').removeClass('show');
}
}, 1);
};
loader();
// Scrollax
$.Scrollax();
var carousel = function () {
$('.home-slider').owlCarousel({
loop: true,
autoplay: true,
margin: 0,
animateOut: 'fadeOut',
animateIn: 'fadeIn',
nav: false,
autoplayHoverPause: false,
items: 1,
navText: ["", ""],
responsive: {
0: {
items: 1,
nav: false
},
600: {
items: 1,
nav: false
},
1000: {
items: 1,
nav: false
}
}
});
$('.carousel-work').owlCarousel({
autoplay: true,
center: true,
loop: true,
items: 1,
margin: 30,
stagePadding: 0,
nav: true,
navText: ['', ''],
responsive: {
0: {
items: 1,
stagePadding: 0
},
600: {
items: 2,
stagePadding: 50
},
1000: {
items: 3,
stagePadding: 100
}
}
});
};
carousel();
$('nav .dropdown').hover(function () {
var $this = $(this);
// timer;
// clearTimeout(timer);
$this.addClass('show');
$this.find('> a').attr('aria-expanded', true);
// $this.find('.dropdown-menu').addClass('animated-fast fadeInUp show');
$this.find('.dropdown-menu').addClass('show');
}, function () {
var $this = $(this);
// timer;
// timer = setTimeout(function(){
$this.removeClass('show');
$this.find('> a').attr('aria-expanded', false);
// $this.find('.dropdown-menu').removeClass('animated-fast fadeInUp show');
$this.find('.dropdown-menu').removeClass('show');
// }, 100);
});
$('#dropdown04').on('show.bs.dropdown', function () {
console.log('show');
});
// scroll
var scrollWindow = function () {
$(window).scroll(function () {
var $w = $(this),
st = $w.scrollTop(),
navbar = $('.ftco_navbar'),
sd = $('.js-scroll-wrap');
if (st > 150) {
if (!navbar.hasClass('scrolled')) {
navbar.addClass('scrolled');
}
}
if (st < 150) {
if (navbar.hasClass('scrolled')) {
navbar.removeClass('scrolled sleep');
}
}
if (st > 350) {
if (!navbar.hasClass('awake')) {
navbar.addClass('awake');
}
if (sd.length > 0) {
sd.addClass('sleep');
}
}
if (st < 350) {
if (navbar.hasClass('awake')) {
navbar.removeClass('awake');
navbar.addClass('sleep');
}
if (sd.length > 0) {
sd.removeClass('sleep');
}
}
});
};
scrollWindow();
var counter = function () {
$('#section-counter').waypoint(function (direction) {
if (direction === 'down' && !$(this.element).hasClass('ftco-animated')) {
var comma_separator_number_step = $.animateNumber.numberStepFactories.separator(',')
$('.number').each(function () {
var $this = $(this),
num = $this.data('number');
console.log(num);
$this.animateNumber({
number: num,
numberStep: comma_separator_number_step
}, 7000);
});
}
}, {
offset: '95%'
});
}
counter();
var contentWayPoint = function () {
var i = 0;
$('.ftco-animate').waypoint(function (direction) {
if (direction === 'down' && !$(this.element).hasClass('ftco-animated')) {
i++;
$(this.element).addClass('item-animate');
setTimeout(function () {
$('body .ftco-animate.item-animate').each(function (k) {
var el = $(this);
setTimeout(function () {
var effect = el.data('animate-effect');
if (effect === 'fadeIn') {
el.addClass('fadeIn ftco-animated');
} else if (effect === 'fadeInLeft') {
el.addClass('fadeInLeft ftco-animated');
} else if (effect === 'fadeInRight') {
el.addClass('fadeInRight ftco-animated');
} else {
el.addClass('fadeInUp ftco-animated');
}
el.removeClass('item-animate');
}, k * 50, 'easeInOutExpo');
});
}, 100);
}
}, {
offset: '95%'
});
};
contentWayPoint();
// navigation
var OnePageNav = function () {
$(".smoothscroll[href^='#'], #ftco-nav ul li a[href^='#']").on('click', function (e) {
e.preventDefault();
var hash = this.hash,
navToggler = $('.navbar-toggler');
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 700, 'easeInOutExpo', function () {
window.location.hash = hash;
});
if (navToggler.is(':visible')) {
navToggler.click();
}
});
$('body').on('activate.bs.scrollspy', function () {
console.log('nice');
})
};
OnePageNav();
// magnific popup
$('.image-popup').magnificPopup({
type: 'image',
closeOnContentClick: true,
closeBtnInside: true,
fixedContentPos: true,
mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
},
image: {
verticalFit: true
},
zoom: {
enabled: true,
duration: 300 // don't foget to change the duration also in CSS
}
});
$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
var monthsToDisable = [12];
/*$('.fj-date').datepicker({
format: "mm/dd/yy",
autoclose: true,
datesDisabled: ['14/06/21', '06/14/21','06/15/21']
});*/
$(function() {
var disabledDays = ['2021-06-20', '2021-12-01', '2021-12-02', '2021-12-03', '2021-12-04', '2021-12-05', '2021-12-06', '2021-12-07',
'2021-12-08', '2021-12-09', '2021-12-10', '2021-12-11', '2021-12-12', '2021-12-13', '2021-12-14', '2021-12-15',
'2021-12-16', '2021-12-17', '2021-12-18', '2021-12-19', '2021-12-20', '2021-12-21', '2021-12-22', '2021-12-23',
'2021-12-24', '2021-12-25', '2021-12-26', '2021-12-27', '2021-12-28', '2021-12-29', '2021-12-30', '2021-12-31',
'2022-01-01', '2022-05-09', '2022-05-10', '2022-05-11', '2022-06-19', '2022-07-02', '2022-07-03', '2022-07-08',
'2022-07-09', '2022-07-10', '2022-07-15', '2022-07-16', '2022-07-17', '2022-07-22', '2022-07-23', '2022-07-24',
'2022-07-29', '2022-07-30', '2022-07-31', '2022-08-05', '2022-08-06', '2022-08-07', '2022-08-12', '2022-08-13',
'2022-08-14', '2022-08-19', '2022-08-20', '2022-08-21', '2022-08-26', '2022-08-27', '2022-08-28', '2022-09-02',
'2022-09-03', '2022-09-04', '2022-09-09', '2022-09-10', '2022-09-11', '2022-09-16', '2022-09-17', '2022-09-18',
'2022-09-23', '2022-09-24', '2022-09-25', '2022-09-30', '2022-10-01', '2022-10-02', '2022-10-07', '2022-10-08',
'2022-10-09', '2022-10-14', '2022-10-15', '2022-10-16', '2022-10-21', '2022-10-22', '2022-10-23', '2022-10-28',
'2022-10-30', '2022-11-04', '2022-11-05', '2022-11-06', '2022-11-11', '2022-11-12', '2022-11-13', '2022-11-18',
'2022-11-19', '2022-11-20', '2022-11-25', '2022-11-26', '2022-11-27', '2022-12-01', '2022-12-02', '2022-12-03',
'2022-12-04', '2022-12-05', '2022-12-06', '2022-12-07', '2022-12-08', '2022-12-09', '2022-12-10', '2022-12-11',
'2022-12-12', '2022-12-13', '2022-12-14', '2022-12-15', '2022-12-16', '2022-12-17', '2022-12-18', '2022-12-19',
'2022-12-20', '2022-12-21', '2022-12-22', '2022-12-23', '2022-12-24', '2022-12-25', '2022-12-26', '2022-12-27',
'2022-12-28', '2022-12-29', '2022-12-30', '2022-12-31', '2023-01-01', '2023-02-14', '2023-05-10', '2023-12-01',
'2023-12-02', '2023-12-03', '2023-12-04', '2023-12-05', '2023-12-06', '2023-12-07', '2023-12-08', '2023-12-09',
'2023-12-09', '2023-12-10', '2023-12-11', '2023-12-12', '2023-12-13', '2023-12-14', '2023-12-15', '2023-12-16',
'2023-12-17', '2023-12-18', '2023-12-19', '2023-12-20', '2023-12-21', '2023-12-22', '2023-12-23', '2023-12-24',
'2023-12-25', '2023-12-26', '2023-12-27', '2023-12-28', '2023-12-29', '2023-12-30', '2023-12-31', '2024-01-01'];
function formatDate(d) {
var day = String(d.getDate())
//add leading zero if day is is single digit
if (day.length == 1)
day = '0' + day
var month = String((d.getMonth()+1))
//add leading zero if month is is single digit
if (month.length == 1)
month = '0' + month
return d.getFullYear() + '-' + month + "-" + day;
}
$('#datepicker').datepicker({
format: 'mm/dd/yyyy',
autoclose: true,
beforeShowDay: function(date){
var dayNr = date.getDay();
if (disabledDays.indexOf(formatDate(date)) >= 0) {
return false;
}
return true;
}
});
});
/*var array = ["14-06-2021", "15-06-2021"]
$('.fj-date').datepicker({
'format': 'dd-mm-yyyy',
'autoclose': true,
});
function disableSpecificWeekDays(date) {
var day = date.getDay();
var month = date.getMonth();
if ($.inArray(month, monthsToDisable) != -1) {
return [false];
}
return [true];
}
$('.fj-date').timepicker();*/
})(jQuery);