An error occurred while loading the file. Please try again.
An error occurred while loading the file. Please try again.
An error occurred while loading the file. Please try again.
-
Anton authored90a40b93
$(function() {
function showPopup(selector, callback) {
const $popup = $(selector);
$('.popup', $modal).hide();
$popup.show();
$modal.fadeIn(300);
$('html,body').css('overflow', 'hidden');
if (callback) callback();
}
function hidePopup() {
$modal.fadeOut(300, function() {
$('.popup', $modal).hide();
});
$('html,body').css('overflow', 'auto');
}
const $mSlider = $('.map__slider');
if ($mSlider) {
$mSlider.slick({
slidesToShow: 4,
slidesToScroll: 1,
touchThreshold: 12,
prevArrow: '<div class="slider__prev"></div>',
nextArrow: '<div class="slider__next"></div>',
infinite: false,
swipeToSlide: true
});
}
const $tSlider = $('#task-slider');
if ($tSlider.length) {
$tSlider.slick({
slidesToShow: 3,
slidesToScroll: 1,
touchThreshold: 9,
prevArrow: '<div class="slider__prev"><i class="slider__prev-icon"></i></div>',
nextArrow: '<div class="slider__next"><i class="slider__next-icon"></i></div>',
infinite: false,
swipeToSlide: true
});
}
const $modal = $('#modal');
$modal
.on('click', '[data-role="hide-popup"]', function() {
hidePopup();
return false;
})
.on('click', '#popup', function(e) {
e.stopPropagation();
})
.on('click', function() {
hidePopup();
return false;
});
const $showPopup = $('[data-role="show-popup"]');
$showPopup
.on('click', function() {
const selector = '#' + $(this).data('target');
showPopup(selector);
return false;
});
const $toggle = $('[data-role="toggle"]');
$toggle
.on('click', function() {
const $t = $(this),
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
$target = $('#' + $t.data('target'));
$t.toggleClass('show');
$target.toggleClass('open');
});
const $hide = $('[data-role="hide"]');
$hide
.on('click', function() {
const $target = $('#' + $(this).data('target'));
$('.show', $target).removeClass('show');
$('.open', $target).removeClass('open');
});
const $map = $('.map'),
mapItems = [
{
area: '<area shape="poly" coords="435.5,421.5 428.5,422.5 428.5,426.5 436.5,433.5 431.5,436.5 433.5,439.5 433.5,442.5 425.5,450.5 425.5,460.5 418.5,468.5 414.5,475.5 416.5,483.5 416.5,515.5 419.5,527.5 421.5,538.5 426.5,545.5 440.5,551.5 448.5,550.5 467.5,547.5 481.5,541.5 487.5,535.5 492.5,524.5 492.5,509.5 487.5,498.5 483.5,494.5 483.5,489.5 479.5,484.5 477.5,471.5 473.5,471.5 473.5,465.5 464.5,453.5 459.5,443.5 442.5,425.5 442.5,422.5" data-index="0">'
},
{
area: '<area shape="poly" coords="1093.395,140.509 1100.5,136.5 1103.5,137.5 1106.5,137.5 1107.5,127.5 1109.5,125.5 1115.5,125.5 1119.5,126.5 1123.5,123.5 1120.5,117.5 1121.5,116.5 1129.5,118.5 1135.5,113.5 1139.5,113.5 1144.5,119.5 1147.5,114.5 1152.5,114.5 1157.5,121.5 1159.5,122.5 1157.5,130.5 1154.5,135.5 1158.5,143.5 1162.5,142.5 1166.5,143.5 1171.5,138.5 1178.5,140.5 1181.5,138.5 1184.5,141.5 1181.5,145.5 1183.5,148.5 1184.5,154.5 1187.5,157.5 1184.5,163.5 1184.5,170.5 1181.5,174.5 1178.5,178.5 1182.5,181.5 1183.5,190.5 1177.5,199.5 1175.5,206.5 1182.5,208.5 1191.5,200.5 1198.5,194.5 1202.5,193.5 1203.5,188.5 1208.5,188.5 1213.5,182.5 1217.415,182.5 1227.5,189.5 1232.5,189.5 1232.5,193.5 1234.5,193.5 1241.5,186.5 1247.5,186.5 1247.5,181.5 1249.5,181.5 1250.5,177.5 1254.5,176.5 1252.5,173.5 1255.5,171.5 1266.5,171.5 1274.5,173.5 1278.5,172.5 1289.5,186.5 1297.5,193.5 1309.5,200.5 1309.5,209.5 1308.5,217.5 1309.491,229.39 1319.5,236.5 1320.5,241.5 1333.5,243.5 1332.5,248.5 1335.5,251.5 1340.5,251.5 1342.5,254.5 1341.5,262.5 1337.5,265.5 1341.5,266.5 1337.5,271.5 1342.5,277.5 1340.5,284.5 1340.5,292.5 1329.5,300.5 1325.5,304.5 1321.5,299.5 1312.5,299.5 1307.5,302.5 1290.5,303.5 1283.5,305.5 1275.5,303.5 1256.5,309.5 1251.5,313.5 1244.5,326.5 1239.5,331.5 1240.5,333.5 1237.5,335.5 1232.5,335.5 1232.5,345.5 1238.5,353.5 1239.5,360.5 1238.5,363.5 1249.5,370.5 1247.5,374.5 1247.5,380.5 1251.5,384.5 1255.5,391.5 1255.5,395.5 1253.5,391.5 1249.5,386.5 1243.5,379.5 1243.5,383.5 1238.5,381.5 1232.5,380.5 1231.5,376.5 1216.5,367.5 1212.5,365.5 1200.5,370.5 1196.5,368.5 1188.5,368.5 1184.5,371.5 1179.5,367.5 1181.5,363.5 1179.5,360.5 1181.5,356.5 1180.5,354.5 1181.5,346.5 1183.5,342.5 1173.5,342.5 1170.5,340.5 1167.5,342.5 1158.5,343.5 1151.5,346.5 1148.5,350.5 1153.5,354.5 1151.5,364.5 1149.5,368.5 1150.5,377.5 1152.5,385.5 1145.5,395.5 1144.5,401.5 1139.5,408.5 1137.5,419.5 1134.5,421.5 1135.5,429.5 1132.5,431.5 1126.5,441.5 1128.5,446.5 1123.5,447.5 1126.5,451.5 1123.5,455.5 1123.5,467.5 1129.5,477.5 1126.5,480.5 1128.5,483.5 1135.5,483.5 1140.5,479.5 1148.5,479.5 1150.5,482.5 1154.5,502.5 1161.5,508.5 1161.5,505.5 1166.5,511.5 1170.5,529.5 1175.5,542.5 1185.5,552.5 1194.5,555.5 1203.5,551.5 1214.5,554.5 1222.5,564.5 1234.5,571.5 1234.5,577.5 1229.5,582.5 1229.5,586.5 1224.5,590.5 1217.5,588.5 1215.5,585.5 1204.5,591.5 1200.5,595.5 1193.5,590.5 1195.5,585.5 1197.5,585.5 1196.5,578.5 1197.5,576.5 1187.5,576.5 1186.5,570.5 1176.5,570.5 1169.5,568.5 1167.5,563.5 1163.5,563.5 1163.5,572.5 1154.5,565.5 1145.5,559.5 1144.5,551.5 1140.5,549.5 1139.5,546.5 1131.5,544.5 1129.5,536.5 1124.5,532.5 1122.5,534.5 1119.5,531.5 1120.5,527.5 1116.5,523.5 1109.5,523.5 1107.5,515.5 1102.5,514.5 1099.5,519.5 1094.5,519.5 1091.5,516.5 1088.5,508.5 1090.5,499.5 1094.5,489.5 1094.5,480.5 1098.5,473.5 1099.5,463.5 1103.5,459.5 1104.5,454.5 1107.5,448.5 1109.5,441.5 1107.5,439.5 1108.5,436.5 1110.5,433.5 1115.5,432.5 1115.5,427.5 1118.5,427.5 1124.5,421.5 1128.5,413.5 1131.5,405.5 1135.5,404.5 1137.5,399.5 1134.5,396.5 1135.5,393.5 1131.5,388.5 1128.5,379.5 1128.5,374.5 1120.5,366.5 1117.5,359.5 1117.5,354.5 1120.5,354.5 1119.5,343.5 1116.5,333.5 1109.5,325.5 1095.5,315.5 1086.5,304.5 1082.5,293.5 1083.5,288.5 1087.5,286.5 1091.5,284.5 1096.5,284.5 1095.5,271.5 1096.5,261.5 1098.5,260.5 1104.5,258.5 1106.5,254.5 1107.5,250.5 1105.5,249.5 1100.5,255.5 1096.5,247.5 1091.5,240.5 1092.5,235.5 1090.5,231.5 1084.5,228.5 1078.5,221.5 1075.5,216.5 1066.5,209.5 1063.5,204.5 1065.5,198.5 1061.5,191.5 1060.5,188.5 1058.5,190.5 1055.5,188.5 1055.5,185.5 1052.5,181.5 1053.5,179.5 1055.5,181.5 1059.5,181.5 1061.5,179.5 1065.5,179.5 1064.5,170.5 1061.5,167.5 1067.5,161.5 1067.5,158.5 1065.5,156.5 1065.5,150.5 1068.5,145.5 1072.5,144.5 1074.5,137.5 1081.5,141.5" data-index="1">'
},
{
area: '<area shape="poly" coords="1213.5,33.5 1217,31 1225.5,32.5 1235.5,39.5 1239.5,33.5 1244.5,26.5 1251.5,32.5 1254.5,24.5 1266.5,32.5 1267.5,25.5 1274.5,21.5 1277.5,26.5 1283.5,20.5 1289.5,20.5 1292.5,15.5 1291.5,11.5 1294.5,7.5 1302.5,3.5 1306.5,-0.5 1316.5,5.5 1316.5,9.5 1322.5,9.5 1333.5,9.5 1340.5,12.5 1347.5,9.5 1358.5,12.5 1354.5,21.5 1351.5,21.5 1351.5,28.5 1355.5,29.5 1356.5,40.5 1363.5,39.5 1368.5,41.5 1368.5,44.5 1378.5,46.5 1379.5,49.5 1382.5,47.5 1384.5,49.5 1393.5,45.5 1401.5,49.5 1399.5,53.5 1398.5,50.5 1395.5,51.5 1394.5,55.5 1391.5,55.5 1389.5,59.5 1384.5,59.5 1382.5,62.5 1383.5,69.5 1376.5,73.5 1372.5,73.5 1368.5,75.5 1363.5,75.5 1365.5,82.5 1359.5,88.5 1360.5,95.5 1352.5,102.5 1345.5,110.5 1340.5,111.5 1339.5,118.5 1336.5,122.5 1337.5,134.5 1335.5,136.5 1334.5,141.5 1331.5,144.5 1335.5,148.5 1339.5,154.5 1350.5,165.5 1354.5,166.5 1359.5,170.5 1365.5,173.5 1363.5,179.5 1369.5,188.5 1381.5,197.5 1387.5,199.5 1392.5,206.5 1409.5,216.5 1413.5,218.5 1414.5,222.5 1418.5,222.5 1419.5,220.5 1423.5,220.5 1423.5,223.5 1427.5,223.5 1427.5,227.5 1430.5,225.5 1432.5,226.5 1430.5,229.5 1436.5,233.5 1447.5,245.5 1450.5,247.5 1452.5,246.5 1457.5,251.5 1455.5,255.5 1463.5,267.5 1464.5,273.5 1469.5,281.5 1469.5,286.5 1474.5,293.5 1473.5,303.5 1477.5,308.5 1475.5,311.5 1477.5,318.5 1484.5,325.5 1481.5,329.5 1484.5,332.5 1484.5,336.5 1480.5,333.5 1480.5,330.5 1475.5,335.5 1481.5,342.5 1479.5,344.5 1474.5,341.5 1477.5,346.5 1477.5,353.5 1480.5,356.5 1480.5,359.5 1477.5,360.5 1480.5,364.5 1476.5,370.5 1473.5,370.5 1473.5,377.5 1471.5,380.5 1466.5,380.5 1464.5,385.5 1458.5,386.5 1449.5,396.5 1443.5,397.5 1440.5,400.5 1439.5,405.5 1434.5,405.5 1422.5,414.5 1412.5,419.5 1410.5,417.5 1402.5,416.5 1399.5,413.5 1395.5,413.5 1394.5,418.5 1397.5,423.5 1395.5,425.5 1385.5,425.5 1398.5,428.5 1392.5,436.5 1395.5,437.5 1389.5,441.5 1391.5,443.5 1389.5,449.5 1385.5,450.5 1364.5,438.5 1378.5,452.5 1378.5,457.5 1365.5,463.5 1354.5,468.5 1349.5,477.5 1340.5,486.5 1332.5,488.5 1327.5,487.5 1332.5,482.5 1328.5,482.5 1328.5,450.5 1337.5,442.5 1332.5,438.5 1328.5,439.5 1324.5,435.5 1320.5,439.5 1312.5,430.5 1316.5,426.5 1326.5,425.5 1334.5,417.5 1331.5,413.5 1333.5,410.5 1343.5,412.5 1345.5,408.5 1351.5,408.5 1357.5,404.5 1363.5,410.5 1365.5,408.5 1368.5,410.5 1373.5,410.5 1370.5,406.5 1373.5,404.5 1371.5,402.5 1368.5,402.5 1360.5,396.5 1360.5,391.5 1357.5,386.5 1360.5,383.5 1363.5,383.5 1365.5,379.5 1374.5,379.5 1379.5,380.5 1379.5,374.5 1378.5,370.5 1389.5,370.5 1391.5,366.5 1398.5,365.5 1408.5,355.5 1413.5,357.5 1417.5,352.5 1417.5,344.5 1410.5,335.5 1414.5,328.5 1416.5,317.5 1409.5,307.5 1409.5,302.5 1405.5,299.5 1404.5,289.5 1409.5,283.5 1409.5,277.5 1407.5,274.5 1409.5,271.5 1405.5,267.5 1410.5,264.5 1412.5,258.5 1408.5,254.5 1405.5,252.5 1401.5,252.5 1393.5,244.5 1393.5,241.5 1402.5,235.5 1401.5,232.5 1398.5,233.5 1393.5,231.5 1390.5,230.5 1390.5,228.5 1385.5,227.5 1381.5,223.5 1380.5,219.5 1377.5,225.5 1373.5,222.5 1369.5,217.5 1368.5,208.5 1365.5,207.5 1358.5,199.5 1355.5,199.5 1338.5,187.5 1334.5,182.5 1333.5,178.5 1327.5,172.5 1324.5,173.5 1321.5,171.5 1314.5,165.5 1316.5,158.5 1300.5,154.5 1293.5,150.5 1289.5,149.5 1279.5,143.5 1270.5,141.5 1278.5,133.5 1274.5,128.5 1282.5,125.5 1292.5,128.5 1297.5,125.5 1301.5,120.5 1299.5,118.5 1305.5,113.5 1301.5,107.5 1296.5,108.5 1295.5,104.5 1292.5,102.5 1284.5,101.5 1292.5,93.5 1280.5,87.5 1273.5,86.5 1265.5,91.5 1262.5,97.5 1253.5,93.5 1242.5,92.5 1232.5,80.5 1233.5,71.5 1236.5,68.5 1234.5,64.5 1229.5,64.5 1226.5,66.5 1222.5,58.5 1216.5,52.5 1209.5,48.5 1206.5,43.5 1210.5,41.5" data-index="2">'
},
{
area: '<area shape="poly" coords="1448.5,103.5 1446.5,102.5 1446.5,99.5 1450.5,95.5 1457.5,95.5 1458.5,91.5 1463.5,89.5 1471.5,89.5 1478.5,85.5 1486.5,83.5 1491.5,83.5 1494.5,79.5 1499.5,82.5 1504.5,82.5 1510.5,93.5 1503.5,100.5 1498.5,108.5 1496.5,118.5 1496.5,126.5 1493.5,130.5 1488.5,131.5 1483.5,136.5 1482.5,142.5 1472.5,143.5 1472.5,149.5 1467.5,151.5 1463.5,149.5 1453.5,150.5 1446.5,149.5 1435.5,146.5 1434.5,139.5 1432.5,135.5 1431.5,127.5 1432.5,124.5 1430.5,121.5 1432.5,116.5 1442.5,107.5" data-index="3">'
},
];
if ($map.length) {
$map
.ptMap({
imgSource: '#mapImg',
type: 'mapArea',
items: mapItems
})
.on('change', function(e, i) {
const selector = '#map-slider-' + i;
showPopup(selector, function() {
const $slider = $('.slick-initialized', $(selector));
if ($slider.length) {
$slider.slick('refresh');
}
});
})
.on('mouseover', 'area', function() {
const i = $(this).data('index');
$('.map__region', $map).removeClass('active').eq(i).addClass('active');
$('.map__name', $map).removeClass('active').eq(i).addClass('active');
})
.on('mouseleave', 'area', function() {
$('.map__region', $map).removeClass('active');
$('.map__name', $map).removeClass('active');
});
}
const $hotels = $('[data-role="hotel"]'),
$hotelsBg = $('[data-role="hotel-bg"]'),
hotelsTitleColors = [
'#ffffff',
'#ffffff',
'#ffffff',
'#ffffff'
];
if ($hotels.length) {
let hotelTimer;
$hotels
.on('mouseover', function() {
const index = $(this).data('index');
clearTimeout(hotelTimer);
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
$('#hotels').css('color', hotelsTitleColors[index]);
$hotelsBg.removeClass('active').eq(index).addClass('active');
})
.on('mouseleave', function() {
hotelTimer = setTimeout(function() {
$('#hotels').css('color', '#521384');
$hotelsBg.removeClass('active');
}, 150);
});
}
let winHeight = $(window).height(), tmr;
setTimeout(function() {
$(window)
.scroll(function() {
const $parallax = $('[data-role="parallax"]'),
st = $(this).scrollTop();
$parallax.each(function() {
const $t = $(this), progress = ($t.offset().top - st) / Math.min(winHeight, 1080);
$('[data-role="parallax-layer-1"]', $t).css('transform', `translateY(${progress * 25}px)`);
$('[data-role="parallax-layer-2"]', $t).css('transform', `translateY(${progress * 50}px)`);
$('[data-role="parallax-layer-3"]', $t).css('transform', `translateY(${progress * 100}px)`);
$('[data-role="parallax-layer-4"]', $t).css('transform', `translateY(${progress * 200}px)`);
$('[data-role="parallax-layer-5"]', $t).css('transform', `translateY(${progress * 400}px)`);
});
})
.resize(function() {
winHeight = $(window).height();
});
}, 1);
console.log('Document ready');
});