favorite comment 0
thumb_up0thumb_down

directions_bikeAfternoon 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ť
28,4 km
schedule Čas
01:45:07
landscape Nastúpané
847 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 16,2 km/h 63,2 km/h
Výkon 185 W -
Tepová frekvencia 145 bpm 185 bpm
Energetický výdaj 1 037 kcal

cloudPodmienky

Priemerná teplota 15 °C
directions_bike Bicykel: Canyon Exceed

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike Morning Ride

trending_up 63,8 km
schedule 02:01:47
landscape 390 m
thumb_up0thumb_down

rowing WeightTraining - Morning Weight Training

trending_up 0,0 km
schedule 01:22:04
landscape 0 m
thumb_up0thumb_down

rowing WeightTraining - Morning Weight Training

trending_up 0,0 km
schedule 01:28:44
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 Lavka","segmentDistance":"D\u013a\u017eka: 2.41 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -5.6 %<\/b>","segmentNameHref":"downhill-liecebak-%3E-lavka"},"geometry":{"type":"LineString","coordinates":[["18.089984","48.344727",283.5],["18.089984","48.344727",283.5],["18.090265","48.34536",286.6],["18.090495","48.345946",288.4],["18.091312","48.34637",293.1],["18.092414","48.346265",302],["18.092908","48.346166",307.9],["18.093562","48.346057",315.2],["18.093687","48.345665",319.7],["18.093672","48.345381",323.4],["18.093524","48.344748",327.4],["18.092825","48.344194",322.3],["18.09209","48.343444",326.9],["18.091448","48.342829",332],["18.090952","48.342193",334.6],["18.090691","48.341761",338],["18.090499","48.341226",344.3],["18.091298","48.341409",355.5],["18.091739","48.341482",361.5],["18.092828","48.341853",373.8],["18.093509","48.34209",380.2],["18.094233","48.342234",387.5],["18.094817","48.342379",392.7],["18.095701","48.342441",396.8],["18.096565","48.342697",399.7],["18.097397","48.343003",407.3],["18.097796","48.343258",412.7],["18.098177","48.343433",417.6],["18.098594","48.34352",423.2],["18.099536","48.343805",436.4],["18.1","48.34396",443.3],["18.100327","48.343719",449.9],["18.100603","48.343336",457.9],["18.101286","48.343537",467.8],["18.101567","48.343775",473.2],["18.101865","48.344147",479.4],["18.101632","48.344688",486.9],["18.10178","48.344969",490.7],["18.102175","48.345242",496.6],["18.10236","48.345104",500.5],["18.102489","48.344777",506.8],["18.10298","48.344676",515.6],["18.103667","48.344712",523.4],["18.104064","48.344618",527],["18.104784","48.344668",531.5],["18.10517","48.344621",533.4],["18.105568","48.344565",535.8],["18.105559","48.344286",538.8],["18.105328","48.343724",545.8],["18.105172","48.343101",554.5],["18.105026","48.342783",555.7],["18.104908","48.342481",554.6],["18.104934","48.342767",555.6],["18.105217","48.343457",550.3],["18.105394","48.343977",542.5],["18.105852","48.344466",537],["18.106692","48.344758",538.8],["18.10753","48.345024",541.8],["18.108899","48.345287",544.3],["18.109822","48.345776",543.6],["18.110909","48.346406",531.6],["18.112207","48.346668",518.5],["18.113182","48.346906",514.5],["18.114222","48.346604",509.8],["18.115198","48.346429",504.3],["18.115785","48.346578",500],["18.116539","48.346844",493.1],["18.117436","48.347025",484],["18.118254","48.34707",475.4],["18.119641","48.34701",464.1],["18.12072","48.347133",450.7],["18.121274","48.347299",443.8],["18.122102","48.34758",434.2]]}},{"type":"Feature","properties":{"type":99,"segment":"14036","segmentName":"Svoradov prame\u0148 -> Pyram\u00edda","segmentDistance":"D\u013a\u017eka: 2.30 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 11.5 %<\/b>","segmentNameHref":"svoradov-pramen-%3E-pyramida"},"geometry":{"type":"LineString","coordinates":[["18.092414","48.346265",302],["18.092414","48.346265",302],["18.092908","48.346166",307.9],["18.093562","48.346057",315.2],["18.093687","48.345665",319.7],["18.093672","48.345381",323.4],["18.093524","48.344748",327.4],["18.092825","48.344194",322.3],["18.09209","48.343444",326.9],["18.091448","48.342829",332],["18.090952","48.342193",334.6],["18.090691","48.341761",338],["18.090499","48.341226",344.3],["18.091298","48.341409",355.5],["18.091739","48.341482",361.5],["18.092828","48.341853",373.8],["18.093509","48.34209",380.2],["18.094233","48.342234",387.5],["18.094817","48.342379",392.7],["18.095701","48.342441",396.8],["18.096565","48.342697",399.7],["18.097397","48.343003",407.3],["18.097796","48.343258",412.7],["18.098177","48.343433",417.6],["18.098594","48.34352",423.2],["18.099536","48.343805",436.4],["18.1","48.34396",443.3],["18.100327","48.343719",449.9],["18.100603","48.343336",457.9],["18.101286","48.343537",467.8],["18.101567","48.343775",473.2],["18.101865","48.344147",479.4],["18.101632","48.344688",486.9],["18.10178","48.344969",490.7],["18.102175","48.345242",496.6],["18.10236","48.345104",500.5],["18.102489","48.344777",506.8],["18.10298","48.344676",515.6],["18.103667","48.344712",523.4],["18.104064","48.344618",527],["18.104784","48.344668",531.5],["18.10517","48.344621",533.4],["18.105568","48.344565",535.8],["18.105559","48.344286",538.8],["18.105328","48.343724",545.8]]}},{"type":"Feature","properties":{"type":99,"segment":"13085","segmentName":"vyslap po cervenej","segmentDistance":"D\u013a\u017eka: 1.30 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 12.8 %<\/b>","segmentNameHref":"vyslap-po-cervenej"},"geometry":{"type":"LineString","coordinates":[["18.091298","48.341409",355.5],["18.091298","48.341409",355.5],["18.091739","48.341482",361.5],["18.092828","48.341853",373.8],["18.093509","48.34209",380.2],["18.094233","48.342234",387.5],["18.094817","48.342379",392.7],["18.095701","48.342441",396.8],["18.096565","48.342697",399.7],["18.097397","48.343003",407.3],["18.097796","48.343258",412.7],["18.098177","48.343433",417.6],["18.098594","48.34352",423.2],["18.099536","48.343805",436.4],["18.1","48.34396",443.3],["18.100327","48.343719",449.9],["18.100603","48.343336",457.9],["18.101286","48.343537",467.8],["18.101567","48.343775",473.2],["18.101865","48.344147",479.4],["18.101632","48.344688",486.9],["18.10178","48.344969",490.7],["18.102175","48.345242",496.6],["18.10236","48.345104",500.5],["18.102489","48.344777",506.8]]}},{"type":"Feature","properties":{"type":99,"segment":"13086","segmentName":"Po\u013eovn\u00edcka Climb","segmentDistance":"D\u013a\u017eka: 863.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 14.4 %<\/b>","segmentNameHref":"polovnicka-climb"},"geometry":{"type":"LineString","coordinates":[["18.098594","48.34352",423.2],["18.098594","48.34352",423.2],["18.099536","48.343805",436.4],["18.099536","48.343805",436.4],["18.1","48.34396",443.3],["18.100327","48.343719",449.9],["18.100603","48.343336",457.9],["18.101286","48.343537",467.8],["18.101567","48.343775",473.2],["18.101865","48.344147",479.4],["18.101632","48.344688",486.9],["18.10178","48.344969",490.7],["18.102175","48.345242",496.6],["18.10236","48.345104",500.5],["18.102489","48.344777",506.8],["18.10298","48.344676",515.6],["18.103667","48.344712",523.4],["18.104064","48.344618",527],["18.104784","48.344668",531.5],["18.10517","48.344621",533.4],["18.105568","48.344565",535.8],["18.105559","48.344286",538.8]]}},{"type":"Feature","properties":{"type":99,"segment":"5044","segmentName":"Zo sedla na Pyramidu","segmentDistance":"D\u013a\u017eka: 219.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 10 %<\/b>","segmentNameHref":"zo-sedla-na-pyramidu"},"geometry":{"type":"LineString","coordinates":[["18.105568","48.344565",535.8],["18.105568","48.344565",535.8],["18.105559","48.344286",538.8],["18.105328","48.343724",545.8],["18.105172","48.343101",554.5]]}},{"type":"Feature","properties":{"type":99,"segment":"5045","segmentName":"pyram\u00edda -sedlo","segmentDistance":"D\u013a\u017eka: 212.70 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.2 %<\/b>","segmentNameHref":"pyramida-sedlo"},"geometry":{"type":"LineString","coordinates":[["18.105172","48.343101",554.5],["18.105172","48.343101",554.5],["18.105026","48.342783",555.7],["18.105026","48.342783",555.7],["18.104908","48.342481",554.6],["18.104934","48.342767",555.6],["18.104934","48.342767",555.6],["18.105217","48.343457",550.3],["18.105394","48.343977",542.5]]}},{"type":"Feature","properties":{"type":99,"segment":"127088","segmentName":"Pyram\u00edda - Pod Brezinou","segmentDistance":"D\u013a\u017eka: 1.69 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -7.8 %<\/b>","segmentNameHref":"pyramida-pod-brezinou"},"geometry":{"type":"LineString","coordinates":[["18.105172","48.343101",554.5],["18.105172","48.343101",554.5],["18.105026","48.342783",555.7],["18.104908","48.342481",554.6],["18.104934","48.342767",555.6],["18.105217","48.343457",550.3],["18.105394","48.343977",542.5],["18.105852","48.344466",537],["18.106692","48.344758",538.8],["18.10753","48.345024",541.8],["18.108899","48.345287",544.3],["18.109822","48.345776",543.6],["18.110909","48.346406",531.6],["18.112207","48.346668",518.5],["18.113182","48.346906",514.5],["18.114222","48.346604",509.8],["18.115198","48.346429",504.3],["18.115785","48.346578",500],["18.116539","48.346844",493.1],["18.117436","48.347025",484],["18.118254","48.34707",475.4],["18.119641","48.34701",464.1],["18.12072","48.347133",450.7],["18.121274","48.347299",443.8],["18.122102","48.34758",434.2]]}},{"type":"Feature","properties":{"type":99,"segment":"6878","segmentName":"na hreben","segmentDistance":"D\u013a\u017eka: 646.40 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.6 %<\/b>","segmentNameHref":"na-hreben"},"geometry":{"type":"LineString","coordinates":[["18.124221","48.347821",421.9],["18.124221","48.347821",421.9],["18.124402","48.34789",423.1],["18.124402","48.34789",423.1],["18.124724","48.348283",431.9],["18.125046","48.348443",435.8],["18.125493","48.34853",439.7],["18.126351","48.3488",443.1],["18.126737","48.349322",449.3],["18.126789","48.3501",457.2],["18.125775","48.350695",462.5],["18.125189","48.351034",465.5]]}},{"type":"Feature","properties":{"type":99,"segment":"9390","segmentName":"Downhill od sedla po \u010dervenej","segmentDistance":"D\u013a\u017eka: 833.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -10.7 %<\/b>","segmentNameHref":"downhill-od-sedla-po-cervenej"},"geometry":{"type":"LineString","coordinates":[["18.141643","48.360224",403.3],["18.141643","48.360224",403.3],["18.140279","48.36076",397.2],["18.139573","48.360947",391.1],["18.138726","48.361271",381.8],["18.137999","48.361591",374.5],["18.13779","48.361982",369.5],["18.137556","48.362668",366.7],["18.137815","48.362977",363.8],["18.138428","48.363797",349.7],["18.139159","48.364412",335.2],["18.139932","48.364775",325]]}},{"type":"Feature","properties":{"type":99,"segment":"9391","segmentName":"vreteno spojovacia","segmentDistance":"D\u013a\u017eka: 1.59 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -4 %<\/b>","segmentNameHref":"vreteno-spojovacia"},"geometry":{"type":"LineString","coordinates":[["18.141727","48.371942",326.9],["18.141727","48.371942",326.9],["18.142027","48.372614",328.7],["18.14283","48.373478",331],["18.143523","48.374263",331.9],["18.143173","48.374793",332.1],["18.142208","48.375008",329.7],["18.140989","48.375104",325.3],["18.139484","48.374679",318.9],["18.137052","48.374391",307.5],["18.134825","48.374606",295.9],["18.134234","48.374429",292.1],["18.133193","48.374252",286.7],["18.132615","48.374573",282.3],["18.132266","48.375821",271],["18.132","48.376522",266.2],["18.132398","48.377073",261.4]]}},{"type":"Feature","properties":{"type":99,"segment":"14044","segmentName":"Mechenice po \u017eltej k r\u00e1zcestiu","segmentDistance":"D\u013a\u017eka: 2.63 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.1 %<\/b>","segmentNameHref":"mechenice-po-zltej-k-razcestiu"},"geometry":{"type":"LineString","coordinates":[["18.120055","48.373818",200.5],["18.120055","48.373818",200.5],["18.120316","48.373422",202.6],["18.120141","48.373056",204.1],["18.119272","48.372885",206.4],["18.117983","48.372398",209.1],["18.116549","48.371702",210.7],["18.114962","48.370519",212.6],["18.114034","48.369342",212.1],["18.113512","48.368534",205],["18.113122","48.367522",198.5],["18.112675","48.366967",198],["18.111917","48.366747",201.8],["18.11083","48.367641",205.9],["18.110034","48.368081",209.5],["18.109233","48.368366",211.9],["18.108209","48.368704",215.4],["18.107948","48.368525",219.4],["18.108923","48.367906",227.1],["18.10971","48.367453",233.6],["18.109679","48.367122",237.5],["18.109239","48.36649",245.6],["18.108658","48.366369",250.6],["18.107868","48.366389",253.6],["18.106423","48.366034",256.9],["18.105185","48.365682",261.8],["18.10352","48.36496",269.9],["18.102551","48.364676",275.8],["18.10146","48.364425",280.4],["18.100548","48.364209",283.1],["18.100246","48.364035",284],["18.099809","48.364032",287.7],["18.099419","48.364144",292.3]]}},{"type":"Feature","properties":{"type":99,"segment":"10142","segmentName":"Up along yellow track","segmentDistance":"D\u013a\u017eka: 1.26 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 11.6 %<\/b>","segmentNameHref":"up-along-yellow-track"},"geometry":{"type":"LineString","coordinates":[["18.09828","48.364639",304],["18.09828","48.364639",304],["18.09772","48.364502",309.5],["18.097151","48.364217",315.6],["18.096803","48.363852",321.8],["18.096623","48.363469",329.7],["18.096608","48.3632",335.7],["18.096517","48.362971",341.8],["18.096354","48.362657",349.6],["18.096407","48.362229",359.2],["18.096372","48.36193",364.7],["18.096082","48.361405",372.3],["18.095623","48.360797",378.9],["18.095409","48.360514",383],["18.095076","48.359909",394.8],["18.094669","48.359263",407.5],["18.094418","48.358779",414.5],["18.094252","48.358454",419.8],["18.093886","48.357951",426],["18.093586","48.357446",429.8],["18.093489","48.357163",433.6],["18.093236","48.35678",439.2],["18.09318","48.356494",442.8],["18.093117","48.356245",445.7],["18.093012","48.356121",446.8],["18.0931","48.355308",446.4]]}},{"type":"Feature","properties":{"type":99,"segment":"10144","segmentName":"z Me\u0161kovho","segmentDistance":"D\u013a\u017eka: 401.70 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -10.8 %<\/b>","segmentNameHref":"z-meskovho"},"geometry":{"type":"LineString","coordinates":[["18.093192","48.354551",447.3],["18.093192","48.354551",447.3],["18.092618","48.354637",442.7],["18.092618","48.354637",442.7],["18.091512","48.35465",427.6],["18.09065","48.354786",417.8],["18.089138","48.354881",407.3]]}},{"type":"Feature","properties":{"type":99,"segment":"11248","segmentName":"Z Me\u0161kovho po lavi\u010dku","segmentDistance":"D\u013a\u017eka: 708.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -8 %<\/b>","segmentNameHref":"z-meskovho-po-lavicku"},"geometry":{"type":"LineString","coordinates":[["18.092618","48.354637",442.7],["18.092618","48.354637",442.7],["18.091512","48.35465",427.6],["18.09065","48.354786",417.8],["18.089138","48.354881",407.3],["18.087537","48.355097",398.6],["18.086805","48.355649",392],["18.086069","48.356112",383.3],["18.085786","48.356026",379.7]]}},{"type":"Feature","properties":{"type":99,"segment":"11249","segmentName":"ypsilon down","segmentDistance":"D\u013a\u017eka: 802.40 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -11.6 %<\/b>","segmentNameHref":"ypsilon-down"},"geometry":{"type":"LineString","coordinates":[["18.084856","48.355321",376.1],["18.084856","48.355321",376.1],["18.083985","48.354905",371.8],["18.08347","48.354304",360.2],["18.082067","48.353619",346.7],["18.081077","48.353405",339.5],["18.079703","48.353124",325.5],["18.078427","48.353113",316.3],["18.076579","48.353209",307.1]]}},{"type":"Feature","properties":{"type":99,"segment":"11252","segmentName":"flow","segmentDistance":"D\u013a\u017eka: 893.80 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -1.8 %<\/b>","segmentNameHref":"flow"},"geometry":{"type":"LineString","coordinates":[["18.087882","48.350914",304.2],["18.087882","48.350914",304.2],["18.088375","48.35076",300.3],["18.08802","48.350015",294.7],["18.087395","48.349025",288.8],["18.086809","48.348378",289.1],["18.086739","48.347641",288.7],["18.087022","48.347127",291.2],["18.087429","48.346792",292],["18.087906","48.346273",288.1],["18.088518","48.346324",284.9],["18.08985","48.346592",288.4]]}},{"type":"Feature","properties":{"type":99,"segment":"8614","segmentName":"Hornozoborsk\u00e1-Lie\u010debak","segmentDistance":"D\u013a\u017eka: 1.11 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3.3 %<\/b>","segmentNameHref":"hornozoborska-liecebak"},"geometry":{"type":"LineString","coordinates":[["18.089667","48.336275",245.8],["18.089667","48.336275",245.8],["18.089889","48.33506",235.9],["18.090121","48.3343",227.6],["18.089903","48.333182",216.4],["18.089703","48.331446",205.1],["18.089427","48.328705",181.9],["18.088977","48.327182",171.8]]}},{"type":"Feature","properties":{"type":99,"segment":"11390","segmentName":"Kl\u00e1\u0161torsk\u00e1 po Hornozoborsk\u00fa","segmentDistance":"D\u013a\u017eka: 1.26 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 7.1 %<\/b>","segmentNameHref":"klastorska-po-hornozoborsku"},"geometry":{"type":"LineString","coordinates":[["18.088716","48.325325",156],["18.088716","48.325325",156],["18.090228","48.324216",148.7],["18.092383","48.323605",147.5],["18.094673","48.32299",146.4],["18.094278","48.322224",143.2],["18.093846","48.320901",140.9],["18.09493","48.320316",140.6],["18.095563","48.319737",140.7],["18.096246","48.319486",141.9],["18.097125","48.318706",140.5],["18.098208","48.317973",140.3],["18.098852","48.317511",140.2]]}}] 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.361154499722","lng":"18.095801999722","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto939063-0_626bc59128b3d.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto939063-0_626bc59128b3d.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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTkzOTA2MyZpdGVtTmFtZT1WJUMzJUJEamF6ZCslQzQlOEQuKzkzOTA2MyZjb21tZW50VHlwZT1jb21tZW50JmF1dGhvclVzZXJJZD02NjU0NCZ3aWRnZXRJZD1jb21tZW50cyZhbGxvd0luc2VydD0xJmFsbG93UmVwbHk9MSZyZXR1cm5Vcmw9aHR0cHMlM0ElMkYlMkZ3d3cubXRoaWtlci5zayUyRmFrdGl2aXR5JTJGOTM5MDYzJTJGYmljeWtlbC1hZnRlcm5vb24tcmlkZS5odG1sJTNGb2QlM0QxJTI2cmlkZV9pZCUzRDkzOTA2MyZwYXJzZWRVcmwlNUJzY2hlbWUlNUQ9aHR0cHMmcGFyc2VkVXJsJTVCaG9zdCU1RD13d3cubXRoaWtlci5zayZwYXJzZWRVcmwlNUJwYXRoJTVEPSUyRmFrdGl2aXR5JTJGOTM5MDYzJTJGYmljeWtlbC1hZnRlcm5vb24tcmlkZS5odG1sJnBhcnNlZFVybCU1QnF1ZXJ5JTVEPW9kJTNEMSUyNnJpZGVfaWQlM0Q5MzkwNjMmaW5jbHVkZUNvbW1lbnRJZD0w|" + 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"; }); }); }); -->