favorite comment 0
thumb_up0thumb_down

directions_bikeŠánov Ride

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ť
69,9 km
schedule Čas
02:13:49
landscape Nastúpané
807 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 31,3 km/h 71,5 km/h
Výkon 178 W 637 W
Kadencia 88 rpm -
Tepová frekvencia 119 bpm 151 bpm
Energetický výdaj 1 613 kcal

cloudPodmienky

Priemerná teplota 21 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_run Afternoon Trail Run

trending_up 7,2 km
schedule 00:58:22
landscape 311 m
thumb_up0thumb_down

directions_run Morning Run

trending_up 7,9 km
schedule 00:41:28
landscape 8 m
thumb_up0thumb_down

rowing Swim - Morning Swim

trending_up 1,6 km
schedule 00:42:35
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 Doln\u00e1 S\u00fa\u010da","segmentDistance":"D\u013a\u017eka: 4.28 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1 %<\/b>","segmentNameHref":"skalka-%3E-dolna-suca"},"geometry":{"type":"LineString","coordinates":[["18.070624","48.926757",237.4],["18.070624","48.926757",237.4],["18.067099","48.927993",238.4],["18.065454","48.928708",239.4],["18.064044","48.930366",244.4],["18.063561","48.930843",244.8],["18.059478","48.93225",247.4],["18.057328","48.933326",250],["18.054629","48.935237",249.4],["18.053397","48.935844",250.4],["18.05302","48.936199",250.6],["18.05124","48.93839",252.2],["18.049874","48.939475",253],["18.046541","48.942436",256],["18.045679","48.944003",256.8],["18.045078","48.944828",258],["18.041538","48.947987",261.4],["18.040829","48.948459",262],["18.038366","48.94943",263.4],["18.035505","48.951635",267.8],["18.03434","48.952651",270.2],["18.033935","48.953438",273.6]]}},{"type":"Feature","properties":{"type":99,"segment":"204117","segmentName":"Od Hrabovky do Dolnej","segmentDistance":"D\u013a\u017eka: 1.89 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.3 %<\/b>","segmentNameHref":"od-hrabovky-do-dolnej"},"geometry":{"type":"LineString","coordinates":[["18.070624","48.926757",237.4],["18.070624","48.926757",237.4],["18.067099","48.927993",238.4],["18.065454","48.928708",239.4],["18.064044","48.930366",244.4],["18.063561","48.930843",244.8],["18.059478","48.93225",247.4],["18.057328","48.933326",250],["18.054629","48.935237",249.4],["18.053397","48.935844",250.4],["18.05302","48.936199",250.6]]}},{"type":"Feature","properties":{"type":99,"segment":"204245","segmentName":"Z Kamienky do Hornej","segmentDistance":"D\u013a\u017eka: 3.30 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.9 %<\/b>","segmentNameHref":"z-kamienky-do-hornej"},"geometry":{"type":"LineString","coordinates":[["18.070624","48.926757",237.4],["18.070624","48.926757",237.4],["18.067099","48.927993",238.4],["18.065454","48.928708",239.4],["18.064044","48.930366",244.4],["18.063561","48.930843",244.8],["18.059478","48.93225",247.4],["18.057328","48.933326",250],["18.054629","48.935237",249.4],["18.053397","48.935844",250.4],["18.05302","48.936199",250.6],["18.05124","48.93839",252.2],["18.049874","48.939475",253],["18.046541","48.942436",256],["18.045679","48.944003",256.8],["18.045078","48.944828",258],["18.041538","48.947987",261.4],["18.040829","48.948459",262]]}},{"type":"Feature","properties":{"type":99,"segment":"252008","segmentName":"Horn\u00e1 segment po zast\u00e1vku","segmentDistance":"D\u013a\u017eka: 1.23 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.5 %<\/b>","segmentNameHref":"horna-segment-po-zastavku"},"geometry":{"type":"LineString","coordinates":[["18.070624","48.926757",237.4],["18.070624","48.926757",237.4],["18.067099","48.927993",238.4],["18.065454","48.928708",239.4],["18.064044","48.930366",244.4],["18.063561","48.930843",244.8],["18.059478","48.93225",247.4],["18.057328","48.933326",250]]}},{"type":"Feature","properties":{"type":99,"segment":"210749","segmentName":"Od Hornej po Bzov\u00edk","segmentDistance":"D\u013a\u017eka: 4.41 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.8 %<\/b>","segmentNameHref":"od-hornej-po-bzovik"},"geometry":{"type":"LineString","coordinates":[["18.070624","48.926757",237.4],["18.070624","48.926757",237.4],["18.067099","48.927993",238.4],["18.065454","48.928708",239.4],["18.064044","48.930366",244.4],["18.063561","48.930843",244.8],["18.059478","48.93225",247.4],["18.057328","48.933326",250],["18.054629","48.935237",249.4],["18.053397","48.935844",250.4],["18.05302","48.936199",250.6],["18.05124","48.93839",252.2],["18.049874","48.939475",253],["18.046541","48.942436",256],["18.045679","48.944003",256.8],["18.045078","48.944828",258],["18.041538","48.947987",261.4],["18.040829","48.948459",262],["18.038366","48.94943",263.4],["18.035505","48.951635",267.8],["18.03434","48.952651",270.2],["18.033935","48.953438",273.6],["18.033091","48.955135",278]]}},{"type":"Feature","properties":{"type":99,"segment":"246867","segmentName":"Trn\u00e1vka oto\u010d","segmentDistance":"D\u013a\u017eka: 1.47 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.7 %<\/b>","segmentNameHref":"trnavka-otoc"},"geometry":{"type":"LineString","coordinates":[["18.070624","48.926757",237.4],["18.070624","48.926757",237.4],["18.067099","48.927993",238.4],["18.065454","48.928708",239.4],["18.064044","48.930366",244.4],["18.063561","48.930843",244.8],["18.059478","48.93225",247.4],["18.057328","48.933326",250]]}},{"type":"Feature","properties":{"type":99,"segment":"191218","segmentName":"Trio vlnkov\u00e9","segmentDistance":"D\u013a\u017eka: 5.35 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.6 %<\/b>","segmentNameHref":"trio-vlnkove"},"geometry":{"type":"LineString","coordinates":[["18.070624","48.926757",237.4],["18.070624","48.926757",237.4],["18.067099","48.927993",238.4],["18.065454","48.928708",239.4],["18.064044","48.930366",244.4],["18.063561","48.930843",244.8],["18.059478","48.93225",247.4],["18.057328","48.933326",250],["18.054629","48.935237",249.4],["18.053397","48.935844",250.4],["18.05302","48.936199",250.6],["18.05124","48.93839",252.2],["18.049874","48.939475",253],["18.046541","48.942436",256],["18.045679","48.944003",256.8],["18.045078","48.944828",258],["18.041538","48.947987",261.4],["18.040829","48.948459",262],["18.038366","48.94943",263.4],["18.035505","48.951635",267.8],["18.03434","48.952651",270.2],["18.033935","48.953438",273.6],["18.033091","48.955135",278],["18.031774","48.957201",277.8],["18.031571","48.957774",278],["18.030841","48.958945",278],["18.030368","48.960684",279.4],["18.029972","48.961655",280.8],["18.029695","48.962649",283.2],["18.029307","48.96315",285.2],["18.028351","48.963694",288.6],["18.026937","48.964237",295],["18.026013","48.964644",298.4]]}},{"type":"Feature","properties":{"type":99,"segment":"8012","segmentName":"Z Dolnej do Hornej","segmentDistance":"D\u013a\u017eka: 615.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.2 %<\/b>","segmentNameHref":"z-dolnej-do-hornej"},"geometry":{"type":"LineString","coordinates":[["18.028351","48.963694",288.6],["18.028351","48.963694",288.6],["18.026937","48.964237",295],["18.026013","48.964644",298.4],["18.023885","48.965831",308.4]]}},{"type":"Feature","properties":{"type":99,"segment":"104317","segmentName":"CY 4. okruh \u0161print","segmentDistance":"D\u013a\u017eka: 468.10 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4 %<\/b>","segmentNameHref":"cy-4-okruh-sprint"},"geometry":{"type":"LineString","coordinates":[["17.954672","48.990736",364],["17.954672","48.990736",364],["17.952889","48.991467",368.4],["17.951369","48.992234",376],["17.949411","48.993127",384.4]]}},{"type":"Feature","properties":{"type":99,"segment":"10864","segmentName":"Segment","segmentDistance":"D\u013a\u017eka: 2.67 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.5 %<\/b>","segmentNameHref":"segment"},"geometry":{"type":"LineString","coordinates":[["17.944886","48.999762",407],["17.944886","48.999762",407],["17.94469","49.000987",406.4],["17.944269","49.001744",405.6],["17.943563","49.002452",407.2],["17.942309","49.003109",406.8],["17.942021","49.003409",407.2],["17.942069","49.004266",410],["17.942125","49.004978",413.6],["17.942356","49.005404",417.4],["17.942616","49.005724",419.6],["17.942734","49.006068",422],["17.942825","49.006442",423],["17.943061","49.006778",423.8],["17.943125","49.007056",424.2],["17.943235","49.00749",425],["17.943175","49.007714",426.4],["17.943257","49.007929",427.8],["17.943204","49.008177",429.4],["17.943378","49.008522",430.4],["17.943942","49.009147",433.8],["17.944601","49.009816",438.8],["17.945033","49.010111",443.6],["17.945992","49.010327",449.4],["17.946444","49.010526",451.2],["17.946761","49.010715",452.4],["17.947119","49.010828",453.8],["17.947713","49.011059",455.8],["17.948372","49.01124",460],["17.948957","49.011388",462.2],["17.949255","49.011482",463.4],["17.949673","49.011716",465.6],["17.950151","49.011924",468.8],["17.950671","49.012232",471.8],["17.951038","49.012449",474.2],["17.951322","49.01257",476.6],["17.951709","49.012735",479],["17.952234","49.01283",480.8],["17.952676","49.012823",482.6],["17.953225","49.012957",486.6],["17.953313","49.013304",490.6],["17.953526","49.013563",494.2],["17.953629","49.013767",496.4],["17.953676","49.013942",499],["17.953692","49.014157",501.6],["17.953718","49.014347",504.2],["17.953996","49.014626",507.4],["17.954253","49.014977",510],["17.954531","49.015232",511.8],["17.954783","49.015562",513.8],["17.955041","49.015979",517],["17.955174","49.016129",518.4],["17.955543","49.016621",523.8],["17.955911","49.016987",525.8],["17.956561","49.017449",528.6],["17.956873","49.017676",529.8],["17.957159","49.017847",531.2],["17.957416","49.017981",532.6],["17.957664","49.018225",535.6],["17.957701","49.018418",537.8]]}},{"type":"Feature","properties":{"type":99,"segment":"17920","segmentName":"Z Trn\u00e1vky na h\u0159eben","segmentDistance":"D\u013a\u017eka: 4.34 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.4 %<\/b>","segmentNameHref":"z-trnavky-na-hreben"},"geometry":{"type":"LineString","coordinates":[["17.942021","49.003409",407.2],["17.942021","49.003409",407.2],["17.942069","49.004266",410],["17.942125","49.004978",413.6],["17.942356","49.005404",417.4],["17.942616","49.005724",419.6],["17.942734","49.006068",422],["17.942825","49.006442",423],["17.943061","49.006778",423.8],["17.943125","49.007056",424.2],["17.943235","49.00749",425],["17.943175","49.007714",426.4],["17.943257","49.007929",427.8],["17.943204","49.008177",429.4],["17.943378","49.008522",430.4],["17.943942","49.009147",433.8],["17.944601","49.009816",438.8],["17.945033","49.010111",443.6],["17.945992","49.010327",449.4],["17.946444","49.010526",451.2],["17.946761","49.010715",452.4],["17.947119","49.010828",453.8],["17.947713","49.011059",455.8],["17.948372","49.01124",460],["17.948957","49.011388",462.2],["17.949255","49.011482",463.4],["17.949673","49.011716",465.6],["17.950151","49.011924",468.8],["17.950671","49.012232",471.8],["17.951038","49.012449",474.2],["17.951322","49.01257",476.6],["17.951709","49.012735",479],["17.952234","49.01283",480.8],["17.952676","49.012823",482.6],["17.953225","49.012957",486.6],["17.953313","49.013304",490.6],["17.953526","49.013563",494.2],["17.953629","49.013767",496.4],["17.953676","49.013942",499],["17.953692","49.014157",501.6],["17.953718","49.014347",504.2],["17.953996","49.014626",507.4],["17.954253","49.014977",510],["17.954531","49.015232",511.8],["17.954783","49.015562",513.8],["17.955041","49.015979",517],["17.955174","49.016129",518.4],["17.955543","49.016621",523.8],["17.955911","49.016987",525.8],["17.956561","49.017449",528.6],["17.956873","49.017676",529.8],["17.957159","49.017847",531.2],["17.957416","49.017981",532.6],["17.957664","49.018225",535.6],["17.957701","49.018418",537.8],["17.957397","49.018408",541.4],["17.957093","49.018236",544],["17.956392","49.017982",546.2],["17.955509","49.017836",545.2],["17.955015","49.017666",543.6],["17.954378","49.017705",543],["17.953544","49.018353",544.2],["17.953138","49.018606",544],["17.952817","49.018362",543],["17.952325","49.017929",545.6],["17.952119","49.017731",547.2],["17.951994","49.01744",549.6],["17.951822","49.017139",551],["17.951644","49.016591",552.4],["17.95149","49.016222",553.8],["17.951","49.01577",557.2],["17.95073","49.015669",559],["17.950347","49.015468",561.6],["17.949711","49.015358",565.4],["17.949374","49.015431",568.6],["17.949199","49.015552",571],["17.948845","49.015659",573.2],["17.948488","49.015857",575.4],["17.948213","49.016043",577.6],["17.948019","49.016243",579.2],["17.94806","49.016491",582.2],["17.948097","49.017029",587.6],["17.948048","49.017666",589.8],["17.947812","49.018496",595.6],["17.947188","49.019343",601.8],["17.946086","49.020636",610.4],["17.945041","49.021151",616.2],["17.944295","49.021524",620.2],["17.943541","49.021767",623],["17.94297","49.021875",623.6],["17.942163","49.021951",623.4],["17.941669","49.022131",621],["17.941464","49.022599",621.4]]}},{"type":"Feature","properties":{"type":99,"segment":"13236","segmentName":"Bzovik","segmentDistance":"D\u013a\u017eka: 1.42 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.9 %<\/b>","segmentNameHref":"bzovik"},"geometry":{"type":"LineString","coordinates":[["17.945033","49.010111",443.6],["17.945033","49.010111",443.6],["17.945992","49.010327",449.4],["17.946444","49.010526",451.2],["17.946761","49.010715",452.4],["17.947119","49.010828",453.8],["17.947713","49.011059",455.8],["17.948372","49.01124",460],["17.948957","49.011388",462.2],["17.949255","49.011482",463.4],["17.949673","49.011716",465.6],["17.950151","49.011924",468.8],["17.950671","49.012232",471.8],["17.951038","49.012449",474.2],["17.951322","49.01257",476.6],["17.951709","49.012735",479],["17.952234","49.01283",480.8],["17.952676","49.012823",482.6],["17.953225","49.012957",486.6],["17.953313","49.013304",490.6],["17.953526","49.013563",494.2],["17.953629","49.013767",496.4],["17.953676","49.013942",499],["17.953692","49.014157",501.6],["17.953718","49.014347",504.2],["17.953996","49.014626",507.4],["17.954253","49.014977",510],["17.954531","49.015232",511.8],["17.954783","49.015562",513.8],["17.955041","49.015979",517],["17.955174","49.016129",518.4],["17.955543","49.016621",523.8],["17.955911","49.016987",525.8],["17.956561","49.017449",528.6],["17.956873","49.017676",529.8],["17.957159","49.017847",531.2]]}},{"type":"Feature","properties":{"type":99,"segment":"17921","segmentName":"Segment","segmentDistance":"D\u013a\u017eka: 1.31 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.8 %<\/b>","segmentNameHref":"segment"},"geometry":{"type":"LineString","coordinates":[["17.954378","49.017705",543],["17.954378","49.017705",543],["17.953544","49.018353",544.2],["17.953138","49.018606",544],["17.952817","49.018362",543],["17.952325","49.017929",545.6],["17.952119","49.017731",547.2],["17.951994","49.01744",549.6],["17.951822","49.017139",551],["17.951644","49.016591",552.4],["17.95149","49.016222",553.8],["17.951","49.01577",557.2],["17.95073","49.015669",559],["17.950347","49.015468",561.6],["17.949711","49.015358",565.4],["17.949374","49.015431",568.6],["17.949199","49.015552",571],["17.948845","49.015659",573.2],["17.948488","49.015857",575.4],["17.948213","49.016043",577.6],["17.948019","49.016243",579.2],["17.94806","49.016491",582.2],["17.948097","49.017029",587.6],["17.948048","49.017666",589.8],["17.947812","49.018496",595.6],["17.947188","49.019343",601.8],["17.946086","49.020636",610.4]]}},{"type":"Feature","properties":{"type":99,"segment":"17693","segmentName":"NS Bojkovicka (Slovak border towards Sanov)","segmentDistance":"D\u013a\u017eka: 673.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -8.5 %<\/b>","segmentNameHref":"ns-bojkovicka-slovak-border-towards-sanov"},"geometry":{"type":"LineString","coordinates":[["17.904904","49.037296",498],["17.904904","49.037296",498],["17.903891","49.03807",492.4],["17.902531","49.040153",473.2],["17.901764","49.041108",458.8],["17.900099","49.042241",436.4]]}},{"type":"Feature","properties":{"type":99,"segment":"17667","segmentName":"Hr\u00e1dek od p\u0159ejezdu n\u00e1dra\u017e\u00ed uphill","segmentDistance":"D\u013a\u017eka: 492.70 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.4 %<\/b>","segmentNameHref":"hradek-od-prejezdu-nadrazi-uphill"},"geometry":{"type":"LineString","coordinates":[["17.901965","49.074881",378.2],["17.901965","49.074881",378.2],["17.903248","49.074446",383.8],["17.904936","49.073907",393.2],["17.907119","49.072923",403.6]]}},{"type":"Feature","properties":{"type":99,"segment":"10803","segmentName":"Jest\u0159ab\u00ed-\u0160t\u00edtn\u00e1","segmentDistance":"D\u013a\u017eka: 534.10 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 9.6 %<\/b>","segmentNameHref":"jestrabi-stitna"},"geometry":{"type":"LineString","coordinates":[["17.957234","49.068639",339.2],["17.957234","49.068639",339.2],["17.957995","49.068827",344.6],["17.959645","49.0687",360.2],["17.962014","49.068655",381.4],["17.963251","49.068554",390.2]]}},{"type":"Feature","properties":{"type":99,"segment":"7763","segmentName":"Horn\u00e9 Srnie sprint climb","segmentDistance":"D\u013a\u017eka: 402.80 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3.8 %<\/b>","segmentNameHref":"horne-srnie-sprint-climb"},"geometry":{"type":"LineString","coordinates":[["18.105078","48.988608",242.4],["18.105078","48.988608",242.4],["18.105145","48.988179",242],["18.10562","48.98754",242],["18.106793","48.986824",246.4],["18.107244","48.986402",250.8]]}}] 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(); } }); 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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTE0MDIyNTYmaXRlbU5hbWU9ViVDMyVCRGphemQrJUM0JThELisxNDAyMjU2JmNvbW1lbnRUeXBlPWNvbW1lbnQmYXV0aG9yVXNlcklkPTUzMDM2JndpZGdldElkPWNvbW1lbnRzJmFsbG93SW5zZXJ0PTEmYWxsb3dSZXBseT0xJnJldHVyblVybD1odHRwcyUzQSUyRiUyRnd3dy5tdGhpa2VyLnNrJTJGYWt0aXZpdHklMkYxNDAyMjU2JTJGYmljeWtlbC1zYW5vdi1yaWRlLmh0bWwmcGFyc2VkVXJsJTVCc2NoZW1lJTVEPWh0dHBzJnBhcnNlZFVybCU1Qmhvc3QlNUQ9d3d3Lm10aGlrZXIuc2smcGFyc2VkVXJsJTVCcGF0aCU1RD0lMkZha3Rpdml0eSUyRjE0MDIyNTYlMkZiaWN5a2VsLXNhbm92LXJpZGUuaHRtbCZpbmNsdWRlQ29tbWVudElkPTA|" + 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"; }); }); }); -->