favorite comment 0
thumb_up0thumb_down

directions_bikeKojšovka po nočnej

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ť
52,5 km
schedule Čas
02:39:06
landscape Nastúpané
1 038 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 19,8 km/h 57,6 km/h
Výkon 209 W -
Kadencia 58 rpm -
Tepová frekvencia 155 bpm 180 bpm
Energetický výdaj 2 253 kcal

cloudPodmienky

Priemerná teplota 16 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike Relax ride with common cold

trending_up 25,8 km
schedule 00:57:22
landscape 203 m
thumb_up0thumb_down

directions_bike Evening Ride

trending_up 13,5 km
schedule 00:30:37
landscape 126 m
thumb_up0thumb_down

directions_bike Relax🚴🏻‍♂️

trending_up 15,4 km
schedule 00:40:46
landscape 150 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 Rampa","segmentDistance":"D\u013a\u017eka: 5.19 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -8.3 %<\/b>","segmentNameHref":"pamatnik-%3E-rampa"},"geometry":{"type":"LineString","coordinates":[["20.964818","48.777591",1116.4],["20.964818","48.777591",1116.4],["20.964264","48.778156",1120.4],["20.96456","48.778446",1121.4],["20.9655","48.778781",1121.8],["20.967017","48.77912",1121.4],["20.968337","48.779736",1119.8],["20.969643","48.780221",1118.2],["20.970997","48.780797",1116.2],["20.972348","48.781037",1114.4],["20.972439","48.781056",1110.6],["20.971565","48.780946",1111.8],["20.970262","48.780518",1113.2],["20.968177","48.779649",1116.2],["20.967052","48.779111",1117.6],["20.965623","48.778812",1118.4],["20.964413","48.778338",1118.4],["20.964313","48.777931",1118.8],["20.964313","48.777931",1118.8],["20.965372","48.777178",1117.4],["20.967935","48.77627",1099.2],["20.971128","48.77563",1078.2],["20.973244","48.775234",1063.8],["20.975476","48.774432",1046.4],["20.976351","48.773923",1038.8],["20.977016","48.773128",1029],["20.976994","48.772837",1026],["20.976525","48.772294",1019],["20.976456","48.771881",1013.6],["20.976905","48.771551",1008.8],["20.97763","48.771513",1006.2],["20.979011","48.77158",996],["20.980492","48.771505",988.4],["20.981327","48.771214",982.2],["20.982527","48.770861",972.4],["20.983834","48.770971",966.2],["20.984585","48.771227",959.2],["20.985752","48.771447",952],["20.987307","48.771449",943.8],["20.989178","48.770853",930.6],["20.990898","48.770541",922.6],["20.991901","48.770319",915.4],["20.993463","48.769294",903.2],["20.993963","48.768689",897],["20.994311","48.767826",889.6],["20.99428","48.767259",883],["20.993466","48.76657",875.4],["20.993413","48.766334",872.4],["20.993689","48.766125",869.6],["20.994295","48.766096",866.6],["20.99616","48.766315",856.4],["20.996782","48.766103",851],["20.997066","48.765651",848.6],["20.997124","48.764563",839.4],["20.996912","48.763737",830.8],["20.997117","48.762786",820.8],["20.997759","48.76191",814],["20.998538","48.761296",805.8],["20.999898","48.760506",794],["21.000801","48.760028",786.8],["21.001279","48.759685",779.6],["20.99974","48.759687",772.4],["20.998962","48.759772",768.2],["20.998246","48.75982",764],["20.996249","48.760217",750],["20.995524","48.760578",745.6],["20.995186","48.760819",741.4],["20.995328","48.760097",736],["20.996062","48.759009",726.2],["20.996659","48.758033",715.6],["20.997439","48.75758",711],["20.99814","48.756893",701.8]]}},{"type":"Feature","properties":{"type":99,"segment":"16057","segmentName":"Koj\u0161ovka-Koncuveske new road DH","segmentDistance":"D\u013a\u017eka: 7.04 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -7.8 %<\/b>","segmentNameHref":"kojsovka-koncuveske-new-road-dh"},"geometry":{"type":"LineString","coordinates":[["20.964264","48.778156",1120.4],["20.964264","48.778156",1120.4],["20.96456","48.778446",1121.4],["20.9655","48.778781",1121.8],["20.967017","48.77912",1121.4],["20.968337","48.779736",1119.8],["20.969643","48.780221",1118.2],["20.970997","48.780797",1116.2],["20.972348","48.781037",1114.4],["20.972439","48.781056",1110.6],["20.971565","48.780946",1111.8],["20.970262","48.780518",1113.2],["20.968177","48.779649",1116.2],["20.967052","48.779111",1117.6],["20.965623","48.778812",1118.4],["20.964413","48.778338",1118.4],["20.964313","48.777931",1118.8],["20.965372","48.777178",1117.4],["20.967935","48.77627",1099.2],["20.971128","48.77563",1078.2],["20.973244","48.775234",1063.8],["20.975476","48.774432",1046.4],["20.976351","48.773923",1038.8],["20.977016","48.773128",1029],["20.976994","48.772837",1026],["20.976525","48.772294",1019],["20.976456","48.771881",1013.6],["20.976905","48.771551",1008.8],["20.97763","48.771513",1006.2],["20.979011","48.77158",996],["20.980492","48.771505",988.4],["20.981327","48.771214",982.2],["20.982527","48.770861",972.4],["20.983834","48.770971",966.2],["20.984585","48.771227",959.2],["20.985752","48.771447",952],["20.987307","48.771449",943.8],["20.989178","48.770853",930.6],["20.990898","48.770541",922.6],["20.991901","48.770319",915.4],["20.993463","48.769294",903.2],["20.993963","48.768689",897],["20.994311","48.767826",889.6],["20.99428","48.767259",883],["20.993466","48.76657",875.4],["20.993413","48.766334",872.4],["20.993689","48.766125",869.6],["20.994295","48.766096",866.6],["20.99616","48.766315",856.4],["20.996782","48.766103",851],["20.997066","48.765651",848.6],["20.997124","48.764563",839.4],["20.996912","48.763737",830.8],["20.997117","48.762786",820.8],["20.997759","48.76191",814],["20.998538","48.761296",805.8],["20.999898","48.760506",794],["21.000801","48.760028",786.8],["21.001279","48.759685",779.6],["20.99974","48.759687",772.4],["20.998962","48.759772",768.2],["20.998246","48.75982",764],["20.996249","48.760217",750],["20.995524","48.760578",745.6],["20.995186","48.760819",741.4],["20.995328","48.760097",736],["20.996062","48.759009",726.2],["20.996659","48.758033",715.6],["20.997439","48.75758",711],["20.99814","48.756893",701.8],["20.9988","48.756092",690.4],["20.999259","48.755247",688.2],["20.999244","48.754671",682.4],["21.000553","48.753736",675.4],["21.001031","48.753548",671],["21.001423","48.753743",669.2],["21.002068","48.754344",665],["21.00332","48.754965",658.4],["21.003739","48.754983",654.8],["21.003727","48.754815",652.2],["21.002933","48.754016",645],["21.002641","48.753408",637.8],["21.002815","48.752463",628],["21.00294","48.752024",621.8],["21.003988","48.751128",609.4],["21.004453","48.750388",601.8],["21.004436","48.749505",592.4],["21.004195","48.748767",584.8],["21.003518","48.747982",576],["21.003226","48.747592",570.8]]}},{"type":"Feature","properties":{"type":99,"segment":"32284","segmentName":"Chata Erika-odbocka na Rudn\u00edk","segmentDistance":"D\u013a\u017eka: 10.21 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -6.1 %<\/b>","segmentNameHref":"chata-erika-odbocka-na-rudnik"},"geometry":{"type":"LineString","coordinates":[["20.969643","48.780221",1118.2],["20.969643","48.780221",1118.2],["20.970997","48.780797",1116.2],["20.972348","48.781037",1114.4],["20.972439","48.781056",1110.6],["20.971565","48.780946",1111.8],["20.970262","48.780518",1113.2],["20.968177","48.779649",1116.2],["20.967052","48.779111",1117.6],["20.965623","48.778812",1118.4],["20.964413","48.778338",1118.4],["20.964313","48.777931",1118.8],["20.965372","48.777178",1117.4],["20.967935","48.77627",1099.2],["20.971128","48.77563",1078.2],["20.973244","48.775234",1063.8],["20.975476","48.774432",1046.4],["20.976351","48.773923",1038.8],["20.977016","48.773128",1029],["20.976994","48.772837",1026],["20.976525","48.772294",1019],["20.976456","48.771881",1013.6],["20.976905","48.771551",1008.8],["20.97763","48.771513",1006.2],["20.979011","48.77158",996],["20.980492","48.771505",988.4],["20.981327","48.771214",982.2],["20.982527","48.770861",972.4],["20.983834","48.770971",966.2],["20.984585","48.771227",959.2],["20.985752","48.771447",952],["20.987307","48.771449",943.8],["20.989178","48.770853",930.6],["20.990898","48.770541",922.6],["20.991901","48.770319",915.4],["20.993463","48.769294",903.2],["20.993963","48.768689",897],["20.994311","48.767826",889.6],["20.99428","48.767259",883],["20.993466","48.76657",875.4],["20.993413","48.766334",872.4],["20.993689","48.766125",869.6],["20.994295","48.766096",866.6],["20.99616","48.766315",856.4],["20.996782","48.766103",851],["20.997066","48.765651",848.6],["20.997124","48.764563",839.4],["20.996912","48.763737",830.8],["20.997117","48.762786",820.8],["20.997759","48.76191",814],["20.998538","48.761296",805.8],["20.999898","48.760506",794],["21.000801","48.760028",786.8],["21.001279","48.759685",779.6],["20.99974","48.759687",772.4],["20.998962","48.759772",768.2],["20.998246","48.75982",764],["20.996249","48.760217",750],["20.995524","48.760578",745.6],["20.995186","48.760819",741.4],["20.995328","48.760097",736],["20.996062","48.759009",726.2],["20.996659","48.758033",715.6],["20.997439","48.75758",711],["20.99814","48.756893",701.8],["20.9988","48.756092",690.4],["20.999259","48.755247",688.2],["20.999244","48.754671",682.4],["21.000553","48.753736",675.4],["21.001031","48.753548",671],["21.001423","48.753743",669.2],["21.002068","48.754344",665],["21.00332","48.754965",658.4],["21.003739","48.754983",654.8],["21.003727","48.754815",652.2],["21.002933","48.754016",645],["21.002641","48.753408",637.8],["21.002815","48.752463",628],["21.00294","48.752024",621.8],["21.003988","48.751128",609.4],["21.004453","48.750388",601.8],["21.004436","48.749505",592.4],["21.004195","48.748767",584.8],["21.003518","48.747982",576],["21.003226","48.747592",570.8],["21.003427","48.74691",564],["21.00404","48.746539",560],["21.007201","48.745342",547.4],["21.011566","48.744494",539.8],["21.014902","48.743878",531.2],["21.016388","48.743547",528.4],["21.018719","48.742669",526],["21.02011","48.741884",523.8],["21.020743","48.741002",522.4],["21.022929","48.739752",515.2],["21.025218","48.73811",506.8],["21.027355","48.736471",501.4],["21.029555","48.734568",497.2],["21.03035","48.73292",491.2],["21.031427","48.731676",488],["21.033338","48.729995",483.8],["21.035195","48.728644",480.4],["21.036596","48.727381",477.2],["21.037516","48.726767",476.8],["21.03851","48.726455",475.2],["21.039288","48.72641",473.2],["21.04001","48.726022",471.4],["21.041574","48.724383",467.8],["21.043115","48.723653",463.2],["21.045341","48.723728",460.6],["21.047149","48.723571",459.8],["21.0486","48.723581",455.6],["21.050371","48.723377",453.4],["21.051703","48.723623",451.6],["21.052744","48.723842",451],["21.053871","48.724769",450.2],["21.055416","48.725275",446.6],["21.057572","48.725899",442.8],["21.058997","48.72642",439.8],["21.060221","48.726926",437.8],["21.062091","48.727444",435],["21.063101","48.727401",434],["21.064753","48.727443",431.6],["21.06631","48.727304",430.4],["21.067527","48.726576",427.6],["21.068579","48.725626",424.8],["21.069688","48.72532",424],["21.072762","48.725676",418],["21.074444","48.726409",415.2],["21.075398","48.726401",415],["21.07746","48.725714",414.4],["21.080252","48.72531",409.6],["21.081317","48.725381",411.8]]}},{"type":"Feature","properties":{"type":99,"segment":"18977","segmentName":"Chata Erika kri\u017eovatka - Mexiko","segmentDistance":"D\u013a\u017eka: 14.55 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -4.9 %<\/b>","segmentNameHref":"chata-erika-krizovatka-mexiko"},"geometry":{"type":"LineString","coordinates":[["20.971565","48.780946",1111.8],["20.971565","48.780946",1111.8],["20.970262","48.780518",1113.2],["20.968177","48.779649",1116.2],["20.967052","48.779111",1117.6],["20.965623","48.778812",1118.4],["20.964413","48.778338",1118.4],["20.964313","48.777931",1118.8],["20.965372","48.777178",1117.4],["20.967935","48.77627",1099.2],["20.971128","48.77563",1078.2],["20.973244","48.775234",1063.8],["20.975476","48.774432",1046.4],["20.976351","48.773923",1038.8],["20.977016","48.773128",1029],["20.976994","48.772837",1026],["20.976525","48.772294",1019],["20.976456","48.771881",1013.6],["20.976905","48.771551",1008.8],["20.97763","48.771513",1006.2],["20.979011","48.77158",996],["20.980492","48.771505",988.4],["20.981327","48.771214",982.2],["20.982527","48.770861",972.4],["20.983834","48.770971",966.2],["20.984585","48.771227",959.2],["20.985752","48.771447",952],["20.987307","48.771449",943.8],["20.989178","48.770853",930.6],["20.990898","48.770541",922.6],["20.991901","48.770319",915.4],["20.993463","48.769294",903.2],["20.993963","48.768689",897],["20.994311","48.767826",889.6],["20.99428","48.767259",883],["20.993466","48.76657",875.4],["20.993413","48.766334",872.4],["20.993689","48.766125",869.6],["20.994295","48.766096",866.6],["20.99616","48.766315",856.4],["20.996782","48.766103",851],["20.997066","48.765651",848.6],["20.997124","48.764563",839.4],["20.996912","48.763737",830.8],["20.997117","48.762786",820.8],["20.997759","48.76191",814],["20.998538","48.761296",805.8],["20.999898","48.760506",794],["21.000801","48.760028",786.8],["21.001279","48.759685",779.6],["20.99974","48.759687",772.4],["20.998962","48.759772",768.2],["20.998246","48.75982",764],["20.996249","48.760217",750],["20.995524","48.760578",745.6],["20.995186","48.760819",741.4],["20.995328","48.760097",736],["20.996062","48.759009",726.2],["20.996659","48.758033",715.6],["20.997439","48.75758",711],["20.99814","48.756893",701.8],["20.9988","48.756092",690.4],["20.999259","48.755247",688.2],["20.999244","48.754671",682.4],["21.000553","48.753736",675.4],["21.001031","48.753548",671],["21.001423","48.753743",669.2],["21.002068","48.754344",665],["21.00332","48.754965",658.4],["21.003739","48.754983",654.8],["21.003727","48.754815",652.2],["21.002933","48.754016",645],["21.002641","48.753408",637.8],["21.002815","48.752463",628],["21.00294","48.752024",621.8],["21.003988","48.751128",609.4],["21.004453","48.750388",601.8],["21.004436","48.749505",592.4],["21.004195","48.748767",584.8],["21.003518","48.747982",576],["21.003226","48.747592",570.8],["21.003427","48.74691",564],["21.00404","48.746539",560],["21.007201","48.745342",547.4],["21.011566","48.744494",539.8],["21.014902","48.743878",531.2],["21.016388","48.743547",528.4],["21.018719","48.742669",526],["21.02011","48.741884",523.8],["21.020743","48.741002",522.4],["21.022929","48.739752",515.2],["21.025218","48.73811",506.8],["21.027355","48.736471",501.4],["21.029555","48.734568",497.2],["21.03035","48.73292",491.2],["21.031427","48.731676",488],["21.033338","48.729995",483.8],["21.035195","48.728644",480.4],["21.036596","48.727381",477.2],["21.037516","48.726767",476.8],["21.03851","48.726455",475.2],["21.039288","48.72641",473.2],["21.04001","48.726022",471.4],["21.041574","48.724383",467.8],["21.043115","48.723653",463.2],["21.045341","48.723728",460.6],["21.047149","48.723571",459.8],["21.0486","48.723581",455.6],["21.050371","48.723377",453.4],["21.051703","48.723623",451.6],["21.052744","48.723842",451],["21.053871","48.724769",450.2],["21.055416","48.725275",446.6],["21.057572","48.725899",442.8],["21.058997","48.72642",439.8],["21.060221","48.726926",437.8],["21.062091","48.727444",435],["21.063101","48.727401",434],["21.064753","48.727443",431.6],["21.06631","48.727304",430.4],["21.067527","48.726576",427.6],["21.068579","48.725626",424.8],["21.069688","48.72532",424],["21.072762","48.725676",418],["21.074444","48.726409",415.2],["21.075398","48.726401",415],["21.07746","48.725714",414.4],["21.080252","48.72531",409.6],["21.081317","48.725381",411.8],["21.082591","48.725846",423.2],["21.082855","48.725879",425.6],["21.084135","48.726155",433.6],["21.084974","48.726578",440.6],["21.085595","48.727379",447.6],["21.086071","48.728146",451.2],["21.086554","48.728987",452.2],["21.087423","48.730378",452.8],["21.088352","48.730829",453],["21.09172","48.730857",454.8],["21.095081","48.730792",457.8],["21.096623","48.730659",460.2],["21.098676","48.7301",466.6],["21.100163","48.729709",472.8],["21.102016","48.729264",471.4],["21.103589","48.729275",466],["21.105823","48.729703",459.6],["21.108699","48.729681",459.2],["21.113107","48.729328",461.4],["21.115561","48.728748",462],["21.123162","48.726278",456.2],["21.125893","48.725402",452.2],["21.127307","48.725035",446.6],["21.128717","48.72498",440.2],["21.129624","48.725044",431.2],["21.130357","48.724619",425.2],["21.131602","48.724274",419.4],["21.131803","48.723934",417.2],["21.131712","48.723427",413.6],["21.131291","48.722954",411.8],["21.131283","48.722277",412],["21.131476","48.721374",409.6],["21.131376","48.720865",409.2],["21.130725","48.720402",411],["21.130075","48.720213",412.6],["21.129384","48.719667",407.8],["21.129303","48.719306",404.8],["21.130467","48.719725",399],["21.131259","48.719689",394],["21.13281","48.719432",383.6],["21.133949","48.719417",375.2],["21.135218","48.719259",367.2],["21.135693","48.718771",360.4],["21.13555","48.718312",355],["21.135342","48.717941",350],["21.136371","48.717336",345.4],["21.138289","48.71589",340.4],["21.139786","48.714943",339.4],["21.141305","48.713791",336.4]]}},{"type":"Feature","properties":{"type":99,"segment":"2910","segmentName":"Segment","segmentDistance":"D\u013a\u017eka: 1.24 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 8.8 %<\/b>","segmentNameHref":"segment"},"geometry":{"type":"LineString","coordinates":[["20.99814","48.756893",701.8],["20.99814","48.756893",701.8],["20.9988","48.756092",690.4],["20.999259","48.755247",688.2],["20.999244","48.754671",682.4],["21.000553","48.753736",675.4],["21.001031","48.753548",671],["21.001423","48.753743",669.2],["21.002068","48.754344",665],["21.00332","48.754965",658.4],["21.003739","48.754983",654.8],["21.003727","48.754815",652.2],["21.002933","48.754016",645],["21.002641","48.753408",637.8],["21.002815","48.752463",628],["21.00294","48.752024",621.8],["21.003988","48.751128",609.4],["21.004453","48.750388",601.8],["21.004436","48.749505",592.4],["21.004195","48.748767",584.8],["21.003518","48.747982",576],["21.003226","48.747592",570.8],["21.003427","48.74691",564],["21.00404","48.746539",560]]}},{"type":"Feature","properties":{"type":99,"segment":"2904","segmentName":"Zl. Idka Koncuveske-Valal","segmentDistance":"D\u013a\u017eka: 993.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 8.6 %<\/b>","segmentNameHref":"zl-idka-koncuveske-valal"},"geometry":{"type":"LineString","coordinates":[["21.003427","48.74691",564],["21.003427","48.74691",564],["21.00404","48.746539",560],["21.007201","48.745342",547.4],["21.011566","48.744494",539.8],["21.014902","48.743878",531.2]]}},{"type":"Feature","properties":{"type":99,"segment":"92760","segmentName":"Koncuveske krizovatka - zavora","segmentDistance":"D\u013a\u017eka: 1.62 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 8.4 %<\/b>","segmentNameHref":"koncuveske-krizovatka-zavora"},"geometry":{"type":"LineString","coordinates":[["21.003427","48.74691",564],["21.003427","48.74691",564],["21.00404","48.746539",560],["21.007201","48.745342",547.4],["21.011566","48.744494",539.8],["21.014902","48.743878",531.2],["21.016388","48.743547",528.4],["21.018719","48.742669",526],["21.02011","48.741884",523.8],["21.020743","48.741002",522.4]]}},{"type":"Feature","properties":{"type":99,"segment":"534","segmentName":"Mexiko - H\u00fd\u013eov 1","segmentDistance":"D\u013a\u017eka: 1.21 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.1 %<\/b>","segmentNameHref":"mexiko-hylov-1"},"geometry":{"type":"LineString","coordinates":[["21.086554","48.728987",452.2],["21.086554","48.728987",452.2],["21.087423","48.730378",452.8],["21.088352","48.730829",453],["21.09172","48.730857",454.8],["21.095081","48.730792",457.8],["21.096623","48.730659",460.2],["21.098676","48.7301",466.6],["21.100163","48.729709",472.8],["21.102016","48.729264",471.4]]}},{"type":"Feature","properties":{"type":99,"segment":"79721","segmentName":"Hylov-odb na Rudnik","segmentDistance":"D\u013a\u017eka: 5.76 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.2 %<\/b>","segmentNameHref":"hylov-odb-na-rudnik"},"geometry":{"type":"LineString","coordinates":[["21.100163","48.729709",472.8],["21.100163","48.729709",472.8],["21.102016","48.729264",471.4],["21.103589","48.729275",466],["21.105823","48.729703",459.6],["21.108699","48.729681",459.2],["21.113107","48.729328",461.4],["21.115561","48.728748",462],["21.123162","48.726278",456.2],["21.125893","48.725402",452.2],["21.127307","48.725035",446.6],["21.128717","48.72498",440.2],["21.129624","48.725044",431.2],["21.130357","48.724619",425.2],["21.131602","48.724274",419.4],["21.131803","48.723934",417.2],["21.131712","48.723427",413.6],["21.131291","48.722954",411.8],["21.131283","48.722277",412],["21.131476","48.721374",409.6],["21.131376","48.720865",409.2],["21.130725","48.720402",411],["21.130075","48.720213",412.6],["21.129384","48.719667",407.8],["21.129303","48.719306",404.8],["21.130467","48.719725",399],["21.131259","48.719689",394],["21.13281","48.719432",383.6],["21.133949","48.719417",375.2],["21.135218","48.719259",367.2],["21.135693","48.718771",360.4],["21.13555","48.718312",355],["21.135342","48.717941",350],["21.136371","48.717336",345.4],["21.138289","48.71589",340.4],["21.139786","48.714943",339.4],["21.141305","48.713791",336.4],["21.143274","48.712238",333.4],["21.14503","48.711352",332],["21.146604","48.711038",330.6],["21.148735","48.710572",331],["21.149578","48.709994",333.6],["21.151082","48.709016",332.8],["21.152189","48.709293",330.4],["21.153027","48.709337",334.2],["21.153696","48.708855",340.8],["21.154074","48.708052",348],["21.154753","48.706089",338.2],["21.155365","48.705306",334.6],["21.158934","48.702705",331.8],["21.16113","48.700356",330],["21.162376","48.699166",327.4]]}},{"type":"Feature","properties":{"type":99,"segment":"23479","segmentName":"Hylov-Mala Ida","segmentDistance":"D\u013a\u017eka: 8.70 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -2.2 %<\/b>","segmentNameHref":"hylov-mala-ida"},"geometry":{"type":"LineString","coordinates":[["21.102016","48.729264",471.4],["21.102016","48.729264",471.4],["21.103589","48.729275",466],["21.105823","48.729703",459.6],["21.108699","48.729681",459.2],["21.113107","48.729328",461.4],["21.115561","48.728748",462],["21.123162","48.726278",456.2],["21.125893","48.725402",452.2],["21.127307","48.725035",446.6],["21.128717","48.72498",440.2],["21.129624","48.725044",431.2],["21.130357","48.724619",425.2],["21.131602","48.724274",419.4],["21.131803","48.723934",417.2],["21.131712","48.723427",413.6],["21.131291","48.722954",411.8],["21.131283","48.722277",412],["21.131476","48.721374",409.6],["21.131376","48.720865",409.2],["21.130725","48.720402",411],["21.130075","48.720213",412.6],["21.129384","48.719667",407.8],["21.129303","48.719306",404.8],["21.130467","48.719725",399],["21.131259","48.719689",394],["21.13281","48.719432",383.6],["21.133949","48.719417",375.2],["21.135218","48.719259",367.2],["21.135693","48.718771",360.4],["21.13555","48.718312",355],["21.135342","48.717941",350],["21.136371","48.717336",345.4],["21.138289","48.71589",340.4],["21.139786","48.714943",339.4],["21.141305","48.713791",336.4],["21.143274","48.712238",333.4],["21.14503","48.711352",332],["21.146604","48.711038",330.6],["21.148735","48.710572",331],["21.149578","48.709994",333.6],["21.151082","48.709016",332.8],["21.152189","48.709293",330.4],["21.153027","48.709337",334.2],["21.153696","48.708855",340.8],["21.154074","48.708052",348],["21.154753","48.706089",338.2],["21.155365","48.705306",334.6],["21.158934","48.702705",331.8],["21.16113","48.700356",330],["21.162376","48.699166",327.4],["21.162898","48.698076",323.6],["21.163264","48.697645",318.2],["21.164594","48.696697",315.2],["21.165208","48.695976",318.8],["21.165717","48.693996",319.4],["21.166287","48.692343",317.4],["21.166731","48.691665",316.2],["21.167423","48.690789",314.4],["21.166948","48.689936",311.2],["21.166749","48.688688",306.2],["21.167128","48.687098",301.4],["21.167327","48.685383",296.4],["21.168018","48.682613",289.4]]}},{"type":"Feature","properties":{"type":99,"segment":"22693","segmentName":"Hylov 1 smer Z.Idka","segmentDistance":"D\u013a\u017eka: 1.63 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.9 %<\/b>","segmentNameHref":"hylov-1-smer-zidka"},"geometry":{"type":"LineString","coordinates":[["21.103589","48.729275",466],["21.103589","48.729275",466],["21.105823","48.729703",459.6],["21.108699","48.729681",459.2],["21.113107","48.729328",461.4],["21.115561","48.728748",462],["21.123162","48.726278",456.2]]}},{"type":"Feature","properties":{"type":99,"segment":"23483","segmentName":"Hylov-Lanovka KH","segmentDistance":"D\u013a\u017eka: 15.22 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3.2 %<\/b>","segmentNameHref":"hylov-lanovka-kh"},"geometry":{"type":"LineString","coordinates":[["21.123162","48.726278",456.2],["21.123162","48.726278",456.2],["21.125893","48.725402",452.2],["21.127307","48.725035",446.6],["21.128717","48.72498",440.2],["21.129624","48.725044",431.2],["21.130357","48.724619",425.2],["21.131602","48.724274",419.4],["21.131803","48.723934",417.2],["21.131712","48.723427",413.6],["21.131291","48.722954",411.8],["21.131283","48.722277",412],["21.131476","48.721374",409.6],["21.131376","48.720865",409.2],["21.130725","48.720402",411],["21.130075","48.720213",412.6],["21.129384","48.719667",407.8],["21.129303","48.719306",404.8],["21.130467","48.719725",399],["21.131259","48.719689",394],["21.13281","48.719432",383.6],["21.133949","48.719417",375.2],["21.135218","48.719259",367.2],["21.135693","48.718771",360.4],["21.13555","48.718312",355],["21.135342","48.717941",350],["21.136371","48.717336",345.4],["21.138289","48.71589",340.4],["21.139786","48.714943",339.4],["21.141305","48.713791",336.4],["21.143274","48.712238",333.4],["21.14503","48.711352",332],["21.146604","48.711038",330.6],["21.148735","48.710572",331],["21.149578","48.709994",333.6],["21.151082","48.709016",332.8],["21.152189","48.709293",330.4],["21.153027","48.709337",334.2],["21.153696","48.708855",340.8],["21.154074","48.708052",348],["21.154753","48.706089",338.2],["21.155365","48.705306",334.6],["21.158934","48.702705",331.8],["21.16113","48.700356",330],["21.162376","48.699166",327.4],["21.162898","48.698076",323.6],["21.163264","48.697645",318.2],["21.164594","48.696697",315.2],["21.165208","48.695976",318.8],["21.165717","48.693996",319.4],["21.166287","48.692343",317.4],["21.166731","48.691665",316.2],["21.167423","48.690789",314.4],["21.166948","48.689936",311.2],["21.166749","48.688688",306.2],["21.167128","48.687098",301.4],["21.167327","48.685383",296.4],["21.168018","48.682613",289.4],["21.167542","48.680923",288.2],["21.16784","48.679932",286.4],["21.168303","48.678791",285],["21.169191","48.678711",284.8],["21.17088","48.678978",285.4],["21.171362","48.679074",286.8],["21.171307","48.679561",289.8],["21.171087","48.680457",290.8],["21.170743","48.680562",290.8]]}},{"type":"Feature","properties":{"type":99,"segment":"23480","segmentName":"Horn\u00fd Bukovec-Dolny Bukovec","segmentDistance":"D\u013a\u017eka: 3.58 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -2.3 %<\/b>","segmentNameHref":"horny-bukovec-dolny-bukovec"},"geometry":{"type":"LineString","coordinates":[["21.131803","48.723934",417.2],["21.131803","48.723934",417.2],["21.131712","48.723427",413.6],["21.131291","48.722954",411.8],["21.131283","48.722277",412],["21.131476","48.721374",409.6],["21.131376","48.720865",409.2],["21.130725","48.720402",411],["21.130075","48.720213",412.6],["21.129384","48.719667",407.8],["21.129303","48.719306",404.8],["21.130467","48.719725",399],["21.131259","48.719689",394],["21.13281","48.719432",383.6],["21.133949","48.719417",375.2],["21.135218","48.719259",367.2],["21.135693","48.718771",360.4],["21.13555","48.718312",355],["21.135342","48.717941",350],["21.136371","48.717336",345.4],["21.138289","48.71589",340.4],["21.139786","48.714943",339.4],["21.141305","48.713791",336.4],["21.143274","48.712238",333.4],["21.14503","48.711352",332],["21.146604","48.711038",330.6],["21.148735","48.710572",331],["21.149578","48.709994",333.6],["21.151082","48.709016",332.8],["21.152189","48.709293",330.4],["21.153027","48.709337",334.2],["21.153696","48.708855",340.8],["21.154074","48.708052",348],["21.154753","48.706089",338.2],["21.155365","48.705306",334.6],["21.158934","48.702705",331.8],["21.16113","48.700356",330],["21.162376","48.699166",327.4]]}},{"type":"Feature","properties":{"type":99,"segment":"526","segmentName":"BUKOVEC-HYLOV","segmentDistance":"D\u013a\u017eka: 4.76 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.7 %<\/b>","segmentNameHref":"bukovec-hylov"},"geometry":{"type":"LineString","coordinates":[["21.149578","48.709994",333.6],["21.149578","48.709994",333.6],["21.151082","48.709016",332.8],["21.152189","48.709293",330.4],["21.153027","48.709337",334.2],["21.153696","48.708855",340.8],["21.154074","48.708052",348],["21.154753","48.706089",338.2],["21.155365","48.705306",334.6],["21.158934","48.702705",331.8],["21.16113","48.700356",330],["21.162376","48.699166",327.4],["21.162898","48.698076",323.6],["21.163264","48.697645",318.2],["21.164594","48.696697",315.2],["21.165208","48.695976",318.8],["21.165717","48.693996",319.4],["21.166287","48.692343",317.4],["21.166731","48.691665",316.2],["21.167423","48.690789",314.4],["21.166948","48.689936",311.2],["21.166749","48.688688",306.2],["21.167128","48.687098",301.4],["21.167327","48.685383",296.4],["21.168018","48.682613",289.4],["21.167542","48.680923",288.2],["21.16784","48.679932",286.4],["21.168303","48.678791",285],["21.169191","48.678711",284.8],["21.17088","48.678978",285.4],["21.171362","48.679074",286.8],["21.171307","48.679561",289.8],["21.171087","48.680457",290.8],["21.170743","48.680562",290.8]]}},{"type":"Feature","properties":{"type":99,"segment":"54810","segmentName":"Mala Ida-Hylov","segmentDistance":"D\u013a\u017eka: 8.55 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2 %<\/b>","segmentNameHref":"mala-ida-hylov"},"geometry":{"type":"LineString","coordinates":[["21.16784","48.679932",286.4],["21.16784","48.679932",286.4],["21.168303","48.678791",285],["21.169191","48.678711",284.8],["21.17088","48.678978",285.4],["21.171362","48.679074",286.8],["21.171307","48.679561",289.8],["21.171087","48.680457",290.8],["21.170743","48.680562",290.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(); } }); function showPhotoOnMap() { if (typeof L !== "undefined"){ var photos = [{"lat":"48.778653333333","lng":"20.965008333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-0_61367913f2680.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-0_61367913f2680.jpg"},{"lat":"48.781086666667","lng":"20.972545","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-1_613679163eb61.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-1_613679163eb61.jpg"},{"lat":"48.781038333333","lng":"20.972495","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-2_613679189f088.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-2_613679189f088.jpg"},{"lat":"48.781016666667","lng":"20.972708333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-3_6136791abeac4.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-3_6136791abeac4.jpg"},{"lat":"48.781086666667","lng":"20.972503333333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-4_6136791c6d95b.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto736638-4_6136791c6d95b.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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTczNjYzOCZpdGVtTmFtZT1WJUMzJUJEamF6ZCslQzQlOEQuKzczNjYzOCZjb21tZW50VHlwZT1jb21tZW50JmF1dGhvclVzZXJJZD03Mzk2OTQmd2lkZ2V0SWQ9Y29tbWVudHMmYWxsb3dJbnNlcnQ9MSZhbGxvd1JlcGx5PTEmcmV0dXJuVXJsPWh0dHBzJTNBJTJGJTJGd3d3Lm10aGlrZXIuc2slMkZha3Rpdml0eSUyRjczNjYzOCUyRmJpY3lrZWwta29qc292a2EtcG8tbm9jbmVqLmh0bWwlM0ZvZCUzRDElMjZyaWRlX2lkJTNENzM2NjM4JnBhcnNlZFVybCU1QnNjaGVtZSU1RD1odHRwcyZwYXJzZWRVcmwlNUJob3N0JTVEPXd3dy5tdGhpa2VyLnNrJnBhcnNlZFVybCU1QnBhdGglNUQ9JTJGYWt0aXZpdHklMkY3MzY2MzglMkZiaWN5a2VsLWtvanNvdmthLXBvLW5vY25lai5odG1sJnBhcnNlZFVybCU1QnF1ZXJ5JTVEPW9kJTNEMSUyNnJpZGVfaWQlM0Q3MzY2MzgmaW5jbHVkZUNvbW1lbnRJZD0w|" + 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"; }); }); }); -->