Compare commits
24 Commits
af93f788eb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| de3cab5a24 | |||
| a798ba5fd8 | |||
| 7d3d69bea4 | |||
| cce94207be | |||
| 5e495f3395 | |||
| 06cfb58bd0 | |||
| 3c10def104 | |||
| 9d55f79bf0 | |||
| dc73aa4dee | |||
| 605d190e40 | |||
| ef879fa816 | |||
| 8ebf20c123 | |||
| 945263a340 | |||
| ff6aeab5db | |||
| be15131507 | |||
| d5b65d2ff3 | |||
| fcba23ea1f | |||
| 863a55b461 | |||
| f2ee15cf50 | |||
| c40c2f921e | |||
| 55464fe023 | |||
| 0c8b4a1386 | |||
| d0e04677c7 | |||
| 5f1493088a |
@@ -1,12 +0,0 @@
|
||||
@import "core.css";
|
||||
@import "layout.css";
|
||||
@import "header.css";
|
||||
@import "footer.css";
|
||||
|
||||
@import "links.css";
|
||||
@import "buttons.css";
|
||||
@import "lists.css";
|
||||
@import "swiper.css";
|
||||
@import "components.css";
|
||||
@import "utility.css";
|
||||
@import "media.css";
|
||||
@@ -1,7 +1,7 @@
|
||||
.footer {
|
||||
display: flex;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
padding-block: 2rem 5rem;
|
||||
padding-block: 2rem 3rem;
|
||||
background: var(--color-white);
|
||||
}
|
||||
|
||||
@@ -16,3 +16,8 @@
|
||||
.footer__content ul + ul {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.footer__tail {
|
||||
margin-top: 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -14,6 +14,10 @@
|
||||
box-shadow: unset;
|
||||
}
|
||||
|
||||
.header.is-open .header__section{
|
||||
border-bottom: 0.0625rem solid var(--color-black);
|
||||
}
|
||||
|
||||
.header.is-open .header__mobile {
|
||||
display: block;
|
||||
}
|
||||
@@ -29,11 +33,12 @@
|
||||
.header__mobile {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 5rem;
|
||||
top: 5.0625rem;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc(100% - 4.75rem);
|
||||
background-color: var(--color-white);
|
||||
overflow-y: auto;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ br {
|
||||
.close--preview {
|
||||
display: block;
|
||||
top: 0.25rem;
|
||||
right: 0.25rem;
|
||||
left: 0.25rem;
|
||||
}
|
||||
|
||||
.loader {
|
||||
@@ -82,7 +82,6 @@
|
||||
.list--mobile {
|
||||
text-align: center;
|
||||
font-size: 1.375rem;
|
||||
border-top: 0.0625rem solid var(--color-black);
|
||||
padding-top: 0.75rem;
|
||||
}
|
||||
|
||||
@@ -99,3 +98,7 @@
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.list--small {
|
||||
font-size: 0.875rem !important;
|
||||
}
|
||||
@@ -75,6 +75,11 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.close--preview {
|
||||
left: unset;
|
||||
right: 0.25rem;
|
||||
}
|
||||
|
||||
.footer__content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
12
assets/css/v3_app.css
Normal file
@@ -0,0 +1,12 @@
|
||||
@import "v2_core.css";
|
||||
@import "v3_layout.css";
|
||||
@import "v1_header.css";
|
||||
@import "v1_footer.css";
|
||||
|
||||
@import "v1_links.css";
|
||||
@import "v1_buttons.css";
|
||||
@import "v2_lists.css";
|
||||
@import "v1_swiper.css";
|
||||
@import "v1_components.css";
|
||||
@import "v1_utility.css";
|
||||
@import "v2_media.css";
|
||||
@@ -56,6 +56,7 @@
|
||||
.section__footer div:last-child {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: max-content;
|
||||
}
|
||||
|
||||
.section__welcome {
|
||||
@@ -259,3 +260,55 @@
|
||||
overflow-y: auto;
|
||||
margin-bottom: 0.625rem;
|
||||
}
|
||||
|
||||
.section__video {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 1rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 43.75rem) {
|
||||
.section__video {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
.section__video iframe {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.section--gdpr {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: var(--color-white);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.section--gdpr.is-open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.section--gdpr h2,h3{
|
||||
text-align: center;
|
||||
padding-inline: 1rem;
|
||||
}
|
||||
|
||||
.section--gdpr .list{
|
||||
margin-inline: auto;
|
||||
max-width: 50rem;
|
||||
}
|
||||
|
||||
.section--gdpr .list li {
|
||||
padding-inline: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.section--gdpr .list.prologue li {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
444
assets/js/app.js
@@ -1,444 +0,0 @@
|
||||
$('a[href*="#"]')
|
||||
// Remove links that don't actually link to anything
|
||||
.not('[href="#"]')
|
||||
.not('[href="#0"]')
|
||||
.click(function(event) {
|
||||
// On-page links
|
||||
if (
|
||||
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
|
||||
&&
|
||||
location.hostname == this.hostname
|
||||
) {
|
||||
// Figure out element to scroll to
|
||||
var target = $(this.hash);
|
||||
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
|
||||
// Does a scroll target exist?
|
||||
if (target.length) {
|
||||
// Only prevent default if animation is actually gonna happen
|
||||
event.preventDefault();
|
||||
$('html, body').animate({
|
||||
scrollTop: target.offset().top - 80
|
||||
}, 800, function() {
|
||||
// Callback after animation
|
||||
// Must change focus!
|
||||
var $target = $(target);
|
||||
$target.focus();
|
||||
if ($target.is(":focus")) { // Checking if the target was focused
|
||||
return false;
|
||||
} else {
|
||||
$target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
|
||||
$target.focus(); // Set focus again
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
init();
|
||||
|
||||
function init() {
|
||||
let state = 0;
|
||||
|
||||
$('.js-prev-slide').click(function() {
|
||||
if(state - 1 == -1){state = 2;}else{state = state - 1;}
|
||||
swiper(state,0);
|
||||
});
|
||||
$('.js-next-slide').click(function() {
|
||||
if(state + 1 == 3){state = 0;}else{state = state + 1;}
|
||||
swiper(state,1);
|
||||
});
|
||||
|
||||
$('.js-menu-object').click(function() {
|
||||
closeSequence($('body').find('.section--block' + $(this).attr('href')));
|
||||
});
|
||||
$('.js-menu-detail').click(function() {
|
||||
menuControl($('body').find('.section--block' + $(this).attr('href')), "detail");
|
||||
});
|
||||
$('.js-menu-gallery').click(function() {
|
||||
menuControl($('body').find('.section--block' + $(this).attr('href')), "gallery");
|
||||
});
|
||||
$('.js-menu-price').click(function() {
|
||||
menuControl($('body').find('.section--block' + $(this).attr('href')), "price");
|
||||
});
|
||||
|
||||
$('.js-left-open').click(function() {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50;}else{position = 0;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__left').css('left',position + '%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__left').css('left','0%');
|
||||
}
|
||||
});
|
||||
$('.js-left-close').click(function() {
|
||||
let position1;
|
||||
let position2;
|
||||
if (screen.width > 1200){position1 = 0;position2 = -50;}else{position1 = -100;position2 = -100;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__left').css('left',position1 + '%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__left').css('left',position2 + '%');
|
||||
}
|
||||
});
|
||||
$('.js-gallery-open').click(function() {
|
||||
const x = $(this).closest('.section').find('.section__gallery');
|
||||
x.addClass('is-open');
|
||||
if(!x.hasClass('loaded')){loadGallery(this,x.attr('data-object'),x.attr('data-items'));}
|
||||
});
|
||||
$('.js-gallery-close').click(function() {
|
||||
$(this).closest('.section').find('.section__gallery').removeClass('is-open');
|
||||
});
|
||||
$('.js-right-open').click(function() {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50;}else{position = 0;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__right').css('left',position + '%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__right').css('left','0%');
|
||||
}
|
||||
});
|
||||
$('.js-right-close').click(function() {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50}else{position = 100;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__right').css('left','100%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__right').css('left',position + '%');
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-preview-close').click(function() {
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.section--preview').removeClass('is-open');
|
||||
});
|
||||
|
||||
$('.js-preview-prev').click(function() {
|
||||
let data = $(this).closest('.section--preview');
|
||||
let x = Number(data.attr('data-object'));
|
||||
let y = Number(data.attr('data-item'));
|
||||
let z = Number(data.attr('data-items'));
|
||||
galleryControl(x,0,y,z);
|
||||
});
|
||||
|
||||
$('.js-preview-next').click(function() {
|
||||
let data = $(this).closest('.section--preview');
|
||||
let x = Number(data.attr('data-object'));
|
||||
let y = Number(data.attr('data-item'));
|
||||
let z = Number(data.attr('data-items'));
|
||||
galleryControl(x,1,y,z);
|
||||
});
|
||||
|
||||
$('.js-menu-button').click(function() {
|
||||
if($(this).hasClass('is-active')){
|
||||
$(this).removeClass('is-active');
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.header').removeClass('is-open');
|
||||
}else{
|
||||
$(this).addClass('is-active');
|
||||
$('body').addClass('noscroll');
|
||||
$('body').find('.header').addClass('is-open');
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-menu-close').click(function() {
|
||||
$('body').find('.header').removeClass('is-open');
|
||||
$('body').find('.js-menu-button').removeClass('is-active');
|
||||
$('body').removeClass('noscroll');
|
||||
});
|
||||
}
|
||||
|
||||
function swiper(e,f) {
|
||||
const a = $('.js-slide-one');
|
||||
const b = $('.js-slide-two');
|
||||
const c = $('.js-slide-three');
|
||||
|
||||
if (e == 1) {
|
||||
if (f == 1) {
|
||||
$(a).css('zIndex','1');
|
||||
$(c).css('zIndex','-1');
|
||||
} else {
|
||||
$(a).css('zIndex','-1');
|
||||
$(c).css('zIndex','1');
|
||||
}
|
||||
$(b).css('zIndex','1');
|
||||
$(a).css('left','-100%');
|
||||
$(b).css('left','0%');
|
||||
$(c).css('left','100%');
|
||||
} else if (e == 2) {
|
||||
if (f == 1) {
|
||||
$(b).css('zIndex','1');
|
||||
$(a).css('zIndex','-1');
|
||||
} else {
|
||||
$(b).css('zIndex','-1');
|
||||
$(a).css('zIndex','1');
|
||||
}
|
||||
$(c).css('zIndex','1');
|
||||
$(a).css('left','100%');
|
||||
$(b).css('left','-100%');
|
||||
$(c).css('left','0%');
|
||||
} else {
|
||||
if (f == 1) {
|
||||
$(c).css('zIndex','1');
|
||||
$(b).css('zIndex','-1');
|
||||
} else {
|
||||
$(c).css('zIndex','-1');
|
||||
$(b).css('zIndex','1');
|
||||
}
|
||||
$(a).css('zIndex','1');
|
||||
$(a).css('left','0%');
|
||||
$(b).css('left','100%');
|
||||
$(c).css('left','-100%');
|
||||
}
|
||||
}
|
||||
|
||||
function loadGallery(item,object,maxItems){
|
||||
let imageUrls = [];
|
||||
const loadImage = src =>
|
||||
new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
img.onload = () => resolve(img);
|
||||
img.onerror = reject;
|
||||
img.src = src;
|
||||
})
|
||||
;
|
||||
|
||||
switch(Number(object)) {
|
||||
case 0:
|
||||
imageUrls = [
|
||||
"img/gallery/statek/1.webp",
|
||||
"img/gallery/statek/2.webp",
|
||||
"img/gallery/statek/3.webp",
|
||||
"img/gallery/statek/4.webp",
|
||||
"img/gallery/statek/5.webp",
|
||||
"img/gallery/statek/6.webp",
|
||||
"img/gallery/statek/7.webp",
|
||||
"img/gallery/statek/8.webp",
|
||||
"img/gallery/statek/9.webp",
|
||||
"img/gallery/statek/10.webp",
|
||||
"img/gallery/statek/11.webp",
|
||||
"img/gallery/statek/12.webp",
|
||||
"img/gallery/statek/13.webp",
|
||||
"img/gallery/statek/14.webp",
|
||||
"img/gallery/statek/15.webp",
|
||||
"img/gallery/statek/16.webp",
|
||||
"img/gallery/statek/17.webp",
|
||||
"img/gallery/statek/18.webp",
|
||||
"img/gallery/statek/19.webp",
|
||||
"img/gallery/statek/20.webp",
|
||||
"img/gallery/statek/21.webp",
|
||||
"img/gallery/statek/22.webp",
|
||||
"img/gallery/statek/23.webp",
|
||||
"img/gallery/statek/24.webp"
|
||||
];
|
||||
break;
|
||||
case 1:
|
||||
imageUrls = [
|
||||
"img/gallery/penzion/1.webp",
|
||||
"img/gallery/penzion/2.webp",
|
||||
"img/gallery/penzion/3.webp",
|
||||
"img/gallery/penzion/4.webp",
|
||||
"img/gallery/penzion/5.webp",
|
||||
"img/gallery/penzion/6.webp",
|
||||
"img/gallery/penzion/7.webp",
|
||||
"img/gallery/penzion/8.webp",
|
||||
"img/gallery/penzion/9.webp",
|
||||
"img/gallery/penzion/10.webp",
|
||||
"img/gallery/penzion/11.webp",
|
||||
"img/gallery/penzion/12.webp",
|
||||
"img/gallery/penzion/13.webp",
|
||||
"img/gallery/penzion/14.webp",
|
||||
"img/gallery/penzion/15.webp",
|
||||
"img/gallery/penzion/16.webp",
|
||||
"img/gallery/penzion/17.webp",
|
||||
"img/gallery/penzion/18.webp",
|
||||
"img/gallery/penzion/19.webp",
|
||||
"img/gallery/penzion/20.webp",
|
||||
"img/gallery/penzion/21.webp",
|
||||
"img/gallery/penzion/22.webp",
|
||||
"img/gallery/penzion/23.webp",
|
||||
"img/gallery/penzion/24.webp"
|
||||
];
|
||||
break;
|
||||
case 2:
|
||||
imageUrls = [
|
||||
"img/gallery/chata/1.webp",
|
||||
"img/gallery/chata/2.webp",
|
||||
"img/gallery/chata/3.webp",
|
||||
"img/gallery/chata/4.webp",
|
||||
"img/gallery/chata/5.webp",
|
||||
"img/gallery/chata/6.webp",
|
||||
"img/gallery/chata/7.webp",
|
||||
"img/gallery/chata/8.webp",
|
||||
"img/gallery/chata/9.webp",
|
||||
"img/gallery/chata/10.webp",
|
||||
"img/gallery/chata/11.webp",
|
||||
"img/gallery/chata/12.webp",
|
||||
"img/gallery/chata/13.webp",
|
||||
"img/gallery/chata/14.webp",
|
||||
"img/gallery/chata/15.webp",
|
||||
"img/gallery/chata/16.webp",
|
||||
"img/gallery/chata/17.webp",
|
||||
"img/gallery/chata/18.webp",
|
||||
"img/gallery/chata/19.webp",
|
||||
"img/gallery/chata/20.webp",
|
||||
"img/gallery/chata/21.webp",
|
||||
"img/gallery/chata/22.webp",
|
||||
"img/gallery/chata/23.webp",
|
||||
"img/gallery/chata/24.webp"
|
||||
];
|
||||
break;
|
||||
case 3:
|
||||
imageUrls = [
|
||||
"img/gallery/statek/6.webp",
|
||||
"img/gallery/statek/w1.webp",
|
||||
"img/gallery/statek/w2.webp",
|
||||
"img/gallery/statek/w6.webp",
|
||||
"img/gallery/statek/w3.webp",
|
||||
"img/gallery/statek/w4.webp",
|
||||
"img/gallery/statek/3.webp",
|
||||
"img/gallery/statek/9.webp",
|
||||
"img/gallery/statek/8.webp",
|
||||
"img/gallery/statek/7.webp",
|
||||
"img/gallery/statek/11.webp",
|
||||
"img/gallery/statek/w5.webp"
|
||||
];
|
||||
}
|
||||
|
||||
Promise.all(imageUrls.map(loadImage)).then(images => {
|
||||
let count = 1;
|
||||
images.forEach((image, i) =>{
|
||||
$(item).closest('.section').find('.gallery').append($('<div class="gallery__item js-gallery-item" data-order="' + count + '"></div>').append(image));
|
||||
if(count == maxItems){
|
||||
$(item).closest('.section').find('.section__gallery').addClass('loaded');
|
||||
$('.js-gallery-item').click(function() {
|
||||
let z;
|
||||
let x = $('body').find('.section--preview');
|
||||
let y = Number($(this).attr('data-order'));
|
||||
let w = Number($(item).closest('.section').find('.section__gallery').attr('data-items'));
|
||||
let c = $(this).closest('.section').attr('id');
|
||||
|
||||
if(c == "statek"){z = 0;}else if(c == "penzion"){z = 1;}else if(c == "chata"){z = 2;}else{z = 3;}
|
||||
$('body').addClass('noscroll');
|
||||
x.attr('data-object',z);
|
||||
x.attr('data-item',y);
|
||||
x.attr('data-items',w);
|
||||
x.find('img').attr('src',$(this).find('img').attr('src'));
|
||||
x.addClass('is-open');
|
||||
});
|
||||
}
|
||||
count = count + 1;
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function galleryControl(e,f,g,h) {
|
||||
let object;
|
||||
let next = loopControl(g, f, h);
|
||||
|
||||
switch(e) {
|
||||
case 0:
|
||||
object = "statek";
|
||||
break;
|
||||
case 1:
|
||||
object = "penzion";
|
||||
break;
|
||||
case 2:
|
||||
object = "chata";
|
||||
break;
|
||||
case 3:
|
||||
object = "statek";
|
||||
}
|
||||
$('body').find('.section--preview').attr('data-item',next);
|
||||
if(e==3){
|
||||
switch(next) {
|
||||
case 1:
|
||||
next = "6";
|
||||
break;
|
||||
case 2:
|
||||
next = "w1";
|
||||
break;
|
||||
case 3:
|
||||
next = "w2";
|
||||
break;
|
||||
case 4:
|
||||
next = "w6";
|
||||
break;
|
||||
case 5:
|
||||
next = "w3";
|
||||
break;
|
||||
case 6:
|
||||
next = "w4";
|
||||
break;
|
||||
case 7:
|
||||
next = "3";
|
||||
break;
|
||||
case 8:
|
||||
next = "9";
|
||||
break;
|
||||
case 9:
|
||||
next = "8";
|
||||
break;
|
||||
case 10:
|
||||
next = "7";
|
||||
break;
|
||||
case 11:
|
||||
next = "11";
|
||||
break;
|
||||
case 12:
|
||||
next = "w5";
|
||||
}
|
||||
}
|
||||
$('body').find('.section--preview').find('img').attr('src','img/gallery/' + object + '/' + next + '.webp');
|
||||
}
|
||||
|
||||
function loopControl(e,f,g) {
|
||||
if(f){if(g+1==e+1){e=1;}else{e=e+1;}}else{if(0==e-1){e=g;}else{e=e-1;}}return e;
|
||||
}
|
||||
|
||||
function menuControl(e,f) {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50;}else{position = 0}
|
||||
closeSequence(e);
|
||||
|
||||
if(f=="detail"){
|
||||
if(e.hasClass('section--switch')){
|
||||
e.find('.section__left').css('left',position+'%');
|
||||
}else{
|
||||
e.find('.section__left').css('left','0%');
|
||||
}
|
||||
}else if(f=="gallery"){
|
||||
let x = e.find('.section__gallery');
|
||||
x.addClass('is-open');
|
||||
if(!x.hasClass('loaded')){loadGallery(e,x.attr('data-object'),x.attr('data-items'));}
|
||||
}else{
|
||||
if(e.hasClass('section--switch')){
|
||||
e.find('.section__right').css('left',position+'%');
|
||||
}else{
|
||||
e.find('.section__right').css('left','0%');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function closeSequence(e) {
|
||||
let position1;
|
||||
let position2;
|
||||
let position3;
|
||||
let position4;
|
||||
if (screen.width > 1200){position1 = 0;position2 = 100;position3 = -50;position4 = 50;}else{position1 = -100;position2 = 100;position3 = -100;position4 = 100;}
|
||||
|
||||
if($('body').find('.header').hasClass('is-open')){
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.header').removeClass('is-open');
|
||||
$('body').find('.js-menu-button').removeClass('is-active');
|
||||
}
|
||||
|
||||
if(e.hasClass('section--switch')){
|
||||
e.find('.section__left').css('left',position1+'%');
|
||||
e.find('.section__right').css('left',position2+'%');
|
||||
}else{
|
||||
e.find('.section__left').css('left',position3+'%');
|
||||
e.find('.section__right').css('left',position4+'%');
|
||||
}
|
||||
e.find('.section__gallery').removeClass('is-open');
|
||||
}
|
||||
805
assets/js/v1.05_app.js
Normal file
@@ -0,0 +1,805 @@
|
||||
$('a[href*="#"]')
|
||||
// Remove links that don't actually link to anything
|
||||
.not('[href="#"]')
|
||||
.not('[href="#0"]')
|
||||
.click(function(event) {
|
||||
// On-page links
|
||||
if (
|
||||
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
|
||||
&&
|
||||
location.hostname == this.hostname
|
||||
) {
|
||||
// Figure out element to scroll to
|
||||
var target = $(this.hash);
|
||||
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
|
||||
// Does a scroll target exist?
|
||||
if (target.length) {
|
||||
// Only prevent default if animation is actually gonna happen
|
||||
event.preventDefault();
|
||||
$('html, body').animate({
|
||||
scrollTop: target.offset().top - 80
|
||||
}, 800, function() {
|
||||
// Callback after animation
|
||||
// Must change focus!
|
||||
var $target = $(target);
|
||||
$target.focus();
|
||||
if ($target.is(":focus")) { // Checking if the target was focused
|
||||
return false;
|
||||
} else {
|
||||
$target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
|
||||
$target.focus(); // Set focus again
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
init();
|
||||
|
||||
function init() {
|
||||
let state = 0;
|
||||
|
||||
$('.js-prev-slide').click(function() {
|
||||
if(state - 1 == -1){state = 2;}else{state = state - 1;}
|
||||
swiper(state,0);
|
||||
});
|
||||
$('.js-next-slide').click(function() {
|
||||
if(state + 1 == 3){state = 0;}else{state = state + 1;}
|
||||
swiper(state,1);
|
||||
});
|
||||
|
||||
$('.js-menu-object').click(function() {
|
||||
closeSequence($('body').find('.section--block' + $(this).attr('href')));
|
||||
});
|
||||
$('.js-menu-detail').click(function() {
|
||||
menuControl($('body').find('.section--block' + $(this).attr('href')), "detail");
|
||||
});
|
||||
$('.js-menu-gallery').click(function() {
|
||||
menuControl($('body').find('.section--block' + $(this).attr('href')), "gallery");
|
||||
});
|
||||
$('.js-menu-price').click(function() {
|
||||
menuControl($('body').find('.section--block' + $(this).attr('href')), "price");
|
||||
});
|
||||
|
||||
$('.js-left-open').click(function() {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50;}else{position = 0;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__left').css('left',position + '%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__left').css('left','0%');
|
||||
}
|
||||
});
|
||||
$('.js-left-close').click(function() {
|
||||
let position1;
|
||||
let position2;
|
||||
if (screen.width > 1200){position1 = 0;position2 = -50;}else{position1 = -100;position2 = -100;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__left').css('left',position1 + '%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__left').css('left',position2 + '%');
|
||||
}
|
||||
});
|
||||
$('.js-gallery-open').click(function() {
|
||||
const x = $(this).closest('.section').find('.section__gallery');
|
||||
x.addClass('is-open');
|
||||
if(!x.hasClass('loaded')){loadGallery(this,x.attr('data-object'),x.attr('data-items'));}
|
||||
});
|
||||
$('.js-gallery-close').click(function() {
|
||||
$(this).closest('.section').find('.section__gallery').removeClass('is-open');
|
||||
});
|
||||
$('.js-right-open').click(function() {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50;}else{position = 0;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__right').css('left',position + '%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__right').css('left','0%');
|
||||
}
|
||||
});
|
||||
$('.js-right-close').click(function() {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50}else{position = 100;}
|
||||
if($(this).closest('.section').hasClass('section--switch')){
|
||||
$(this).closest('.section').find('.section__right').css('left','100%');
|
||||
}else{
|
||||
$(this).closest('.section').find('.section__right').css('left',position + '%');
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-preview-close').click(function() {
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.section--preview').removeClass('is-open');
|
||||
});
|
||||
|
||||
$('.js-gdpr-open').click(function() {
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.section--gdpr').addClass('is-open');
|
||||
});
|
||||
|
||||
$('.js-gdpr-close').click(function() {
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.section--gdpr').removeClass('is-open');
|
||||
});
|
||||
|
||||
$('.js-preview-prev').click(function() {
|
||||
let data = $(this).closest('.section--preview');
|
||||
let x = Number(data.attr('data-object'));
|
||||
let y = Number(data.attr('data-item'));
|
||||
let z = Number(data.attr('data-items'));
|
||||
|
||||
if (window.innerWidth > window.innerHeight) {
|
||||
galleryControl(x,0,y,z);
|
||||
} else {
|
||||
galleryControl(x,1,y,z);
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-preview-next').click(function() {
|
||||
let data = $(this).closest('.section--preview');
|
||||
let x = Number(data.attr('data-object'));
|
||||
let y = Number(data.attr('data-item'));
|
||||
let z = Number(data.attr('data-items'));
|
||||
|
||||
if (window.innerWidth > window.innerHeight) {
|
||||
galleryControl(x,1,y,z);
|
||||
} else {
|
||||
galleryControl(x,0,y,z);
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-menu-button').click(function() {
|
||||
if($(this).hasClass('is-active')){
|
||||
$(this).removeClass('is-active');
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.header').removeClass('is-open');
|
||||
}else{
|
||||
$(this).addClass('is-active');
|
||||
$('body').addClass('noscroll');
|
||||
$('body').find('.header').addClass('is-open');
|
||||
}
|
||||
});
|
||||
|
||||
$('.js-menu-close').click(function() {
|
||||
$('body').find('.header').removeClass('is-open');
|
||||
$('body').find('.js-menu-button').removeClass('is-active');
|
||||
$('body').removeClass('noscroll');
|
||||
});
|
||||
}
|
||||
|
||||
function swiper(e,f) {
|
||||
const a = $('.js-slide-one');
|
||||
const b = $('.js-slide-two');
|
||||
const c = $('.js-slide-three');
|
||||
|
||||
if (e == 1) {
|
||||
if (f == 1) {
|
||||
$(a).css('zIndex','1');
|
||||
$(c).css('zIndex','-1');
|
||||
} else {
|
||||
$(a).css('zIndex','-1');
|
||||
$(c).css('zIndex','1');
|
||||
}
|
||||
$(b).css('zIndex','1');
|
||||
$(a).css('left','-100%');
|
||||
$(b).css('left','0%');
|
||||
$(c).css('left','100%');
|
||||
} else if (e == 2) {
|
||||
if (f == 1) {
|
||||
$(b).css('zIndex','1');
|
||||
$(a).css('zIndex','-1');
|
||||
} else {
|
||||
$(b).css('zIndex','-1');
|
||||
$(a).css('zIndex','1');
|
||||
}
|
||||
$(c).css('zIndex','1');
|
||||
$(a).css('left','100%');
|
||||
$(b).css('left','-100%');
|
||||
$(c).css('left','0%');
|
||||
} else {
|
||||
if (f == 1) {
|
||||
$(c).css('zIndex','1');
|
||||
$(b).css('zIndex','-1');
|
||||
} else {
|
||||
$(c).css('zIndex','-1');
|
||||
$(b).css('zIndex','1');
|
||||
}
|
||||
$(a).css('zIndex','1');
|
||||
$(a).css('left','0%');
|
||||
$(b).css('left','100%');
|
||||
$(c).css('left','-100%');
|
||||
}
|
||||
}
|
||||
|
||||
function loadGallery(item,object,maxItems){
|
||||
let imageUrls = [];
|
||||
const loadImage = src =>
|
||||
new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
img.onload = () => resolve(img);
|
||||
img.onerror = reject;
|
||||
img.src = src;
|
||||
})
|
||||
;
|
||||
|
||||
switch(Number(object)) {
|
||||
case 0:
|
||||
imageUrls = [
|
||||
"img/gallery/statek/thumbs/1.webp",
|
||||
"img/gallery/statek/thumbs/2.webp",
|
||||
"img/gallery/statek/thumbs/3.webp",
|
||||
"img/gallery/statek/thumbs/4.webp",
|
||||
"img/gallery/statek/thumbs/5.webp",
|
||||
"img/gallery/statek/thumbs/6n.webp",
|
||||
"img/gallery/statek/thumbs/7.webp",
|
||||
"img/gallery/statek/thumbs/30.webp",
|
||||
"img/gallery/statek/thumbs/8.webp",
|
||||
"img/gallery/statek/thumbs/9.webp",
|
||||
"img/gallery/statek/thumbs/10.webp",
|
||||
"img/gallery/statek/thumbs/11.webp",
|
||||
"img/gallery/statek/thumbs/12.webp",
|
||||
"img/gallery/statek/thumbs/13.webp",
|
||||
"img/gallery/statek/thumbs/14.webp",
|
||||
"img/gallery/statek/thumbs/15.webp",
|
||||
"img/gallery/statek/thumbs/16.webp",
|
||||
"img/gallery/statek/thumbs/17.webp",
|
||||
"img/gallery/statek/thumbs/18.webp",
|
||||
"img/gallery/statek/thumbs/19.webp",
|
||||
"img/gallery/statek/thumbs/20.webp",
|
||||
"img/gallery/statek/thumbs/21.webp",
|
||||
"img/gallery/statek/thumbs/22.webp",
|
||||
"img/gallery/statek/thumbs/23.webp",
|
||||
"img/gallery/statek/thumbs/24.webp",
|
||||
"img/gallery/statek/thumbs/w9n.webp",
|
||||
"img/gallery/statek/thumbs/26.webp",
|
||||
"img/gallery/statek/thumbs/27n.webp",
|
||||
"img/gallery/statek/thumbs/28n.webp",
|
||||
"img/gallery/statek/thumbs/29.webp",
|
||||
"img/gallery/statek/thumbs/31.webp",
|
||||
"img/gallery/statek/thumbs/32.webp"
|
||||
];
|
||||
break;
|
||||
case 1:
|
||||
imageUrls = [
|
||||
"img/gallery/penzion/thumbs/1.webp",
|
||||
"img/gallery/penzion/thumbs/2.webp",
|
||||
"img/gallery/penzion/thumbs/3.webp",
|
||||
"img/gallery/penzion/thumbs/4.webp",
|
||||
"img/gallery/penzion/thumbs/32.webp",
|
||||
"img/gallery/penzion/thumbs/25.webp",
|
||||
"img/gallery/penzion/thumbs/5.webp",
|
||||
"img/gallery/penzion/thumbs/6.webp",
|
||||
"img/gallery/penzion/thumbs/7.webp",
|
||||
"img/gallery/penzion/thumbs/8.webp",
|
||||
"img/gallery/penzion/thumbs/9.webp",
|
||||
"img/gallery/penzion/thumbs/10.webp",
|
||||
"img/gallery/penzion/thumbs/11.webp",
|
||||
"img/gallery/penzion/thumbs/12.webp",
|
||||
"img/gallery/penzion/thumbs/13.webp",
|
||||
"img/gallery/penzion/thumbs/14.webp",
|
||||
"img/gallery/penzion/thumbs/15.webp",
|
||||
"img/gallery/penzion/thumbs/16.webp",
|
||||
"img/gallery/penzion/thumbs/17.webp",
|
||||
"img/gallery/penzion/thumbs/18.webp",
|
||||
"img/gallery/penzion/thumbs/19.webp",
|
||||
"img/gallery/penzion/thumbs/20.webp",
|
||||
"img/gallery/penzion/thumbs/21.webp",
|
||||
"img/gallery/penzion/thumbs/22.webp",
|
||||
"img/gallery/penzion/thumbs/23.webp",
|
||||
"img/gallery/penzion/thumbs/24.webp",
|
||||
"img/gallery/penzion/thumbs/26.webp",
|
||||
"img/gallery/penzion/thumbs/27.webp",
|
||||
"img/gallery/penzion/thumbs/28.webp",
|
||||
"img/gallery/penzion/thumbs/29.webp",
|
||||
"img/gallery/penzion/thumbs/30.webp",
|
||||
"img/gallery/penzion/thumbs/31.webp"
|
||||
];
|
||||
break;
|
||||
case 2:
|
||||
imageUrls = [
|
||||
"img/gallery/chata/thumbs/1.webp",
|
||||
"img/gallery/chata/thumbs/2.webp",
|
||||
"img/gallery/chata/thumbs/3.webp",
|
||||
"img/gallery/chata/thumbs/4.webp",
|
||||
"img/gallery/chata/thumbs/5.webp",
|
||||
"img/gallery/chata/thumbs/6.webp",
|
||||
"img/gallery/chata/thumbs/7.webp",
|
||||
"img/gallery/chata/thumbs/8.webp",
|
||||
"img/gallery/chata/thumbs/9.webp",
|
||||
"img/gallery/chata/thumbs/10.webp",
|
||||
"img/gallery/chata/thumbs/11.webp",
|
||||
"img/gallery/chata/thumbs/12.webp",
|
||||
"img/gallery/chata/thumbs/13.webp",
|
||||
"img/gallery/chata/thumbs/14.webp",
|
||||
"img/gallery/chata/thumbs/15.webp",
|
||||
"img/gallery/chata/thumbs/16.webp",
|
||||
"img/gallery/chata/thumbs/17.webp",
|
||||
"img/gallery/chata/thumbs/18.webp",
|
||||
"img/gallery/chata/thumbs/19.webp",
|
||||
"img/gallery/chata/thumbs/20.webp",
|
||||
"img/gallery/chata/thumbs/21.webp",
|
||||
"img/gallery/chata/thumbs/22.webp",
|
||||
"img/gallery/chata/thumbs/23.webp",
|
||||
"img/gallery/chata/thumbs/24.webp",
|
||||
"img/gallery/chata/thumbs/25.webp",
|
||||
"img/gallery/chata/thumbs/26.webp",
|
||||
"img/gallery/chata/thumbs/27.webp",
|
||||
"img/gallery/chata/thumbs/28.webp"
|
||||
];
|
||||
break;
|
||||
case 3:
|
||||
imageUrls = [
|
||||
"img/gallery/statek/thumbs/w6.webp",
|
||||
"img/gallery/statek/thumbs/w11.webp",
|
||||
"img/gallery/statek/thumbs/w2.webp",
|
||||
"img/gallery/statek/thumbs/6n.webp",
|
||||
"img/gallery/statek/thumbs/w3.webp",
|
||||
"img/gallery/statek/thumbs/3.webp",
|
||||
"img/gallery/statek/thumbs/9.webp",
|
||||
"img/gallery/statek/thumbs/8.webp",
|
||||
"img/gallery/statek/thumbs/7.webp",
|
||||
"img/gallery/statek/thumbs/11.webp",
|
||||
"img/gallery/statek/thumbs/w5.webp",
|
||||
"img/gallery/statek/thumbs/w7.webp",
|
||||
"img/gallery/statek/thumbs/28n.webp",
|
||||
"img/gallery/statek/thumbs/w9n.webp",
|
||||
"img/gallery/statek/thumbs/w12.webp",
|
||||
"img/gallery/statek/thumbs/25n.webp",
|
||||
"img/gallery/statek/thumbs/26.webp",
|
||||
"img/gallery/statek/thumbs/27n.webp",
|
||||
"img/gallery/statek/thumbs/w8.webp",
|
||||
"img/gallery/statek/thumbs/w20.webp"
|
||||
];
|
||||
}
|
||||
|
||||
Promise.all(imageUrls.map(loadImage)).then(images => {
|
||||
let count = 1;
|
||||
images.forEach((image, i) =>{
|
||||
$(item).closest('.section').find('.gallery').append($('<div class="gallery__item js-gallery-item" data-order="' + count + '"></div>').append(image));
|
||||
if(count == maxItems){
|
||||
$(item).closest('.section').find('.section__gallery').addClass('loaded');
|
||||
$('.js-gallery-item').click(function() {
|
||||
let z,q,v;
|
||||
let x = $('body').find('.section--preview');
|
||||
let y = Number($(this).attr('data-order'));
|
||||
let w = Number($(item).closest('.section').find('.section__gallery').attr('data-items'));
|
||||
let c = $(this).closest('.section').attr('id');
|
||||
|
||||
if(c == "statek"){z = 0;}else if(c == "penzion"){z = 1;}else if(c == "chata"){z = 2;}else{z = 3;}
|
||||
$('body').addClass('noscroll');
|
||||
x.attr('data-object',z);
|
||||
x.attr('data-item',y);
|
||||
x.attr('data-items',w);
|
||||
q = $(this).find('img').attr('src').split("/");
|
||||
if(c=="events"){v = "statek"}else{v = c;}
|
||||
x.find('img').attr('src','img/gallery/' + v + '/' + q[4]);
|
||||
x.addClass('is-open');
|
||||
});
|
||||
}
|
||||
count = count + 1;
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function galleryControl(e,f,g,h) {
|
||||
let object;
|
||||
let next = loopControl(g, f, h);
|
||||
|
||||
switch(e) {
|
||||
case 0:
|
||||
object = "statek";
|
||||
break;
|
||||
case 1:
|
||||
object = "penzion";
|
||||
break;
|
||||
case 2:
|
||||
object = "chata";
|
||||
break;
|
||||
case 3:
|
||||
object = "statek";
|
||||
}
|
||||
$('body').find('.section--preview').attr('data-item',next);
|
||||
|
||||
if(e==0){
|
||||
switch(next) {
|
||||
case 1:
|
||||
next = "1";
|
||||
break;
|
||||
case 2:
|
||||
next = "2";
|
||||
break;
|
||||
case 3:
|
||||
next = "3";
|
||||
break;
|
||||
case 4:
|
||||
next = "4";
|
||||
break;
|
||||
case 5:
|
||||
next = "5";
|
||||
break;
|
||||
case 6:
|
||||
next = "6n";
|
||||
break;
|
||||
case 7:
|
||||
next = "7";
|
||||
break;
|
||||
case 8:
|
||||
next = "30";
|
||||
break;
|
||||
case 9:
|
||||
next = "8";
|
||||
break;
|
||||
case 10:
|
||||
next = "9";
|
||||
break;
|
||||
case 11:
|
||||
next = "10";
|
||||
break;
|
||||
case 12:
|
||||
next = "11";
|
||||
break;
|
||||
case 13:
|
||||
next = "12";
|
||||
break;
|
||||
case 14:
|
||||
next = "13";
|
||||
break;
|
||||
case 15:
|
||||
next = "14";
|
||||
break;
|
||||
case 16:
|
||||
next = "15";
|
||||
break;
|
||||
case 17:
|
||||
next = "16";
|
||||
break;
|
||||
case 18:
|
||||
next = "17";
|
||||
break;
|
||||
case 19:
|
||||
next = "18";
|
||||
break;
|
||||
case 20:
|
||||
next = "19";
|
||||
break;
|
||||
case 21:
|
||||
next = "20";
|
||||
break;
|
||||
case 22:
|
||||
next = "21";
|
||||
break;
|
||||
case 23:
|
||||
next = "22";
|
||||
break;
|
||||
case 24:
|
||||
next = "23";
|
||||
break;
|
||||
case 25:
|
||||
next = "24";
|
||||
break;
|
||||
case 26:
|
||||
next = "w9n";
|
||||
break;
|
||||
case 27:
|
||||
next = "26";
|
||||
break;
|
||||
case 28:
|
||||
next = "27";
|
||||
break;
|
||||
case 29:
|
||||
next = "28";
|
||||
break;
|
||||
case 30:
|
||||
next = "29";
|
||||
break;
|
||||
case 31:
|
||||
next = "31";
|
||||
break;
|
||||
case 32:
|
||||
next = "32";
|
||||
}
|
||||
}
|
||||
|
||||
if(e==1){
|
||||
switch(next) {
|
||||
case 1:
|
||||
next = "1";
|
||||
break;
|
||||
case 2:
|
||||
next = "2";
|
||||
break;
|
||||
case 3:
|
||||
next = "3";
|
||||
break;
|
||||
case 4:
|
||||
next = "4";
|
||||
break;
|
||||
case 5:
|
||||
next = "32";
|
||||
break;
|
||||
case 6:
|
||||
next = "25";
|
||||
break;
|
||||
case 7:
|
||||
next = "5";
|
||||
break;
|
||||
case 8:
|
||||
next = "6";
|
||||
break;
|
||||
case 9:
|
||||
next = "7";
|
||||
break;
|
||||
case 10:
|
||||
next = "8";
|
||||
break;
|
||||
case 11:
|
||||
next = "9";
|
||||
break;
|
||||
case 12:
|
||||
next = "10";
|
||||
break;
|
||||
case 13:
|
||||
next = "11";
|
||||
break;
|
||||
case 14:
|
||||
next = "12";
|
||||
break;
|
||||
case 15:
|
||||
next = "13";
|
||||
break;
|
||||
case 16:
|
||||
next = "14";
|
||||
break;
|
||||
case 17:
|
||||
next = "15";
|
||||
break;
|
||||
case 18:
|
||||
next = "16";
|
||||
break;
|
||||
case 19:
|
||||
next = "17";
|
||||
break;
|
||||
case 20:
|
||||
next = "18";
|
||||
break;
|
||||
case 21:
|
||||
next = "19";
|
||||
break;
|
||||
case 22:
|
||||
next = "20";
|
||||
break;
|
||||
case 23:
|
||||
next = "21";
|
||||
break;
|
||||
case 24:
|
||||
next = "22";
|
||||
break;
|
||||
case 25:
|
||||
next = "23";
|
||||
break;
|
||||
case 26:
|
||||
next = "24";
|
||||
break;
|
||||
case 27:
|
||||
next = "26";
|
||||
break;
|
||||
case 28:
|
||||
next = "27";
|
||||
break;
|
||||
case 29:
|
||||
next = "28";
|
||||
break;
|
||||
case 30:
|
||||
next = "29";
|
||||
break;
|
||||
case 31:
|
||||
next = "30";
|
||||
break;
|
||||
case 32:
|
||||
next = "31";
|
||||
}
|
||||
}
|
||||
if(e==2){
|
||||
switch(next) {
|
||||
case 1:
|
||||
next = "1";
|
||||
break;
|
||||
case 2:
|
||||
next = "2";
|
||||
break;
|
||||
case 3:
|
||||
next = "3";
|
||||
break;
|
||||
case 4:
|
||||
next = "4";
|
||||
break;
|
||||
case 5:
|
||||
next = "5";
|
||||
break;
|
||||
case 6:
|
||||
next = "6";
|
||||
break;
|
||||
case 7:
|
||||
next = "7";
|
||||
break;
|
||||
case 8:
|
||||
next = "8";
|
||||
break;
|
||||
case 9:
|
||||
next = "9";
|
||||
break;
|
||||
case 10:
|
||||
next = "10";
|
||||
break;
|
||||
case 11:
|
||||
next = "11";
|
||||
break;
|
||||
case 12:
|
||||
next = "12";
|
||||
break;
|
||||
case 13:
|
||||
next = "13";
|
||||
break;
|
||||
case 14:
|
||||
next = "14";
|
||||
break;
|
||||
case 15:
|
||||
next = "15";
|
||||
break;
|
||||
case 16:
|
||||
next = "16";
|
||||
break;
|
||||
case 17:
|
||||
next = "17";
|
||||
break;
|
||||
case 18:
|
||||
next = "18";
|
||||
break;
|
||||
case 19:
|
||||
next = "19";
|
||||
break;
|
||||
case 20:
|
||||
next = "20";
|
||||
break;
|
||||
case 21:
|
||||
next = "21";
|
||||
break;
|
||||
case 22:
|
||||
next = "22";
|
||||
break;
|
||||
case 23:
|
||||
next = "23";
|
||||
break;
|
||||
case 24:
|
||||
next = "24";
|
||||
break;
|
||||
case 25:
|
||||
next = "25";
|
||||
break;
|
||||
case 26:
|
||||
next = "26";
|
||||
break;
|
||||
case 27:
|
||||
next = "27";
|
||||
break;
|
||||
case 28:
|
||||
next = "28";
|
||||
}
|
||||
}
|
||||
if(e==3){
|
||||
switch(next) {
|
||||
case 1:
|
||||
next = "w6";
|
||||
break;
|
||||
case 2:
|
||||
next = "w11";
|
||||
break;
|
||||
case 3:
|
||||
next = "w2";
|
||||
break;
|
||||
case 4:
|
||||
next = "6n";
|
||||
break;
|
||||
case 5:
|
||||
next = "w3";
|
||||
break;
|
||||
case 6:
|
||||
next = "3";
|
||||
break;
|
||||
case 7:
|
||||
next = "9";
|
||||
break;
|
||||
case 8:
|
||||
next = "8";
|
||||
break;
|
||||
case 9:
|
||||
next = "7";
|
||||
break;
|
||||
case 10:
|
||||
next = "11";
|
||||
break;
|
||||
case 11:
|
||||
next = "w5";
|
||||
break;
|
||||
case 12:
|
||||
next = "w7";
|
||||
break;
|
||||
case 13:
|
||||
next = "28n";
|
||||
break;
|
||||
case 14:
|
||||
next = "w9n";
|
||||
break;
|
||||
case 15:
|
||||
next = "w12";
|
||||
break;
|
||||
case 16:
|
||||
next = "25n";
|
||||
break;
|
||||
case 17:
|
||||
next = "26";
|
||||
break;
|
||||
case 18:
|
||||
next = "27";
|
||||
break;
|
||||
case 19:
|
||||
next = "w8";
|
||||
break;
|
||||
case 20:
|
||||
next = "w20"
|
||||
}
|
||||
}
|
||||
$('body').find('.section--preview').find('img').attr('src','img/gallery/' + object + '/' + next + '.webp');
|
||||
}
|
||||
|
||||
function loopControl(e,f,g) {
|
||||
if(f){if(0==e-1){e=g;}else{e=e-1;}}else{if(g+1==e+1){e=1;}else{e=e+1;}}return e;
|
||||
}
|
||||
|
||||
function menuControl(e,f) {
|
||||
let position;
|
||||
if (screen.width > 1200){position = 50;}else{position = 0}
|
||||
closeSequence(e);
|
||||
|
||||
if(f=="detail"){
|
||||
if(e.hasClass('section--switch')){
|
||||
e.find('.section__left').css('left',position+'%');
|
||||
}else{
|
||||
e.find('.section__left').css('left','0%');
|
||||
}
|
||||
}else if(f=="gallery"){
|
||||
let x = e.find('.section__gallery');
|
||||
x.addClass('is-open');
|
||||
if(!x.hasClass('loaded')){loadGallery(e,x.attr('data-object'),x.attr('data-items'));}
|
||||
}else{
|
||||
if(e.hasClass('section--switch')){
|
||||
e.find('.section__right').css('left',position+'%');
|
||||
}else{
|
||||
e.find('.section__right').css('left','0%');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function closeSequence(e) {
|
||||
let position1;
|
||||
let position2;
|
||||
let position3;
|
||||
let position4;
|
||||
if (screen.width > 1200){position1 = 0;position2 = 100;position3 = -50;position4 = 50;}else{position1 = -100;position2 = 100;position3 = -100;position4 = 100;}
|
||||
|
||||
if($('body').find('.header').hasClass('is-open')){
|
||||
$('body').removeClass('noscroll');
|
||||
$('body').find('.header').removeClass('is-open');
|
||||
$('body').find('.js-menu-button').removeClass('is-active');
|
||||
}
|
||||
|
||||
if(e.hasClass('section--switch')){
|
||||
e.find('.section__left').css('left',position1+'%');
|
||||
e.find('.section__right').css('left',position2+'%');
|
||||
}else{
|
||||
e.find('.section__left').css('left',position3+'%');
|
||||
e.find('.section__right').css('left',position4+'%');
|
||||
}
|
||||
e.find('.section__gallery').removeClass('is-open');
|
||||
}
|
||||
BIN
img/gallery/chata/25.webp
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
img/gallery/chata/26.webp
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
img/gallery/chata/27.webp
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
img/gallery/chata/28.webp
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
img/gallery/chata/thumbs/1.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
img/gallery/chata/thumbs/10.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
img/gallery/chata/thumbs/11.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
img/gallery/chata/thumbs/12.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
img/gallery/chata/thumbs/13.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
img/gallery/chata/thumbs/14.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
img/gallery/chata/thumbs/15.webp
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
img/gallery/chata/thumbs/16.webp
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
img/gallery/chata/thumbs/17.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/gallery/chata/thumbs/18.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
img/gallery/chata/thumbs/19.webp
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
img/gallery/chata/thumbs/2.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
img/gallery/chata/thumbs/20.webp
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
img/gallery/chata/thumbs/21.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
img/gallery/chata/thumbs/22.webp
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
img/gallery/chata/thumbs/23.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
img/gallery/chata/thumbs/24.webp
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
img/gallery/chata/thumbs/25.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
img/gallery/chata/thumbs/26.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
img/gallery/chata/thumbs/27.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/gallery/chata/thumbs/28.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
img/gallery/chata/thumbs/3.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
img/gallery/chata/thumbs/4.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/gallery/chata/thumbs/5.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/gallery/chata/thumbs/6.webp
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
img/gallery/chata/thumbs/7.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
img/gallery/chata/thumbs/8.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
img/gallery/chata/thumbs/9.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
img/gallery/penzion/25.webp
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
img/gallery/penzion/26.webp
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
img/gallery/penzion/27.webp
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
img/gallery/penzion/28.webp
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
img/gallery/penzion/29.webp
Normal file
|
After Width: | Height: | Size: 244 KiB |
BIN
img/gallery/penzion/30.webp
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
img/gallery/penzion/31.webp
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
img/gallery/penzion/32.webp
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
img/gallery/penzion/thumbs/1.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/gallery/penzion/thumbs/10.webp
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
img/gallery/penzion/thumbs/11.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
img/gallery/penzion/thumbs/12.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/gallery/penzion/thumbs/13.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
img/gallery/penzion/thumbs/14.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
img/gallery/penzion/thumbs/15.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/gallery/penzion/thumbs/16.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
img/gallery/penzion/thumbs/17.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
img/gallery/penzion/thumbs/18.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
img/gallery/penzion/thumbs/19.webp
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
img/gallery/penzion/thumbs/2.webp
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
img/gallery/penzion/thumbs/20.webp
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
img/gallery/penzion/thumbs/21.webp
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
img/gallery/penzion/thumbs/22.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
img/gallery/penzion/thumbs/23.webp
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
img/gallery/penzion/thumbs/24.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
img/gallery/penzion/thumbs/25.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
img/gallery/penzion/thumbs/26.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/gallery/penzion/thumbs/27.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/gallery/penzion/thumbs/28.webp
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
img/gallery/penzion/thumbs/29.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
img/gallery/penzion/thumbs/3.webp
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
img/gallery/penzion/thumbs/30.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
img/gallery/penzion/thumbs/31.webp
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
img/gallery/penzion/thumbs/32.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
img/gallery/penzion/thumbs/4.webp
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
img/gallery/penzion/thumbs/5.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/gallery/penzion/thumbs/6.webp
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
img/gallery/penzion/thumbs/7.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
img/gallery/penzion/thumbs/8.webp
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
img/gallery/penzion/thumbs/9.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
img/gallery/statek/25.webp
Normal file
|
After Width: | Height: | Size: 256 KiB |
BIN
img/gallery/statek/25n.webp
Normal file
|
After Width: | Height: | Size: 476 KiB |
BIN
img/gallery/statek/26.webp
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
img/gallery/statek/27.webp
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
img/gallery/statek/27n.webp
Normal file
|
After Width: | Height: | Size: 573 KiB |
BIN
img/gallery/statek/28.webp
Normal file
|
After Width: | Height: | Size: 226 KiB |
BIN
img/gallery/statek/28n.webp
Normal file
|
After Width: | Height: | Size: 478 KiB |
BIN
img/gallery/statek/29.webp
Normal file
|
After Width: | Height: | Size: 254 KiB |
BIN
img/gallery/statek/30.webp
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
img/gallery/statek/31.webp
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
img/gallery/statek/32.webp
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
img/gallery/statek/6n.webp
Normal file
|
After Width: | Height: | Size: 719 KiB |
BIN
img/gallery/statek/thumbs/1.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |