favorite comment 0
thumb_up0thumb_down

directions_bike21/06/22 Tour CZ Etapa 4

Bicykel lock_open

place Graf prevýšenia

comment Komentáre ku aktivite

Momentálne sa tu nenachádzajú žiadne komentáre

Formulár sa odosiela
Pridaj komentár
Formulár sa odosiela
trending_up Vzdialenosť
141 km
schedule Čas
04:56:11
landscape Nastúpané
693 m

bar_chartŠtatistiky

Rýchlosť 28,6 km/h 65,5 km/h
Energetický výdaj 4 582 kcal

cloudPodmienky

Priemerná teplota 25 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

rowing WeightTraining - Morning Weight Training

trending_up 0,0 km
schedule 00:38:18
landscape 0 m
thumb_up0thumb_down

directions_bike Morning Ride

trending_up 115,4 km
schedule 03:34:48
landscape 808 m
thumb_up0thumb_down

rowing Swim - Afternoon Swim

trending_up 0,5 km
schedule 00:19:28
landscape 0 m

place Segmenty

Názov segmentuSegment ČasMôj čas Priemerná rýchlosť Priemerný výkon Priemerný tep Najlepší čas na segmenteNajlepší čas
Formulár sa odosiela
keyboard_arrow_up Sedlec nadrazi","segmentDistance":"D\u013a\u017eka: 1.94 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.7 %<\/b>","segmentNameHref":"krizovatka-mlyn-%3E-sedlec-nadrazi"},"geometry":{"type":"LineString","coordinates":[["16.671649","48.779666",193],["16.671649","48.779666",193],["16.672462","48.779628",195],["16.672462","48.779628",195],["16.675585","48.779538",194],["16.678197","48.778928",187],["16.684164","48.777108",185],["16.688789","48.775676",184],["16.691494","48.775203",184],["16.694532","48.774886",184]]}},{"type":"Feature","properties":{"type":99,"segment":"28637","segmentName":"Hup Valtice","segmentDistance":"D\u013a\u017eka: 539.30 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.3 %<\/b>","segmentNameHref":"hup-valtice"},"geometry":{"type":"LineString","coordinates":[["16.760307","48.742588",197],["16.760307","48.742588",197],["16.763042","48.743525",206],["16.767072","48.744068",225]]}},{"type":"Feature","properties":{"type":99,"segment":"28638","segmentName":"Zna\u010dky Valtice - B\u0159eclav","segmentDistance":"D\u013a\u017eka: 5.79 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -1 %<\/b>","segmentNameHref":"znacky-valtice-breclav"},"geometry":{"type":"LineString","coordinates":[["16.771289","48.74469",229],["16.771289","48.74469",229],["16.772817","48.744773",227],["16.774757","48.744896",223],["16.779612","48.745176",215],["16.786389","48.745518",210],["16.791157","48.745955",209],["16.792844","48.746616",208],["16.795592","48.747363",206],["16.798834","48.748239",200],["16.801427","48.748901",197],["16.807637","48.749768",193],["16.815474","48.750873",190],["16.825504","48.752249",189],["16.831142","48.753049",189],["16.834292","48.753479",189],["16.839677","48.754183",188],["16.841472","48.754493",189],["16.84344","48.754768",188],["16.843934","48.754868",187],["16.844642","48.754921",186]]}},{"type":"Feature","properties":{"type":99,"segment":"28640","segmentName":"Sprint kolem radaru","segmentDistance":"D\u013a\u017eka: 341.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.5 %<\/b>","segmentNameHref":"sprint-kolem-radaru"},"geometry":{"type":"LineString","coordinates":[["16.851369","48.755799",172],["16.851369","48.755799",172]]}},{"type":"Feature","properties":{"type":99,"segment":"28641","segmentName":"pohlavn\u00ed od valtick\u00e9 ke kostelu","segmentDistance":"D\u013a\u017eka: 641.10 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1 %<\/b>","segmentNameHref":"pohlavni-od-valticke-ke-kostelu"},"geometry":{"type":"LineString","coordinates":[["16.861082","48.757143",167],["16.861082","48.757143",167],["16.862064","48.756433",166],["16.864327","48.754276",166]]}},{"type":"Feature","properties":{"type":99,"segment":"28642","segmentName":"Od kostela ke kostelu","segmentDistance":"D\u013a\u017eka: 1.22 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.5 %<\/b>","segmentNameHref":"od-kostela-ke-kostelu"},"geometry":{"type":"LineString","coordinates":[["16.86647","48.752558",169],["16.86647","48.752558",169],["16.86833","48.753216",168],["16.872644","48.755045",167],["16.877755","48.757791",167],["16.879297","48.758683",167]]}},{"type":"Feature","properties":{"type":99,"segment":"129025","segmentName":"Kope\u010dek AlcaPlast","segmentDistance":"D\u013a\u017eka: 345.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -1.5 %<\/b>","segmentNameHref":"kopecek-alcaplast"},"geometry":{"type":"LineString","coordinates":[["16.912937","48.748194",171],["16.912937","48.748194",171]]}},{"type":"Feature","properties":{"type":99,"segment":"37219","segmentName":"Lan\u017ehot - Brodsk\u00e9 (flat)","segmentDistance":"D\u013a\u017eka: 5.36 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.2 %<\/b>","segmentNameHref":"lanzhot-brodske-flat"},"geometry":{"type":"LineString","coordinates":[["16.968019","48.722713",174],["16.968019","48.722713",174],["16.968824","48.722091",172],["16.969675","48.720698",166],["16.97042","48.718848",163],["16.971017","48.717201",163],["16.972354","48.713528",163],["16.973114","48.711449",163],["16.97457","48.708498",163],["16.978179","48.703218",163],["16.981714","48.698048",164],["16.982867","48.696359",163],["16.986389","48.690873",163],["16.98667","48.690036",163],["16.987702","48.689458",163],["16.988629","48.687888",164],["16.989687","48.686824",165],["16.991649","48.684971",162],["16.99335","48.683256",162],["16.996664","48.680056",162]]}},{"type":"Feature","properties":{"type":99,"segment":"15790","segmentName":"za Lan\u017ehotem 1 ","segmentDistance":"D\u013a\u017eka: 534.20 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.7 %<\/b>","segmentNameHref":"za-lanzhotem-1"},"geometry":{"type":"LineString","coordinates":[["16.971017","48.717201",163],["16.971017","48.717201",163],["16.972354","48.713528",163]]}},{"type":"Feature","properties":{"type":99,"segment":"10409","segmentName":"Adamov ute\u010deneck\u00fd t\u00e1bor - Gbely p\u00e1lenica","segmentDistance":"D\u013a\u017eka: 5.61 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.3 %<\/b>","segmentNameHref":"adamov-utecenecky-tabor-gbely-palenica"},"geometry":{"type":"LineString","coordinates":[["17.042877","48.723363",169],["17.042877","48.723363",169],["17.044022","48.722761",170],["17.046225","48.721994",170],["17.047692","48.721373",170],["17.048875","48.720698",171],["17.049629","48.719968",172],["17.050399","48.719369",172],["17.051622","48.718494",172],["17.052184","48.717919",172],["17.05241","48.717469",173],["17.052299","48.716989",173],["17.05184","48.716303",173],["17.052084","48.716113",173],["17.053507","48.715458",173],["17.055227","48.714688",174],["17.056522","48.714131",174],["17.058984","48.713043",174],["17.060529","48.712391",174],["17.062779","48.711428",175],["17.063812","48.711038",175],["17.066495","48.709834",175],["17.067337","48.709514",175],["17.068619","48.708963",176],["17.069915","48.708431",177],["17.071894","48.707719",177],["17.072519","48.707559",177],["17.07328","48.707153",178],["17.074052","48.706804",178],["17.075355","48.706734",179],["17.077829","48.706923",180],["17.079702","48.706903",180],["17.08068","48.707349",180],["17.08322","48.708098",181],["17.08527","48.708656",181],["17.088032","48.709419",182],["17.090004","48.710029",182],["17.091524","48.710363",183],["17.093515","48.710888",184],["17.094502","48.711139",185],["17.095992","48.711781",185],["17.097217","48.712358",186],["17.100169","48.713683",187],["17.102029","48.714508",187]]}},{"type":"Feature","properties":{"type":99,"segment":"10410","segmentName":"gbely pavl\u00edk \u017eel.prechod - vn linka pred p\u00e1lenicou","segmentDistance":"D\u013a\u017eka: 1.90 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.4 %<\/b>","segmentNameHref":"gbely-pavlik-zelprechod-vn-linka-pred-palenicou"},"geometry":{"type":"LineString","coordinates":[["17.079702","48.706903",180],["17.079702","48.706903",180],["17.08068","48.707349",180],["17.08322","48.708098",181],["17.08527","48.708656",181],["17.088032","48.709419",182],["17.090004","48.710029",182],["17.091524","48.710363",183],["17.093515","48.710888",184],["17.094502","48.711139",185],["17.095992","48.711781",185],["17.097217","48.712358",186],["17.100169","48.713683",187]]}},{"type":"Feature","properties":{"type":99,"segment":"2130","segmentName":"Dovidenia Gbely","segmentDistance":"D\u013a\u017eka: 515.90 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.5 %<\/b>","segmentNameHref":"dovidenia-gbely"},"geometry":{"type":"LineString","coordinates":[["17.122744","48.717166",198],["17.122744","48.717166",198],["17.12634","48.718183",208]]}},{"type":"Feature","properties":{"type":99,"segment":"2131","segmentName":"Od priehrady smer PV","segmentDistance":"D\u013a\u017eka: 991.20 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.7 %<\/b>","segmentNameHref":"od-priehrady-smer-pv"},"geometry":{"type":"LineString","coordinates":[["17.141964","48.727758",194],["17.141964","48.727758",194],["17.145512","48.728693",195],["17.148949","48.728528",205],["17.153744","48.727788",214]]}}] var layerGroup = L.layerGroup().addTo(map_leaflet); var layerGroupAllSegments = L.layerGroup(); if (gpx_segments != undefined) { gpx_segments_layer = L.geoJson(gpx_segments, { style: function(feature, layer) { return { 'weight': 10, 'color': '#bb6300', 'opacity': 1, }; }, onEachFeature:onEachFeature, }); function onEachFeature(feature, layer) { sn++; var prop = layer.feature.properties; var desc = getDescription(prop.type, prop.trailName, prop.trailId, prop.trailStatus, prop.segmentName, prop.segment, prop.segmentDistance, prop.segmentGrade, prop.segmentNameHref); var sl = feature.geometry.coordinates[0][1]; var sr = feature.geometry.coordinates[0][0]; var el = feature.geometry.coordinates[feature.geometry.coordinates.length - 1][1]; var er = feature.geometry.coordinates[feature.geometry.coordinates.length - 1][0]; if (sl != '' && sr != '' && el != '' && er != '') { var sm = new L.marker(L.latLng(sl, sr), {icon: startIcon}); var em = new L.marker(L.latLng(el, er), {icon: endIcon}); } var layerGroup = L.featureGroup(); layerGroup.addLayer(sm); layerGroup.addLayer(em); sm.bindPopup(desc); em.bindPopup(desc); var popupLayer = L.popup().setLatLng(L.latLng(sl, sr)).setContent(desc); layerGroup.bindPopup(popupLayer).openPopup(); layerGroup.addLayer(layer); segments.push(layerGroup); layer.on("click", function(e) { var desc = getDescription(prop.type, prop.trailName, prop.trailId, prop.trailStatus, prop.segmentName, prop.segment, prop.segmentDistance, prop.segmentGrade, prop.segmentNameHref); if (desc) { var popup = L.popup() .setLatLng(e.latlng) .setContent(desc) .openOn(map_leaflet); } }); //controlLayers.addOverlay(layerGroup, 'Segmenty na trase - ' + feature.properties.segmentName); } var displaySeg = 0; function showSegment(seg) { segments[displaySeg].remove(map_leaflet); segments[displaySeg]._popup.remove(map_leaflet); segments[seg].addTo(map_leaflet); segments[seg]._popup.addTo(map_leaflet); displaySeg = seg; var bounds = segments[seg].getBounds(); map_leaflet.fitBounds(bounds, {padding: [30, 30]}); $.scrollTo( '#map_leaflet', 800, {offset: -120} ); } } // geo location through leaflet plugin var lc = L.control.locate({ drawCircle: false, follow: true, markerStyle: {color: '#000000',fillColor: '#ee7711',fillOpacity: 0.7,weight: 4,opacity: 0.7,radius: 7}, strings: { title: "Ukáž mi, kde sa nachádzam", // title of the locate control popup: "Si v okolí {distance} {unit} od tohto bodu", // text to appear if user clicks on circle outsideMapBoundsMsg: "Nachádzaš sa mimo oblasti tejto mapy" // default message for onLocationOutsideMapBounds } }).addTo(map_leaflet); map_leaflet.on('startfollowing', function() { map_leaflet.on('dragstart', lc.stopFollowing); }).on('stopfollowing', function() { map_leaflet.off('dragstart', lc.stopFollowing); }); $(document).ready(function() { map_leaflet.on('baselayerchange', function(){ var id = event.currentTarget.layerId; var layer = this._layers[id]; $.ajax({ type: "POST", url: "/ajax.php?u=Cyklotrasy&f=saveDefaultMap&a=" + layer.options.name, }); }) }); $('#elevationDiv').html(''); $('.elevation').appendTo('#elevationDiv'); //gallery carousel multiple items - hack $(function(){ // init arrows $('.gallery-carousel').each(function(){ var itemsPerSlide = 3; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); if ($('.carousel-item', this).length <= itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); } }); $('.gallery-carousel').on('slide.bs.carousel', function (e) { if (!window.matchMedia("(min-width: 768px)").matches) return; // default behaviour on mobile /* CC 2.0 License Iatek LLC 2018 - Attribution required */ var $e = $(e.relatedTarget); var idx = $e.index(); var itemsPerSlide = 3; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); var totalItems = $('.carousel-item', this).length; if ($(this).data('ended')==true && e.direction=='left'){ return false; } if (e.to===0){ $('.carousel-control-prev', this).addClass('disabled'); }else{ $('.carousel-control-prev', this).removeClass('disabled'); } if (e.to>=totalItems - itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); $(this).data('ended', true); }else{ $('.carousel-control-next', this).removeClass('disabled'); $(this).data('ended', false); } }); }); function initEkkoLightbox(){ $('[data-toggle="lightbox"]:not(.lightbox-ready)').on('click', function(event) { event.preventDefault(); event.stopImmediatePropagation(); //$(this).removeAttr('href').attr('role', 'button'); var $this = $(this); $this.ekkoLightbox({ alwaysShowClose: true, wrapping: false, //Whether the gallery should loop or not leftArrow: '', rightArrow: '', onNavigate: function(){ $('.ekko-lightbox').removeClass('zoomed'); }, onShow: function(){ if (!$this.hasClass('no-zoom')) { $('.ekko-lightbox .modal-header').prepend('zoom_inzoom_out'); } $('.ekko-lightbox .ekko-lightbox-item').bind('touchstart touchend touchup swipeLeft swipeRight', function(event) { if ($('.ekko-lightbox').hasClass('zoomed') || (window.visualViewport && window.visualViewport.scale > 1.02)){ event.stopPropagation(); } }); $('.ekko-lightbox .ekko-lightbox-nav-overlay').bind('touchstart touchend touchup swipeLeft swipeRight', function(event) { if ($('.ekko-lightbox').hasClass('pinch-zoomed') || (window.visualViewport && window.visualViewport.scale > 1.02)){ $('.ekko-lightbox').addClass('pinch-zoomed'); event.stopPropagation(); } if (window.visualViewport && window.visualViewport.scale <= 1.02){ setTimeout(function(){ if (window.visualViewport && window.visualViewport.scale <= 1.02){ //check again after timeout $('.ekko-lightbox').removeClass('pinch-zoomed'); } },100); } }); if (window.matchMedia("(min-width: 768px)").matches) { $('body').addClass('ekko-modal-open'); } onPopupOpened('ekko-lightbox'); }, onShown: function(){ }, onHidden: function(){ $('body').removeClass('ekko-modal-open'); onPopupClosed(); } }); return false; }); $('[data-toggle="lightbox"]').addClass('lightbox-ready'); } $(function(){ $('.show-alt-in-lightbox[data-toggle="lightbox"]').each(function(){ $(this).data('footer', $(this).find('img').attr('title')); }); $('body').on('click', '.ekko-lightbox-zoom', function(){ $('.ekko-lightbox').toggleClass('zoomed'); }); $('body').on('click', '.ekko-lightbox.zoomed .ekko-lightbox-item.show ', function(){ $('.ekko-lightbox').removeClass('zoomed'); }) initEkkoLightbox(); $(document).ajaxComplete(function(event, xhr, settings) { //if (xhr.responseText.indexOf('lightbox') >= 0){ initEkkoLightbox(); //} }); }); function favoriteRide(ride) { $.ajax({ type: "POST", data: {id : ride, ride : 1}, dataType: "json", url: "/ajax.php?u=cyklotrasy&f=toggleFavourite", success: function(data) { if (data.added === 1) { $('.btn-wishlist.show-add-to-wishlist').hide(); $('.btn-wishlist.show-remove-from-wishlist').show(); //potrebuje dllllho zobrazit showMessageBar('#favoriteSuccess', 60*1000); } else { $('.btn-wishlist.show-remove-from-wishlist').hide(); $('.btn-wishlist.show-add-to-wishlist').show(); showMessageBar('#favoriteSuccessRemove'); } } }); } $(document).ready(function(){ //mobile map popup $('.close-map-widget').click(function(){ $('#map-widget').removeClass('show'); return false; }); $('.show-map-widget').click(function(){ $('#map-widget').addClass('show'); return false; }); $('a[href="#comments"]').on('click', function(e){ e.preventDefault(); commentsScroll('#comments'); return false; }); if ($('#segmenty').length){ if (location.hash.indexOf('#segmenty')>=0){ if (window.innerWidth>=768){ $.scrollTo( '#segmenty', 800, {offset: -100} ); } $('#segmenty-expander').prop('checked', true); } var $pagination = $('#segmentyList table .pagination-wrap'); $pagination.appendTo('#segmentyList'); $('#segmentyList .row-pagination').remove(); } }); function showPhotoOnMap() { if (typeof L !== "undefined"){ var photos = [{"lat":"48.894588333333","lng":"15.816111666667","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-0_62b2f7153b4f1.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-0_62b2f7153b4f1.jpg"},{"lat":"48.894591666667","lng":"15.815986666667","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-1_62b2f7184c7ee.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-1_62b2f7184c7ee.jpg"},{"lat":"48.783641666667","lng":"16.2007","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-10_62b2f73432262.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-10_62b2f73432262.jpg"},{"lat":"48.807953333333","lng":"16.636046666667","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-11_62b2f736dd344.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-11_62b2f736dd344.jpg"},{"lat":"48.806961666667","lng":"16.638163333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-12_62b2f73a1cfc1.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-12_62b2f73a1cfc1.jpg"},{"lat":"48.807021666667","lng":"16.63805","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-13_62b2f73d43a10.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-13_62b2f73d43a10.jpg"},{"lat":"48.806983333333","lng":"16.6382","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-14_62b2f7406e169.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-14_62b2f7406e169.jpg"},{"lat":"48.80552","lng":"16.636738333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-15_62b2f743a286a.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-15_62b2f743a286a.jpg"},{"lat":"48.80542","lng":"16.635961666667","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-16_62b2f746c8821.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-16_62b2f746c8821.jpg"},{"lat":"48.75177","lng":"16.865228333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-17_62b2f74b01499.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-17_62b2f74b01499.jpg"},{"lat":"48.687146666667","lng":"16.989338333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-18_62b2f74da617c.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-18_62b2f74da617c.jpg"},{"lat":"48.725155","lng":"17.157738833333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-19_62b2f7504d502.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-19_62b2f7504d502.jpg"},{"lat":"48.894505","lng":"15.81582","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-2_62b2f71b711bf.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-2_62b2f71b711bf.jpg"},{"lat":"48.909796666667","lng":"15.819786666667","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-3_62b2f71e8bd46.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-3_62b2f71e8bd46.jpg"},{"lat":"48.912711666667","lng":"15.818533333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-4_62b2f7221ee7b.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-4_62b2f7221ee7b.jpg"},{"lat":"48.905471666667","lng":"15.817911666667","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-5_62b2f7256b0c8.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-5_62b2f7256b0c8.jpg"},{"lat":"48.89537","lng":"15.81867","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-6_62b2f72892f2b.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-6_62b2f72892f2b.jpg"},{"lat":"48.853836666667","lng":"16.0434695","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-7_62b2f72bd3242.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-7_62b2f72bd3242.jpg"},{"lat":"48.85382","lng":"16.04345","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-8_62b2f72f1148f.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-8_62b2f72f1148f.jpg"},{"lat":"48.783078333333","lng":"16.200486666667","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-9_62b2f731ac8bd.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1004294-9_62b2f731ac8bd.jpg"}] var photoLayer = L.photo.cluster().on("click", function(evt) { var photo = evt.layer.photo; var template = ""; evt.layer.bindPopup(L.Util.template(template, photo), { className: "leafletresize", minWidth: 100, }).openPopup(); }); var photoOnMapLayer = photoLayer.add(photos); map_leaflet.addLayer(photoOnMapLayer); controlLayers.addOverlay(photoOnMapLayer, "Fotky na mape") } } $(function() { showPhotoOnMap(); }); var loadedComments_comments = false; function loadComments_comments(){ } // Comments $(function(){ $('.comment-form, .review-form', '#comments').on('submit', function(){ $(this).attr('autocomplete',"off"); // prevent prepopulating fields on backbtn click if (history.state && history.state.popupOpened === 'mobile-expander'){ $('.mobile-expander-content', '#comments').addClass('opened'); history.back(); } }); $('select[name=sort], select[name=filter]', '#comments').on('change', function() { let inputName = $(this).attr('name'); let sort = $('select[name=sort]', '#comments').val(); let filter = $('select[name=filter]', '#comments').length ? $('select[name=filter]', '#comments ').val() : ''; var url = "/ajax.php?m=komentare&f=loadCommentsWidget&a=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTEwMDQyOTQmaXRlbU5hbWU9ViVDMyVCRGphemQrJUM0JThELisxMDA0Mjk0JmNvbW1lbnRUeXBlPWNvbW1lbnQmYXV0aG9yVXNlcklkPTgxMzM2JndpZGdldElkPWNvbW1lbnRzJmFsbG93SW5zZXJ0PTEmYWxsb3dSZXBseT0xJnJldHVyblVybD1odHRwcyUzQSUyRiUyRnd3dy5tdGhpa2VyLnNrJTJGYWt0aXZpdHklMkYxMDA0Mjk0JTJGYmljeWtlbC0yMS0wNi0yMi10b3VyLWN6Lmh0bWwlM0ZvZCUzRDMlMjZyaWRlX2lkJTNEMTAwNDI5NCZwYXJzZWRVcmwlNUJzY2hlbWUlNUQ9aHR0cHMmcGFyc2VkVXJsJTVCaG9zdCU1RD13d3cubXRoaWtlci5zayZwYXJzZWRVcmwlNUJwYXRoJTVEPSUyRmFrdGl2aXR5JTJGMTAwNDI5NCUyRmJpY3lrZWwtMjEtMDYtMjItdG91ci1jei5odG1sJnBhcnNlZFVybCU1QnF1ZXJ5JTVEPW9kJTNEMyUyNnJpZGVfaWQlM0QxMDA0Mjk0JmluY2x1ZGVDb21tZW50SWQ9MA|" + sort + "|" + filter; if (inputName === 'filter') { if (parseInt(filter) === 3 && !customScoreDone) { loadScoreSettingsModal(); return false; } } $('#comments .comments-body-content').addClass('show-loading'); $.ajax({ url: url, success: function(data) { $('#comments .comments-body-content').html(data).removeClass('show-loading'); } }); }); }); // Comments function toggleHiddenComment(comment_id) { $("#commentBox" + comment_id + " .comment-hidden").remove(); $("#commentBox" + comment_id + " .comment-content").show(); } function closeScoreFilterBanner() { $('#commentsScoreFilterBanner').fadeOut(150); $.post('/ajax.php?m=komentare&f=closeScoreFilterBanner'); } function commentsScroll(toElement, offset, noAnimation){ // edit/reply from feed link if ((typeof toElement === 'string' || toElement instanceof String) && toElement.indexOf('#commentBox') >= 0) { let commentId = parseInt(toElement.replace('#commentBox', '')); if (!isNaN(commentId) && commentId) { if (parseInt(localStorage.getItem('replyToCommentId')) === commentId) { localStorage.removeItem('replyToCommentId'); if ($('.comment-reply-btn', toElement).length) { history.replaceState(null, null, ' '); setTimeout(function(){ $('.comment-reply-btn', toElement).first().click(); }, 0); return; } } else if(parseInt(localStorage.getItem('editCommentId')) === commentId) { localStorage.removeItem('editCommentId'); if ( $('.comment-edit-btn', toElement).length) { history.replaceState(null, null, ' '); $('.comment-edit-btn', toElement).first().click(); return; } } } } if (!offset) offset = 0; if (!window.matchMedia("(min-width: 768px)").matches && true) { if ($(toElement).length) { $(toElement).closest('.comments-body-content').scrollTo( toElement, 800, {offset: -10 + offset} ); } } else { if ($(toElement).length){ var headerhHeight = 120 + ($('#shop-info-bar').length ? $('#shop-info-bar').outerHeight() : 0); if (!window.matchMedia("(min-width: 768px)").matches){ headerhHeight = $('#header').outerHeight() + $('#shop-detail-nav').outerHeight() + 20; } if (noAnimation){ setTimeout(function(){ $(window).scrollTop($(toElement).offset().top - headerhHeight + offset); }, 100); var dontScrollAgain = false; setTimeout(function(){ dontScrollAgain = true; }, 3000); $(window).on('load', function(){ if (!dontScrollAgain) $(window).scrollTop($(toElement).offset().top - headerhHeight + offset); }); } else { $.scrollTo( toElement, 800, {offset: -headerhHeight + offset} ); } } } } var customScoreDone = false; function loadMoreComments(btn) { let $btn = $(btn); if ($btn.find('.spinner-border:visible').length) { return false; } let nextPage = parseInt($btn.data('page')) + 1; let perPage = parseInt($btn.data('per-page')); $btn.find('.spinner-border').css("display", "inline-block"); $btnWrap = $btn.closest('.comment-load-more-wrap'); $.get("/ajax.php?m=komentare&f=loadMoreComments&a=" + $btn.data('params') + "|" + $btn.data('sort') + '|' + $btn.data('score') + '|' + nextPage, "", function (data) { $data = $('
' + data + '
'); $btnWrap.before($data.html()); $btn.find('.spinner-border').css("display", "none"); $btn.data('page', nextPage); if ($data.find('.comment:not(.comment-reply)').length < perPage) { $btnWrap.hide(); } }); } function scrollAndHighlightComment(commentBoxId, noAnimation){ if ($(commentBoxId).length){ let commentEl = $(commentBoxId); $('.comments .highlighted-animated').removeClass('highlighted-animated'); setTimeout(function(){ commentEl.addClass('highlighted-animated'); commentsScroll( commentBoxId, null, noAnimation); }, 10); } } function resetCommentForm($parent) { $('.comment-form-title-insert', $parent).show(); $('.comment-form-title-reply', $parent).hide(); $("[name=parent]", $parent).val(''); $("textarea", $parent).val(''); let widgetId = $parent.attr('id'); let $legend = $(".comment-form legend", $parent); if ($legend.data('text-original')) { $legend.html($legend.data('text-original')); } let $btn = $(".comment-form button.btn-comment-submit", $parent); if ($btn.data('text-original')) { $btn.html($btn.data('text-original')); } if (typeof window['commentFileUploader' + widgetId] !== 'undefined') { window['commentFileUploader' + widgetId].resetFiles(); } } $(function(){ var scrollToComment = false; function handleCommentBoxHash() { if (location.hash.indexOf('commentBox')>=0 || location.hash.indexOf('#comments-')>=0){ var hash = location.hash; var widgetId = '#comments'; hashParts = hash.split('/'); if (hashParts.length > 1) { widgetId = hashParts[0]; hash = '#' + hashParts[1]; // location.hash = #reviews/commentBox224814 } if (!window.matchMedia("(min-width: 768px)").matches){ var commentId = hash.replace('#commentBox', '').replace('#comments-',''); $('#commentBox' + commentId).parents('.mobile-expander').find('.mobile-expander-check').prop('checked', 'checked').trigger('change'); } if (hash.indexOf('#comments-')>=0 || hash.indexOf('#commentBox')>=0){ // from foreign url - highlight comment hash = hash.replace('#comments-','#commentBox'); scrollAndHighlightComment(hash, true); history.replaceState(null, null, widgetId); scrollToComment = true; } else { commentsScroll( hash, null, true ); //remove hash history.replaceState(null, null, ' '); scrollToComment = false; } } else { scrollToComment = false; } } handleCommentBoxHash(); $(window).on('hashchange', function() { handleCommentBoxHash(); }); if (location.hash.indexOf('#form-')>=0){ var hash = location.hash; commentsScroll( hash, null, true ); //remove hash history.replaceState(null, null, ' '); } if (location.hash == '#questions' || location.hash == '#reviews' || location.hash == '#comments'){ var widgetId = location.hash; if (!$(widgetId).length) widgetId = '#questions'; if ($(widgetId).length && !scrollToComment){ if (!window.matchMedia("(min-width: 768px)").matches){ $(widgetId + '-expander').prop('checked', 'checked').trigger('change'); } if ($('.comment-unread', widgetId).length){ commentsScroll('#'+$('.comment-unread', widgetId).first().attr('id'), null, true); } else { commentsScroll(widgetId, null, true); } } } $('.comments').on('click', '.btn-comment-show-insert-popup', function(){ var $parent = $(this).closest('.comments'); resetCommentForm($parent); }); }); $(function(){ $('textarea', '.comments').on('input', function(){ if ($(this).val().length){ $('.comment-form .btn').addClass('mobile-active'); }else{ $('.comment-form .btn').removeClass('mobile-active'); } $(this).removeClass('is-invalid'); }); function setCommentTextareaPlaceholder(){ if (window.matchMedia("(min-width: 768px)").matches){ $('textarea', '.comments').attr('placeholder', $('textarea', '.comments').data('placeholder-desktop')); }else{ $('textarea', '.comments').attr('placeholder', $('textarea', '.comments').data('placeholder-mobile')); } } setCommentTextareaPlaceholder(); $(window).resize(function(){ setCommentTextareaPlaceholder(); }); }); $(function(){ $('.comment-form button[type=submit]').attr('disabled', 'disabled'); $('.comment-form textarea').click(function(){ $('#loginModal').modal('show'); }); }); // #TODO function hideForumPosts() { $('.forum_post_hidden').each(function(){ target = $(this).data('target'); forum_post = $(this).parent('.post_tools').siblings('.post_message'); $(this).show().insertAfter(forum_post); forum_post.hide(); forum_post.parent('.post_right').parent('.post_container').addClass('hiddenForumPost'); }); } $(function(){ hideForumPosts(); }); // #TODO function hideForumPost(postId) { el = $('#' + postId); message = el.siblings('.post_message'); el.remove(); message.show(); message.parent('.post_right').parent('.post_container').removeClass('hiddenForumPost'); } function close_what_we_can_do(id) { $('#we_can_do_better_' + id).hide(); return false; } function send_what_we_can_do(id, id_user) { var $el = $('#we_can_do_better_' + id); $el.addClass('show-loading'); var selectedOption = $('input:radio[name=input_we_can_do_input_' + id + ']:checked').val() var text = $('#input_we_can_do_textarea_' + id).val(); $.get('/ajax.php?u=misc&f=userVoteDownComment&a=' + selectedOption + '|' + id_user + '|' + text + '|' + id , function(data){ close_what_we_can_do(id); $el.removeClass('show-loading'); showMessage('Tvoja spätná väzba bola úspešne odoslaná.'); } ); } $(function() { $('body').on('click', '.user_votes a.user_votes_link', function(e){ if ($(this).hasClass('inactive')) return false; var fn = $(this).data('rel'); var hash = $(this).attr('hash'); var contentId = $(this).parent().attr('contentid'); var contentType = $(this).parent().attr('contenttype'); var contentUserId = $(this).parent().attr('contentuserid'); var parent = $(this).parent().parent(); var voteTop = 0; if($(this).closest(".metadata-line").length>0) { voteTop = 1; } $(this).tooltip('hide'); $.get('/ajax.php?u=misc&f=userContentVotesAjax&a=' + contentId + '|' + contentType + '|' + contentUserId + '|' + fn + '|' + hash + '|0|1', function(data){ if (data.startsWith('ok')) { data = data.substr(2); } $('.user_votes' + contentType + contentId).replaceWith(data); if (contentType === 'article') { if (fn === 'voteDown') { var position = parent.offset(); var topclick = position.top + 15 - parent.closest('.container.position-relative').offset().top; var leftclick = position.left + 20 - parent.closest('.container.position-relative').offset().left; $('#we_can_do_better_' + contentId).css({top: topclick, left: leftclick}); $('#we_can_do_better_' + contentId).show(); } else { $('#we_can_do_better_' + contentId).hide(); } } } ); return false; }); }); if (!showRideFormModal) { function showRideFormModal(id, asTemplate){ var $rideFormModal = $('#rideFormModal'); if (typeof id === 'undefined') id = ''; asTemplate = asTemplate ? 1 : 0; $.ajax({ url: '/ajax.php?m=Vyjazdy&f=ajaxFormModal&a=' + id + '|0' + '|' + asTemplate, success: function(data){ $rideFormModal.find('.modal-body').html(data); if (asTemplate){ $rideFormModal.find('.ride-form-edit, .ride-form-new').hide(); $rideFormModal.find('.ride-form-duplicate').show(); } else { $rideFormModal.find('.ride-form-duplicate').hide(); $rideFormModal.find('.ride-form-'+(id ? 'new' : 'edit')).hide(); $rideFormModal.find('.ride-form-'+(id ? 'edit' : 'new')).show(); } $rideFormModal.modal({ backdrop: 'static' }); }, error: function(data){ showMessage(data.responseText, 'error', data.responseText.indexOf('= 0 ? 10000 : 3500); } }); return false; } } var emailConsentModalActiveEl; var emailConsentModalActiveSection = false; var emailConsentModalAgreed = false; function emailConsentModal(el, section){ var $el = $(el); if ($el.is(':checked') || !$el.is("input")){ // checked checkbox, or button/link emailConsentModalActiveEl = $(el); var $modal = $('#modalEmailConsent'); emailConsentModalActiveSection = section; if (section){ $('[data-section="general"]', $modal).hide(); $('[data-section="newsletter"]', $modal).hide(); $('[data-section="shop"]', $modal).hide(); $('[data-section="sale"]', $modal).hide(); $('[data-section="' + section + '"]', $modal).show(); } else { $('.mec-title').hide(); $('[data-section="general"]', $modal).show(); } emailConsentModalSubOptions(); emailConsentModalAgreed = false; $('#modalEmailConsent').modal('show'); } } function emailConsentModalSubOptions(){ $('.sub-options-emails').each(function() { var $subOptions = $(this); if ($subOptions.parent().find('.custom-switch input:checked, .custom-checkbox input:checked').length){ $subOptions.show(); if (!$subOptions.find('input:checked').length){ $subOptions.find('input').first().prop('checked', true); } } else { $subOptions.hide(); $subOptions.find('input').prop('checked', false); } }); } function emailConsentModalOnAgreed(){ var $modal = $('#modalEmailConsent'); emailConsentModalAgreed = true; var sectionWrap = emailConsentModalActiveSection ? '[data-section="' + emailConsentModalActiveSection + '"] ' : ''; var inputs = ''; $(sectionWrap + 'input[type=hidden], input:checked', $modal).each(function(){ var $this = $(this); inputs = inputs + ''; }); emailConsentModalActiveEl.prev('.mec-inputs').remove(); $('' + inputs + '').insertBefore(emailConsentModalActiveEl); $('#modalEmailConsent').modal('hide'); } $(function() { $('input[name="agreed_emails"]').on('change', function(){ emailConsentModal(this); }); emailConsentModalSubOptions(); $('#mec_user_newsletter_agreed, #user_newsletter_agreed').on('change', emailConsentModalSubOptions ); $('input:radio, input:checkbox','#modalEmailConsent').on('change', function(){ $modal = $('#modalEmailConsent'); $('.modal-footer .btn', $modal).prop('disabled', !$('input:checked:visible', $modal).length); }); $('#modalEmailConsent').on('hidden.bs.modal', function (e) { $modal = $(this); if (!emailConsentModalAgreed){ if (emailConsentModalActiveEl.val() === 'weekly'){ $('input[value=monthly]', $modal).prop('checked', false); } else if (emailConsentModalActiveEl.val() === 'monthly'){ $('input[value=weekly]', $modal).prop('checked', false); } else { emailConsentModalActiveEl.prop('checked', false); } emailConsentModalActiveEl.prev('.mec-inputs').remove(); } emailConsentModalActiveSection = false; emailConsentModalSubOptions(); if ($('#registrationModal.modal').hasClass('show')) { setTimeout(function(){ $('body').addClass('modal-open'); // registration modal is still opened }, 20); } }); }); $(function(){ $(".js-reject-cookies").attr("role", "button"); $(".js-reject-cookies").click(function(e){ e.preventDefault(); $.ajax({type: "POST",url: "/account/cookie-consent",data: {functional:0,analytical:0,commercial:0} }); $("#biscuitModal").fadeOut(250); return false; }); $(".biscuit-close").click(function(){ $.ajax({type: "POST",url: "/account/cookie-consent",data: {necessary:1,functional:1,analytical:1,commercial:1} }); $("#biscuitModal").fadeOut(250); $(".biscuit-checkboxes .custom-control-input").attr("checked", true); updateGoogleAnalyticsConsent(); updateBingConsent(); sendGoogleAnalyticsPageview(); return false; }); $(".biscuit-settings").click(function(){ $(this).addClass("loading-simple"); $.ajax({type: "POST",url: "/account/cookie-consent",data: {functional:0,analytical:0,commercial:0} }).always(function(){ window.location = "https://www.mthiker.sk/cookies"; }); }); }); -->