favorite comment 0
thumb_up0thumb_down

directions_bikeBeckov

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ť
95,3 km
schedule Čas
02:56:06
landscape Nastúpané
746 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 32,5 km/h 63,4 km/h
Výkon 225 W 654 W
Kadencia 77 rpm -
Tepová frekvencia 154 bpm 190 bpm
Energetický výdaj 2 349 kcal

cloudPodmienky

Priemerná teplota 19 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike Morning Ride

trending_up 11,0 km
schedule 00:21:48
landscape 73 m
thumb_up0thumb_down

directions_bike CTK tour

trending_up 49,8 km
schedule 01:26:37
landscape 450 m
thumb_up0thumb_down

directions_bike Lunch Ride

trending_up 10,9 km
schedule 00:21:49
landscape 96 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 Banka","segmentDistance":"D\u013a\u017eka: 3.28 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -5.7 %<\/b>","segmentNameHref":"downhill-havran-%3E-banka"},"geometry":{"type":"LineString","coordinates":[["17.877093","48.565538",388.4],["17.877093","48.565538",388.4],["17.876599","48.56589",386.9],["17.874899","48.565973",379.1],["17.873843","48.565835",374.3],["17.873406","48.565518",371.6],["17.872937","48.564818",367.2],["17.872352","48.564239",363.3],["17.871745","48.564113",360.7],["17.871017","48.56434",357.2],["17.870604","48.56478",353.9],["17.870079","48.565869",346.9],["17.869359","48.566214",343.2],["17.868382","48.566287",339.6],["17.867393","48.566097",335.6],["17.866517","48.565563",330.9],["17.865744","48.56479",325.6],["17.865349","48.564861",322.7],["17.864985","48.565918",315.5],["17.864925","48.56655",311.4],["17.865096","48.566916",307.6],["17.86473","48.567053",305],["17.864075","48.566875",301.6],["17.863455","48.566856",298.5],["17.862453","48.567222",293.2],["17.861807","48.567382",290.1],["17.860916","48.56737",286.2],["17.860283","48.567144",283.3],["17.859682","48.566742",280.2],["17.859048","48.566813",276.2],["17.858397","48.567146",272],["17.857642","48.567934",265],["17.856081","48.569247",252.8],["17.854945","48.570181",245],["17.854022","48.570577",240.6],["17.853013","48.571112",235.8],["17.852179","48.571282",234],["17.851514","48.57133",231.9],["17.851501","48.571856",228.1],["17.851601","48.572704",222.2],["17.851474","48.573623",215.6],["17.851346","48.575227",204.8],["17.851629","48.577027",193.8],["17.852406","48.578879",183.9],["17.853064","48.579753",180.3],["17.852264","48.581182",177.4],["17.850747","48.581735",176.4],["17.850204","48.582065",177.4],["17.849355","48.583258",173.6],["17.84841","48.583924",166],["17.84811","48.584321",163.8],["17.849396","48.584647",163.5],["17.851791","48.585231",163.7],["17.852483","48.585481",163.4],["17.85511","48.586947",161.8],["17.856444","48.588246",161.6],["17.856598","48.588906",161.4],["17.855589","48.590373",161],["17.855171","48.590985",161.3]]}},{"type":"Feature","properties":{"type":99,"segment":"24142","segmentName":"Havran - Banka Obecny urad","segmentDistance":"D\u013a\u017eka: 4.02 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -5.4 %<\/b>","segmentNameHref":"havran-banka-obecny-urad"},"geometry":{"type":"LineString","coordinates":[["17.877093","48.565538",388.4],["17.877093","48.565538",388.4],["17.876599","48.56589",386.9],["17.874899","48.565973",379.1],["17.873843","48.565835",374.3],["17.873406","48.565518",371.6],["17.872937","48.564818",367.2],["17.872352","48.564239",363.3],["17.871745","48.564113",360.7],["17.871017","48.56434",357.2],["17.870604","48.56478",353.9],["17.870079","48.565869",346.9],["17.869359","48.566214",343.2],["17.868382","48.566287",339.6],["17.867393","48.566097",335.6],["17.866517","48.565563",330.9],["17.865744","48.56479",325.6],["17.865349","48.564861",322.7],["17.864985","48.565918",315.5],["17.864925","48.56655",311.4],["17.865096","48.566916",307.6],["17.86473","48.567053",305],["17.864075","48.566875",301.6],["17.863455","48.566856",298.5],["17.862453","48.567222",293.2],["17.861807","48.567382",290.1],["17.860916","48.56737",286.2],["17.860283","48.567144",283.3],["17.859682","48.566742",280.2],["17.859048","48.566813",276.2],["17.858397","48.567146",272],["17.857642","48.567934",265],["17.856081","48.569247",252.8],["17.854945","48.570181",245],["17.854022","48.570577",240.6],["17.853013","48.571112",235.8],["17.852179","48.571282",234],["17.851514","48.57133",231.9],["17.851501","48.571856",228.1],["17.851601","48.572704",222.2],["17.851474","48.573623",215.6],["17.851346","48.575227",204.8],["17.851629","48.577027",193.8],["17.852406","48.578879",183.9],["17.853064","48.579753",180.3],["17.852264","48.581182",177.4],["17.850747","48.581735",176.4]]}},{"type":"Feature","properties":{"type":99,"segment":"3251","segmentName":"downhill havran-\u010dertova pec","segmentDistance":"D\u013a\u017eka: 3.68 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -4.3 %<\/b>","segmentNameHref":"downhill-havran-certova-pec"},"geometry":{"type":"LineString","coordinates":[["17.877093","48.565538",388.4],["17.877093","48.565538",388.4],["17.876599","48.56589",386.9],["17.874899","48.565973",379.1],["17.873843","48.565835",374.3],["17.873406","48.565518",371.6],["17.872937","48.564818",367.2],["17.872352","48.564239",363.3],["17.871745","48.564113",360.7],["17.871017","48.56434",357.2],["17.870604","48.56478",353.9],["17.870079","48.565869",346.9],["17.869359","48.566214",343.2],["17.868382","48.566287",339.6],["17.867393","48.566097",335.6],["17.866517","48.565563",330.9],["17.865744","48.56479",325.6],["17.865349","48.564861",322.7],["17.864985","48.565918",315.5],["17.864925","48.56655",311.4],["17.865096","48.566916",307.6],["17.86473","48.567053",305],["17.864075","48.566875",301.6],["17.863455","48.566856",298.5],["17.862453","48.567222",293.2],["17.861807","48.567382",290.1],["17.860916","48.56737",286.2],["17.860283","48.567144",283.3],["17.859682","48.566742",280.2],["17.859048","48.566813",276.2],["17.858397","48.567146",272],["17.857642","48.567934",265],["17.856081","48.569247",252.8],["17.854945","48.570181",245],["17.854022","48.570577",240.6],["17.853013","48.571112",235.8],["17.852179","48.571282",234],["17.851514","48.57133",231.9],["17.851501","48.571856",228.1],["17.851601","48.572704",222.2],["17.851474","48.573623",215.6],["17.851346","48.575227",204.8],["17.851629","48.577027",193.8],["17.852406","48.578879",183.9],["17.853064","48.579753",180.3],["17.852264","48.581182",177.4],["17.850747","48.581735",176.4],["17.850204","48.582065",177.4],["17.849355","48.583258",173.6],["17.84841","48.583924",166],["17.84811","48.584321",163.8],["17.849396","48.584647",163.5],["17.851791","48.585231",163.7],["17.852483","48.585481",163.4],["17.85511","48.586947",161.8],["17.856444","48.588246",161.6],["17.856598","48.588906",161.4],["17.855589","48.590373",161],["17.855171","48.590985",161.3],["17.855291","48.59131",161.4],["17.858256","48.593461",163],["17.861984","48.596222",164.3],["17.862333","48.596906",164.6]]}},{"type":"Feature","properties":{"type":99,"segment":"20784","segmentName":"Kostol Banka - Havranpub","segmentDistance":"D\u013a\u017eka: 4.18 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.2 %<\/b>","segmentNameHref":"kostol-banka-havranpub"},"geometry":{"type":"LineString","coordinates":[["17.849355","48.583258",173.6],["17.849355","48.583258",173.6],["17.84841","48.583924",166],["17.84811","48.584321",163.8],["17.849396","48.584647",163.5],["17.851791","48.585231",163.7],["17.852483","48.585481",163.4],["17.85511","48.586947",161.8],["17.856444","48.588246",161.6],["17.856598","48.588906",161.4],["17.855589","48.590373",161],["17.855171","48.590985",161.3],["17.855291","48.59131",161.4],["17.858256","48.593461",163],["17.861984","48.596222",164.3],["17.862333","48.596906",164.6],["17.862579","48.598366",165.2],["17.862475","48.598681",165.3],["17.861536","48.599795",165.4],["17.861232","48.600352",165.5],["17.861293","48.600953",165.5],["17.861834","48.601785",167.5],["17.862069","48.602455",170.5],["17.862068","48.603594",171],["17.862632","48.604375",167.8],["17.863633","48.605149",165.4],["17.865329","48.605964",163.6],["17.865775","48.60643",163.6],["17.866015","48.607136",163.4],["17.865913","48.607673",163.3],["17.86513","48.608648",163.2],["17.864746","48.609227",163.2],["17.864684","48.609762",163.2],["17.865065","48.611079",163.5],["17.867092","48.614493",164.2],["17.867961","48.615934",164.4],["17.869059","48.61763",165.4]]}},{"type":"Feature","properties":{"type":99,"segment":"20782","segmentName":"Banka - Havran new","segmentDistance":"D\u013a\u017eka: 4.29 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.2 %<\/b>","segmentNameHref":"banka-havran-new"},"geometry":{"type":"LineString","coordinates":[["17.84811","48.584321",163.8],["17.84811","48.584321",163.8],["17.849396","48.584647",163.5],["17.851791","48.585231",163.7],["17.852483","48.585481",163.4],["17.85511","48.586947",161.8],["17.856444","48.588246",161.6],["17.856598","48.588906",161.4],["17.855589","48.590373",161],["17.855171","48.590985",161.3],["17.855291","48.59131",161.4],["17.858256","48.593461",163],["17.861984","48.596222",164.3],["17.862333","48.596906",164.6],["17.862579","48.598366",165.2],["17.862475","48.598681",165.3],["17.861536","48.599795",165.4],["17.861232","48.600352",165.5],["17.861293","48.600953",165.5],["17.861834","48.601785",167.5],["17.862069","48.602455",170.5],["17.862068","48.603594",171],["17.862632","48.604375",167.8],["17.863633","48.605149",165.4],["17.865329","48.605964",163.6],["17.865775","48.60643",163.6],["17.866015","48.607136",163.4],["17.865913","48.607673",163.3],["17.86513","48.608648",163.2],["17.864746","48.609227",163.2],["17.864684","48.609762",163.2],["17.865065","48.611079",163.5],["17.867092","48.614493",164.2],["17.867961","48.615934",164.4],["17.869059","48.61763",165.4]]}},{"type":"Feature","properties":{"type":99,"segment":"86485","segmentName":"Moravany rovinka Hubina","segmentDistance":"D\u013a\u017eka: 1.50 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.2 %<\/b>","segmentNameHref":"moravany-rovinka-hubina"},"geometry":{"type":"LineString","coordinates":[["17.865913","48.607673",163.3],["17.865913","48.607673",163.3],["17.86513","48.608648",163.2],["17.864746","48.609227",163.2],["17.864684","48.609762",163.2],["17.865065","48.611079",163.5],["17.867092","48.614493",164.2],["17.867961","48.615934",164.4],["17.869059","48.61763",165.4]]}},{"type":"Feature","properties":{"type":99,"segment":"2","segmentName":"Moravansky sprint","segmentDistance":"D\u013a\u017eka: 649.10 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.2 %<\/b>","segmentNameHref":"moravansky-sprint"},"geometry":{"type":"LineString","coordinates":[["17.865913","48.607673",163.3],["17.865913","48.607673",163.3],["17.86513","48.608648",163.2],["17.864746","48.609227",163.2],["17.864684","48.609762",163.2],["17.865065","48.611079",163.5]]}},{"type":"Feature","properties":{"type":99,"segment":"1","segmentName":"Kriz Hubina - cedula Moravany","segmentDistance":"D\u013a\u017eka: 1.34 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.2 %<\/b>","segmentNameHref":"kriz-hubina-cedula-moravany"},"geometry":{"type":"LineString","coordinates":[["17.870597","48.620837",166.2],["17.870597","48.620837",166.2],["17.870662","48.621637",166],["17.870162","48.625162",165.8],["17.869533","48.626141",165.8],["17.867816","48.628727",166],["17.867361","48.62998",166.2],["17.867114","48.63175",170.9]]}},{"type":"Feature","properties":{"type":99,"segment":"1661","segmentName":"Horka Segment (od Hradku)","segmentDistance":"D\u013a\u017eka: 616.30 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.7 %<\/b>","segmentNameHref":"horka-segment-od-hradku"},"geometry":{"type":"LineString","coordinates":[["17.884363","48.717529",181.6],["17.884363","48.717529",181.6],["17.887241","48.717645",189.4],["17.891174","48.718028",193.2]]}},{"type":"Feature","properties":{"type":99,"segment":"4493","segmentName":"H\u00f4rka - Hr\u00e1dok","segmentDistance":"D\u013a\u017eka: 2.15 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.5 %<\/b>","segmentNameHref":"horka-hradok"},"geometry":{"type":"LineString","coordinates":[["17.884363","48.717529",181.6],["17.884363","48.717529",181.6],["17.887241","48.717645",189.4],["17.891174","48.718028",193.2],["17.892709","48.718362",196.4],["17.893302","48.718135",196.8],["17.893754","48.718051",197],["17.89402","48.718277",197],["17.893595","48.718738",197],["17.893416","48.719195",196.8],["17.893952","48.720404",195.4],["17.894256","48.721267",194],["17.894537","48.723062",187.3],["17.894527","48.724083",184],["17.893881","48.726257",181.8],["17.893863","48.728647",183.1],["17.893771","48.728982",183.1],["17.893363","48.729183",183.1],["17.889479","48.729248",181.2],["17.889068","48.729455",180.9],["17.888536","48.731138",180.7],["17.888229","48.733229",180.9],["17.887339","48.734998",180.8]]}},{"type":"Feature","properties":{"type":99,"segment":"3599","segmentName":"Od Tabule Rakoluby","segmentDistance":"D\u013a\u017eka: 737.20 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"od-tabule-rakoluby"},"geometry":{"type":"LineString","coordinates":[["17.888201","48.763647",188.2],["17.888201","48.763647",188.2],["17.889188","48.766574",187.2]]}},{"type":"Feature","properties":{"type":99,"segment":"2196","segmentName":"Po Tabu\u013eu Rako\u013euby","segmentDistance":"D\u013a\u017eka: 733.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.2 %<\/b>","segmentNameHref":"po-tabulu-rakoluby"},"geometry":{"type":"LineString","coordinates":[["17.890627","48.770737",187.7],["17.890627","48.770737",187.7],["17.891784","48.774106",189.3],["17.891545","48.775611",188.8],["17.891543","48.776426",188.8]]}},{"type":"Feature","properties":{"type":99,"segment":"3598","segmentName":"Rakoluby-Beckov","segmentDistance":"D\u013a\u017eka: 2.31 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.1 %<\/b>","segmentNameHref":"rakoluby-beckov"},"geometry":{"type":"LineString","coordinates":[["17.887981","48.762375",187.2],["17.887981","48.762375",187.2],["17.887645","48.761349",186.6],["17.887147","48.760178",186.3],["17.886827","48.758811",186.1],["17.886596","48.757319",185.7],["17.886636","48.756092",185.6],["17.887107","48.75539",185.4],["17.887224","48.754913",185.3],["17.886987","48.753853",185.2],["17.887042","48.751831",185.2],["17.88738","48.750616",185],["17.888046","48.749879",184.8],["17.888593","48.74889",185.1],["17.888572","48.747479",184.1],["17.888402","48.746397",183.6],["17.887881","48.745931",183.4],["17.887481","48.744906",183.3],["17.886675","48.743772",183.1],["17.886116","48.742908",183],["17.885846","48.741691",182.8]]}},{"type":"Feature","properties":{"type":99,"segment":"16479","segmentName":"Rakoluby-Banka (TT)","segmentDistance":"D\u013a\u017eka: 22.62 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"rakoluby-banka-tt"},"geometry":{"type":"LineString","coordinates":[["17.887147","48.760178",186.3],["17.887147","48.760178",186.3],["17.886827","48.758811",186.1],["17.886596","48.757319",185.7],["17.886636","48.756092",185.6],["17.887107","48.75539",185.4],["17.887224","48.754913",185.3],["17.886987","48.753853",185.2],["17.887042","48.751831",185.2],["17.88738","48.750616",185],["17.888046","48.749879",184.8],["17.888593","48.74889",185.1],["17.888572","48.747479",184.1],["17.888402","48.746397",183.6],["17.887881","48.745931",183.4],["17.887481","48.744906",183.3],["17.886675","48.743772",183.1],["17.886116","48.742908",183],["17.885846","48.741691",182.8],["17.886326","48.740111",182.3],["17.886839","48.73815",181.5],["17.88707","48.735782",180.9],["17.887744","48.733777",180.8],["17.888252","48.733038",181],["17.888385","48.732123",180.9],["17.888571","48.730674",180.7],["17.889158","48.729279",181.1],["17.890084","48.729206",181.4],["17.8935","48.729086",183.2],["17.893805","48.728785",183.1],["17.893769","48.726767",181.7],["17.894172","48.725121",182.6],["17.894488","48.723645",185.1],["17.894263","48.722188",191.3],["17.894052","48.720872",194.8],["17.893319","48.71937",196.7],["17.893306","48.718974",196.9],["17.893782","48.718415",197],["17.893789","48.718122",197],["17.893366","48.718123",196.8],["17.892542","48.718388",196.3],["17.890555","48.717969",192.3],["17.884785","48.717581",182.2],["17.88373","48.717374",180.5],["17.883333","48.717071",179.5],["17.883127","48.715719",177.3],["17.882685","48.71219",176],["17.882065","48.70748",175.5],["17.881179","48.700973",174.9],["17.880621","48.696997",175.3],["17.88056","48.695404",174.1],["17.879668","48.689751",173.3],["17.878961","48.687653",173.3],["17.877397","48.684142",172.9],["17.875863","48.680217",172.8],["17.87566","48.679443",172.7],["17.875621","48.676938",173.6],["17.875517","48.675336",174.2],["17.875309","48.672562",172],["17.875079","48.671692",171.5],["17.873905","48.670053",171.5],["17.873649","48.669416",171.7],["17.87366","48.668556",171.7],["17.873989","48.667815",171.5],["17.874731","48.666995",171.3],["17.876576","48.66506",173.2],["17.876908","48.664193",173.5],["17.876998","48.662263",172.7],["17.877419","48.660109",173.7],["17.878027","48.658353",173.4],["17.879618","48.654026",170.4],["17.880028","48.653341",170.7],["17.881652","48.651698",172],["17.882065","48.650942",172.6],["17.882142","48.650225",173.2],["17.881862","48.649132",174.6],["17.881348","48.648559",175.2],["17.880526","48.648262",174.1],["17.877192","48.64783",172.5],["17.87668","48.647551",172.8],["17.875264","48.646541",174.3],["17.872207","48.64521",171.6],["17.86938","48.644495",170.2],["17.865542","48.643663",171.2],["17.864456","48.643113",170.9],["17.863733","48.642549",170.7],["17.863069","48.641635",170.3],["17.862841","48.640905",170.2],["17.862941","48.639499",171],["17.86339","48.638207",172],["17.864217","48.637119",172.2],["17.865956","48.635269",172.2],["17.86621","48.634716",171.2],["17.867051","48.631736",170.9],["17.867274","48.630079",166.3],["17.867855","48.628558",166],["17.868893","48.62683",165.8],["17.870063","48.625172",165.8],["17.87054","48.621914",165.9],["17.870535","48.620931",166.2],["17.869671","48.619033",166],["17.867781","48.615742",164.4],["17.864952","48.611066",163.5],["17.864565","48.609673",163.2],["17.864642","48.609177",163.2],["17.865006","48.608627",163.2],["17.865786","48.607644",163.3],["17.865888","48.607141",163.4],["17.865716","48.606544",163.6],["17.865199","48.60595",163.6],["17.86392","48.605323",164.7],["17.862972","48.604795",166.4],["17.86206","48.603832",170.3],["17.86189","48.603205",172],["17.861952","48.602406",170.3],["17.861768","48.601833",167.6],["17.8612","48.600953",165.5],["17.861148","48.60031",165.5],["17.8616","48.599558",165.4],["17.862321","48.598692",165.3],["17.86245","48.598306",165.2],["17.862368","48.597616",165],["17.862028","48.596421",164.4],["17.861502","48.595902",164],["17.856802","48.592495",162.2],["17.855079","48.591209",161.9],["17.855045","48.590842",161.8],["17.856199","48.589386",161.1],["17.856441","48.588899",161.3],["17.856389","48.588408",161.3],["17.856015","48.587889",161.3],["17.854662","48.586717",161.8],["17.851685","48.585243",163.7],["17.84903","48.58458",163.4]]}},{"type":"Feature","properties":{"type":99,"segment":"4492","segmentName":"Brdok v Horke","segmentDistance":"D\u013a\u017eka: 484.60 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.3 %<\/b>","segmentNameHref":"brdok-v-horke"},"geometry":{"type":"LineString","coordinates":[["17.894172","48.725121",182.6],["17.894172","48.725121",182.6],["17.894488","48.723645",185.1],["17.894263","48.722188",191.3],["17.894052","48.720872",194.8]]}},{"type":"Feature","properties":{"type":99,"segment":"6727","segmentName":"modrovka z bezovca - moravany tabula","segmentDistance":"D\u013a\u017eka: 5.33 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.2 %<\/b>","segmentNameHref":"modrovka-z-bezovca-moravany-tabula"},"geometry":{"type":"LineString","coordinates":[["17.880526","48.648262",174.1],["17.880526","48.648262",174.1],["17.877192","48.64783",172.5],["17.87668","48.647551",172.8],["17.875264","48.646541",174.3],["17.872207","48.64521",171.6],["17.86938","48.644495",170.2],["17.865542","48.643663",171.2],["17.864456","48.643113",170.9],["17.863733","48.642549",170.7],["17.863069","48.641635",170.3],["17.862841","48.640905",170.2],["17.862941","48.639499",171],["17.86339","48.638207",172],["17.864217","48.637119",172.2],["17.865956","48.635269",172.2],["17.86621","48.634716",171.2],["17.867051","48.631736",170.9],["17.867274","48.630079",166.3],["17.867855","48.628558",166],["17.868893","48.62683",165.8],["17.870063","48.625172",165.8],["17.87054","48.621914",165.9],["17.870535","48.620931",166.2],["17.869671","48.619033",166],["17.867781","48.615742",164.4],["17.864952","48.611066",163.5],["17.864565","48.609673",163.2]]}},{"type":"Feature","properties":{"type":99,"segment":"7855","segmentName":"Modrova - Banka","segmentDistance":"D\u013a\u017eka: 8.46 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"modrova-banka"},"geometry":{"type":"LineString","coordinates":[["17.87668","48.647551",172.8],["17.87668","48.647551",172.8],["17.875264","48.646541",174.3],["17.872207","48.64521",171.6],["17.86938","48.644495",170.2],["17.865542","48.643663",171.2],["17.864456","48.643113",170.9],["17.863733","48.642549",170.7],["17.863069","48.641635",170.3],["17.862841","48.640905",170.2],["17.862941","48.639499",171],["17.86339","48.638207",172],["17.864217","48.637119",172.2],["17.865956","48.635269",172.2],["17.86621","48.634716",171.2],["17.867051","48.631736",170.9],["17.867274","48.630079",166.3],["17.867855","48.628558",166],["17.868893","48.62683",165.8],["17.870063","48.625172",165.8],["17.87054","48.621914",165.9],["17.870535","48.620931",166.2],["17.869671","48.619033",166],["17.867781","48.615742",164.4],["17.864952","48.611066",163.5],["17.864565","48.609673",163.2],["17.864642","48.609177",163.2],["17.865006","48.608627",163.2],["17.865786","48.607644",163.3],["17.865888","48.607141",163.4],["17.865716","48.606544",163.6],["17.865199","48.60595",163.6],["17.86392","48.605323",164.7],["17.862972","48.604795",166.4],["17.86206","48.603832",170.3],["17.86189","48.603205",172],["17.861952","48.602406",170.3],["17.861768","48.601833",167.6],["17.8612","48.600953",165.5],["17.861148","48.60031",165.5],["17.8616","48.599558",165.4],["17.862321","48.598692",165.3],["17.86245","48.598306",165.2],["17.862368","48.597616",165],["17.862028","48.596421",164.4],["17.861502","48.595902",164],["17.856802","48.592495",162.2],["17.855079","48.591209",161.9],["17.855045","48.590842",161.8],["17.856199","48.589386",161.1],["17.856441","48.588899",161.3],["17.856389","48.588408",161.3],["17.856015","48.587889",161.3],["17.854662","48.586717",161.8],["17.851685","48.585243",163.7]]}},{"type":"Feature","properties":{"type":99,"segment":"19415","segmentName":"Banka - Havran","segmentDistance":"D\u013a\u017eka: 4.32 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.3 %<\/b>","segmentNameHref":"banka-havran"},"geometry":{"type":"LineString","coordinates":[["17.847975","48.58442",163.7],["17.847975","48.58442",163.7],["17.847981","48.584244",164],["17.848559","48.583743",167.5],["17.849452","48.5831",174.9],["17.850116","48.582126",177.5],["17.850705","48.581738",176.4],["17.852123","48.581291",177.4],["17.852597","48.580712",177.7],["17.852993","48.579942",179.7],["17.852866","48.579621",180.8],["17.852335","48.578939",183.7],["17.851581","48.57722",192.7],["17.851337","48.576186",199],["17.851278","48.574647",208.6],["17.851462","48.573374",217.2],["17.851594","48.572777",221.5],["17.85143","48.572331",224.5],["17.851508","48.571842",228],["17.851431","48.571394",231.1],["17.851615","48.571208",232.7],["17.852399","48.571203",234.5],["17.85297","48.571062",235.7],["17.853956","48.570494",240.7],["17.855061","48.570018",245.9],["17.855902","48.569268",252.1],["17.856509","48.568733",256.7],["17.857617","48.567908",264.9],["17.858552","48.567007",273],["17.859345","48.566683",278],["17.859819","48.566695",280.6],["17.860516","48.567212",284.4],["17.861537","48.567376",289],["17.862326","48.56725",292.6],["17.86338","48.566818",298.3],["17.864214","48.566852",302.3],["17.864873","48.567006",305.8],["17.865067","48.566875",307.9],["17.864887","48.566592",311],["17.864811","48.566283",313.2],["17.865235","48.565095",321],["17.865454","48.564691",323.9],["17.865898","48.564704",326],["17.866332","48.565278",329.5],["17.867293","48.566011",334.9],["17.86773","48.566152",336.9],["17.869256","48.566181",342.9],["17.869953","48.56589",346.4],["17.870295","48.565374",349.7],["17.870738","48.56471",354.2],["17.871243","48.564169",358.2],["17.871748","48.564048",360.5],["17.872446","48.56417",363.5],["17.873139","48.564933",368.5],["17.873636","48.565694",373.5],["17.874308","48.565905",376.6],["17.876253","48.565897",385.7]]}},{"type":"Feature","properties":{"type":99,"segment":"14076","segmentName":"Havran z Banky","segmentDistance":"D\u013a\u017eka: 4.02 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.3 %<\/b>","segmentNameHref":"havran-z-banky"},"geometry":{"type":"LineString","coordinates":[["17.852123","48.581291",177.4],["17.852123","48.581291",177.4],["17.852597","48.580712",177.7],["17.852993","48.579942",179.7],["17.852866","48.579621",180.8],["17.852335","48.578939",183.7],["17.851581","48.57722",192.7],["17.851337","48.576186",199],["17.851278","48.574647",208.6],["17.851462","48.573374",217.2],["17.851594","48.572777",221.5],["17.85143","48.572331",224.5],["17.851508","48.571842",228],["17.851431","48.571394",231.1],["17.851615","48.571208",232.7],["17.852399","48.571203",234.5],["17.85297","48.571062",235.7],["17.853956","48.570494",240.7],["17.855061","48.570018",245.9],["17.855902","48.569268",252.1],["17.856509","48.568733",256.7],["17.857617","48.567908",264.9],["17.858552","48.567007",273],["17.859345","48.566683",278],["17.859819","48.566695",280.6],["17.860516","48.567212",284.4],["17.861537","48.567376",289],["17.862326","48.56725",292.6],["17.86338","48.566818",298.3],["17.864214","48.566852",302.3],["17.864873","48.567006",305.8],["17.865067","48.566875",307.9],["17.864887","48.566592",311],["17.864811","48.566283",313.2],["17.865235","48.565095",321],["17.865454","48.564691",323.9],["17.865898","48.564704",326],["17.866332","48.565278",329.5],["17.867293","48.566011",334.9],["17.86773","48.566152",336.9],["17.869256","48.566181",342.9],["17.869953","48.56589",346.4],["17.870295","48.565374",349.7],["17.870738","48.56471",354.2],["17.871243","48.564169",358.2],["17.871748","48.564048",360.5],["17.872446","48.56417",363.5],["17.873139","48.564933",368.5],["17.873636","48.565694",373.5],["17.874308","48.565905",376.6],["17.876253","48.565897",385.7]]}},{"type":"Feature","properties":{"type":99,"segment":"3250","segmentName":"Havran","segmentDistance":"D\u013a\u017eka: 3.67 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.2 %<\/b>","segmentNameHref":"havran"},"geometry":{"type":"LineString","coordinates":[["17.914579","48.558666",228.4],["17.914579","48.558666",228.4],["17.915136","48.557335",226.2],["17.916127","48.556128",224.1],["17.91794","48.554784",222.5],["17.921382","48.55243",218.6],["17.923335","48.551746",221.3],["17.925617","48.551274",228],["17.927376","48.550594",230.6],["17.930738","48.548963",218.8],["17.933076","48.548308",218.2],["17.934698","48.547623",215.5],["17.936398","48.546926",205.5],["17.937455","48.546901",198.4],["17.939124","48.547172",193.8],["17.94292","48.548349",202.5],["17.945486","48.548683",213.6],["17.947451","48.549202",215.3],["17.952252","48.550543",208.8],["17.954412","48.550841",208.1],["17.95936","48.551191",208],["17.962806","48.551889",210.7]]}}] 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":"0","lng":"0","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto638989-0_60b7c07f31d79.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto638989-0_60b7c07f31d79.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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTYzODk4OSZpdGVtTmFtZT1WJUMzJUJEamF6ZCslQzQlOEQuKzYzODk4OSZjb21tZW50VHlwZT1jb21tZW50JmF1dGhvclVzZXJJZD05Mjc0MCZ3aWRnZXRJZD1jb21tZW50cyZhbGxvd0luc2VydD0xJmFsbG93UmVwbHk9MSZyZXR1cm5Vcmw9aHR0cHMlM0ElMkYlMkZ3d3cubXRoaWtlci5zayUyRmFrdGl2aXR5JTJGNjM4OTg5JTJGYmljeWtlbC1iZWNrb3YuaHRtbCZwYXJzZWRVcmwlNUJzY2hlbWUlNUQ9aHR0cHMmcGFyc2VkVXJsJTVCaG9zdCU1RD13d3cubXRoaWtlci5zayZwYXJzZWRVcmwlNUJwYXRoJTVEPSUyRmFrdGl2aXR5JTJGNjM4OTg5JTJGYmljeWtlbC1iZWNrb3YuaHRtbCZpbmNsdWRlQ29tbWVudElkPTA|" + 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"; }); }); }); -->