favorite comment 0
thumb_up0thumb_down

directions_bikeSeredmaraton 2023

Osobny ciel splneny 🚴🏻‍♂️

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ť
116 km
schedule Čas
03:50:31
landscape Nastúpané
1 139 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 30,3 km/h 75,2 km/h
Výkon 182 W -
Tepová frekvencia 161 bpm 183 bpm
Energetický výdaj 2 732 kcal

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike Morning Mountain Bike Ride

trending_up 21,4 km
schedule 01:10:02
landscape 526 m
thumb_up0thumb_down

directions_bike S manželkou

trending_up 36,3 km
schedule 02:10:41
landscape 667 m
thumb_up0thumb_down

directions_bike Afternoon Mountain Bike Ride

trending_up 18,9 km
schedule 00:44:58
landscape 37 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 Surianky","segmentDistance":"D\u013a\u017eka: 5.36 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.2 %<\/b>","segmentNameHref":"cakajovce-%3E-surianky"},"geometry":{"type":"LineString","coordinates":[["18.028746","48.371406",144.2],["18.028746","48.371406",144.2],["18.031632","48.38774",161.2],["18.030121","48.394629",159.9],["18.028808","48.397848",153.4],["18.027371","48.399704",155.5],["18.02702","48.402323",154],["18.025591","48.407138",154.4],["18.026864","48.412937",152.3],["18.025798","48.417208",156.3]]}},{"type":"Feature","properties":{"type":99,"segment":"2786","segmentName":"Cakajovce --> Horne Obdokovce","segmentDistance":"D\u013a\u017eka: 14.46 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.3 %<\/b>","segmentNameHref":"cakajovce-%3E-horne-obdokovce"},"geometry":{"type":"LineString","coordinates":[["18.028746","48.371406",144.2],["18.028746","48.371406",144.2],["18.031632","48.38774",161.2],["18.030121","48.394629",159.9],["18.028808","48.397848",153.4],["18.027371","48.399704",155.5],["18.02702","48.402323",154],["18.025591","48.407138",154.4],["18.026864","48.412937",152.3],["18.025798","48.417208",156.3],["18.022926","48.418526",152.9],["18.02301","48.421383",152.5],["18.021729","48.423383",155],["18.020475","48.424502",158.7],["18.018094","48.427023",169.7],["18.017059","48.429079",172.9],["18.017937","48.439263",170.7],["18.019545","48.447959",168.5],["18.020651","48.457976",176],["18.020306","48.460284",185.7],["18.022149","48.465243",171.8],["18.026839","48.476992",172.4],["18.038633","48.48911",174.1],["18.042578","48.493307",179.3],["18.045714","48.496242",177.7],["18.047037","48.496278",178.1],["18.047457","48.495673",178.7],["18.048798","48.494683",177.3],["18.049606","48.494638",176.2],["18.051905","48.495326",173.3],["18.053716","48.496738",173.2],["18.056636","48.499876",175.2]]}},{"type":"Feature","properties":{"type":99,"segment":"2789","segmentName":"\u0160urianky-Hrubo\u0148ovo","segmentDistance":"D\u013a\u017eka: 3.27 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.5 %<\/b>","segmentNameHref":"surianky-hrubonovo"},"geometry":{"type":"LineString","coordinates":[["18.020475","48.424502",158.7],["18.020475","48.424502",158.7],["18.018094","48.427023",169.7],["18.017059","48.429079",172.9],["18.017937","48.439263",170.7],["18.019545","48.447959",168.5]]}},{"type":"Feature","properties":{"type":99,"segment":"2790","segmentName":"Surianky --> Horne Obdokovce","segmentDistance":"D\u013a\u017eka: 8.01 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.1 %<\/b>","segmentNameHref":"surianky-%3E-horne-obdokovce"},"geometry":{"type":"LineString","coordinates":[["18.018094","48.427023",169.7],["18.018094","48.427023",169.7],["18.017059","48.429079",172.9],["18.017937","48.439263",170.7],["18.019545","48.447959",168.5],["18.020651","48.457976",176],["18.020306","48.460284",185.7],["18.022149","48.465243",171.8],["18.026839","48.476992",172.4],["18.038633","48.48911",174.1],["18.042578","48.493307",179.3],["18.045714","48.496242",177.7],["18.047037","48.496278",178.1],["18.047457","48.495673",178.7],["18.048798","48.494683",177.3],["18.049606","48.494638",176.2],["18.051905","48.495326",173.3]]}},{"type":"Feature","properties":{"type":99,"segment":"2791","segmentName":"bodok 1,2km","segmentDistance":"D\u013a\u017eka: 1.26 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.5 %<\/b>","segmentNameHref":"bodok-12km"},"geometry":{"type":"LineString","coordinates":[["18.064052","48.505959",180.3],["18.064052","48.505959",180.3],["18.069002","48.507385",205.1],["18.076442","48.506568",232.3]]}},{"type":"Feature","properties":{"type":99,"segment":"88788","segmentName":"downhill do Ludan\u00edc","segmentDistance":"D\u013a\u017eka: 855.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -7.5 %<\/b>","segmentNameHref":"downhill-do-ludanic"},"geometry":{"type":"LineString","coordinates":[["18.083627","48.507549",236.6],["18.083627","48.507549",236.6]]}},{"type":"Feature","properties":{"type":99,"segment":"1858","segmentName":"Chrabrany - sprint 800m","segmentDistance":"D\u013a\u017eka: 823.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.2 %<\/b>","segmentNameHref":"chrabrany-sprint-800m"},"geometry":{"type":"LineString","coordinates":[["18.125679","48.515706",161],["18.125679","48.515706",161]]}},{"type":"Feature","properties":{"type":99,"segment":"1874","segmentName":"Chrabrany - Urmince","segmentDistance":"D\u013a\u017eka: 2.62 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.6 %<\/b>","segmentNameHref":"chrabrany-urmince"},"geometry":{"type":"LineString","coordinates":[["18.134731","48.532074",165.9],["18.134731","48.532074",165.9],["18.131196","48.531739",166.4],["18.125277","48.532609",168.2],["18.115337","48.53161",171.9],["18.109733","48.531599",175.4],["18.103291","48.532233",184.6]]}},{"type":"Feature","properties":{"type":99,"segment":"1875","segmentName":"Stupani Urmince","segmentDistance":"D\u013a\u017eka: 680.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.9 %<\/b>","segmentNameHref":"stupani-urmince"},"geometry":{"type":"LineString","coordinates":[["18.097682","48.533722",180.6],["18.097682","48.533722",180.6],["18.096158","48.531874",199.3],["18.093628","48.530786",217.4]]}},{"type":"Feature","properties":{"type":99,"segment":"115813","segmentName":"Dole kopcom smer Stitare","segmentDistance":"D\u013a\u017eka: 1.16 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -2.9 %<\/b>","segmentNameHref":"dole-kopcom-smer-stitare"},"geometry":{"type":"LineString","coordinates":[["18.090881","48.52947",236],["18.090881","48.52947",236]]}},{"type":"Feature","properties":{"type":99,"segment":"141963","segmentName":"Lu\u017eany zjazd","segmentDistance":"D\u013a\u017eka: 921.30 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -4.4 %<\/b>","segmentNameHref":"luzany-zjazd"},"geometry":{"type":"LineString","coordinates":[["18.029019","48.517391",220.4],["18.029019","48.517391",220.4],["18.023402","48.515763",210.9],["18.017762","48.515692",186.1]]}},{"type":"Feature","properties":{"type":99,"segment":"24799","segmentName":"Lu\u017eany -odbo\u010dka JRD Rip\u0148any","segmentDistance":"D\u013a\u017eka: 1.51 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.1 %<\/b>","segmentNameHref":"luzany-odbocka-jrd-ripnany"},"geometry":{"type":"LineString","coordinates":[["18.008173","48.515444",179.1],["18.008173","48.515444",179.1],["17.999592","48.514877",192.5],["17.996253","48.513769",187.6],["17.993045","48.511557",190.6],["17.990469","48.510063",189.7]]}},{"type":"Feature","properties":{"type":99,"segment":"16366","segmentName":"V. Ripnany - Merasice","segmentDistance":"D\u013a\u017eka: 5.57 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.1 %<\/b>","segmentNameHref":"v-ripnany-merasice"},"geometry":{"type":"LineString","coordinates":[["17.9878","48.508103",183.4],["17.9878","48.508103",183.4],["17.985972","48.506636",177.5],["17.985973","48.505647",176.5],["17.984666","48.504185",170.8],["17.983473","48.50285",169],["17.983391","48.500105",167.4],["17.982781","48.499575",165.6],["17.979645","48.498808",164.2],["17.97661","48.498236",165],["17.974254","48.494959",165.6],["17.971459","48.488364",187.1],["17.970199","48.486672",192.8],["17.967387","48.482962",190.5],["17.966308","48.48051",187.3],["17.961288","48.477497",171],["17.959249","48.474047",176.2],["17.952011","48.469656",177],["17.948663","48.467888",188.2],["17.948381","48.466004",178.5]]}},{"type":"Feature","properties":{"type":99,"segment":"16367","segmentName":"Ve\u013ek\u00e9 Rip\u0148any","segmentDistance":"D\u013a\u017eka: 679.90 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.3 %<\/b>","segmentNameHref":"velke-ripnany"},"geometry":{"type":"LineString","coordinates":[["17.974254","48.494959",165.6],["17.974254","48.494959",165.6]]}},{"type":"Feature","properties":{"type":99,"segment":"16368","segmentName":"Merasice -> Dolne Trhoviste","segmentDistance":"D\u013a\u017eka: 5.62 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"merasice-%3E-dolne-trhoviste"},"geometry":{"type":"LineString","coordinates":[["17.942171","48.460755",186.6],["17.942171","48.460755",186.6],["17.939721","48.459048",185.7],["17.918633","48.45191",203.4],["17.90926","48.44736",177],["17.907591","48.445751",193.6],["17.904532","48.443848",189.2],["17.900755","48.442457",194.3],["17.894986","48.442138",187.7],["17.891133","48.441408",174.5],["17.889258","48.440354",179.5],["17.887781","48.440743",184.5],["17.884696","48.440107",179.2],["17.879268","48.439726",178.1],["17.875941","48.4381",179.4]]}},{"type":"Feature","properties":{"type":99,"segment":"34689","segmentName":"Doln\u00e9 Trhovi\u0161te (Centrum) - Ja\u0161ter (Top)","segmentDistance":"D\u013a\u017eka: 4.53 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2 %<\/b>","segmentNameHref":"dolne-trhoviste-centrum-jaster-top"},"geometry":{"type":"LineString","coordinates":[["17.891133","48.441408",174.5],["17.891133","48.441408",174.5],["17.889258","48.440354",179.5],["17.887781","48.440743",184.5],["17.884696","48.440107",179.2],["17.879268","48.439726",178.1],["17.875941","48.4381",179.4],["17.872698","48.436669",182.5],["17.870245","48.436204",184.6],["17.86664","48.435325",188.7],["17.864439","48.435198",195.2],["17.86026","48.436795",194.6],["17.858129","48.43686",196.5],["17.853434","48.436148",201.6],["17.849939","48.434919",215.7],["17.848428","48.434943",221.3],["17.846692","48.43582",229.6],["17.844675","48.436756",238.6],["17.843295","48.436942",244.2],["17.842045","48.437477",250.8],["17.840607","48.437703",257.8],["17.839384","48.437485",262.9],["17.837955","48.437602",268.1],["17.833034","48.441254",250],["17.831032","48.442016",241.2]]}},{"type":"Feature","properties":{"type":99,"segment":"16370","segmentName":"okolo smetiska","segmentDistance":"D\u013a\u017eka: 1.18 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3.9 %<\/b>","segmentNameHref":"okolo-smetiska"},"geometry":{"type":"LineString","coordinates":[["17.853434","48.436148",201.6],["17.853434","48.436148",201.6],["17.849939","48.434919",215.7],["17.848428","48.434943",221.3],["17.846692","48.43582",229.6],["17.844675","48.436756",238.6],["17.843295","48.436942",244.2],["17.842045","48.437477",250.8],["17.840607","48.437703",257.8],["17.839384","48.437485",262.9],["17.837955","48.437602",268.1]]}},{"type":"Feature","properties":{"type":99,"segment":"5725","segmentName":"Sedlisk\u00e1 zjazd ","segmentDistance":"D\u013a\u017eka: 2.59 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -4.3 %<\/b>","segmentNameHref":"sedliska-zjazd"},"geometry":{"type":"LineString","coordinates":[["17.837955","48.437602",268.1],["17.837955","48.437602",268.1],["17.833034","48.441254",250],["17.831032","48.442016",241.2],["17.828942","48.443152",231.2],["17.826463","48.443869",221.6],["17.826605","48.442905",217.6],["17.826104","48.442756",215.8],["17.824884","48.444031",205.7],["17.822732","48.445551",197.9],["17.819319","48.447951",191.1],["17.815806","48.446443",183.5],["17.815484","48.445657",179],["17.814454","48.445141",173.6]]}},{"type":"Feature","properties":{"type":99,"segment":"99921","segmentName":"Seredmaraton juzny okruh 2\/2","segmentDistance":"D\u013a\u017eka: 21.89 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"seredmaraton-juzny-okruh-2-2"},"geometry":{"type":"LineString","coordinates":[["17.811922","48.446007",161.9],["17.811922","48.446007",161.9],["17.811549","48.444686",157.8],["17.81135","48.443934",154.9],["17.808692","48.44254",150.1],["17.805099","48.440262",146.3],["17.804543","48.438799",145.3],["17.805111","48.438233",145.5],["17.805003","48.43624",144.3],["17.804188","48.434628",143.7],["17.806864","48.432837",145],["17.803887","48.430485",147.2],["17.8008","48.425943",159.1],["17.803323","48.42507",161.4],["17.803404","48.423467",171.2],["17.805706","48.420051",194.7],["17.805458","48.418969",198.4],["17.803898","48.418366",201.3],["17.802039","48.418971",207.1],["17.800497","48.419151",214.1],["17.799123","48.418809",220.9],["17.795287","48.416594",238.4],["17.794846","48.415529",244.2],["17.79614","48.41443",252.7],["17.795982","48.413776",257.8],["17.793725","48.414767",267.1],["17.792543","48.415256",272.8],["17.791068","48.415011",278.2],["17.78946","48.413185",276.4],["17.789204","48.411655",271.9],["17.79051","48.409073",262],["17.790015","48.402975",251.4],["17.789483","48.399962",238.3],["17.789947","48.398933",231.1],["17.794484","48.396502",206],["17.795879","48.394767",202.6],["17.796664","48.392419",199.4],["17.797395","48.39164",194.1],["17.797287","48.389463",186.1],["17.796922","48.387887",186.4],["17.797225","48.383207",181.9],["17.795985","48.381582",181.3],["17.79245","48.379703",172.7],["17.793443","48.363397",157.2],["17.794545","48.360026",160],["17.795657","48.358105",156.3],["17.797022","48.355379",146],["17.796514","48.352795",145],["17.795207","48.351793",147.3],["17.791925","48.35055",153.9],["17.787722","48.349481",161.1],["17.783528","48.344214",179.9],["17.783261","48.343057",189.1],["17.78395","48.341536",202.3],["17.783985","48.340125",214.4],["17.781127","48.336048",216.2],["17.777697","48.333253",215],["17.776838","48.329869",193.9],["17.774669","48.317655",196.6],["17.774299","48.316012",191.8],["17.76803","48.312511",162.3],["17.7642","48.308177",162.9],["17.764512","48.306643",165.2],["17.767537","48.30184",156.6],["17.768162","48.298868",151.9],["17.769048","48.296084",148.6],["17.768778","48.294977",148.9],["17.759919","48.288631",144.9],["17.755511","48.285013",136],["17.750555","48.285172",135.3]]}},{"type":"Feature","properties":{"type":99,"segment":"4438","segmentName":"Rovna HC - Rampy HC","segmentDistance":"D\u013a\u017eka: 1.05 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.4 %<\/b>","segmentNameHref":"rovna-hc-rampy-hc"},"geometry":{"type":"LineString","coordinates":[["17.808692","48.44254",150.1],["17.808692","48.44254",150.1],["17.805099","48.440262",146.3],["17.804543","48.438799",145.3],["17.805111","48.438233",145.5],["17.805003","48.43624",144.3]]}},{"type":"Feature","properties":{"type":99,"segment":"11439","segmentName":"Pribinova cobbles","segmentDistance":"D\u013a\u017eka: 890.80 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.2 %<\/b>","segmentNameHref":"pribinova-cobbles"},"geometry":{"type":"LineString","coordinates":[["17.806864","48.432837",145],["17.806864","48.432837",145],["17.803887","48.430485",147.2],["17.8008","48.425943",159.1]]}},{"type":"Feature","properties":{"type":99,"segment":"959","segmentName":"Climb HC Cintor - Vyhliadka","segmentDistance":"D\u013a\u017eka: 2.42 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.6 %<\/b>","segmentNameHref":"climb-hc-cintor-vyhliadka"},"geometry":{"type":"LineString","coordinates":[["17.803323","48.42507",161.4],["17.803323","48.42507",161.4],["17.803404","48.423467",171.2],["17.805706","48.420051",194.7],["17.805458","48.418969",198.4],["17.803898","48.418366",201.3],["17.802039","48.418971",207.1],["17.800497","48.419151",214.1],["17.799123","48.418809",220.9],["17.795287","48.416594",238.4],["17.794846","48.415529",244.2],["17.79614","48.41443",252.7],["17.795982","48.413776",257.8],["17.793725","48.414767",267.1],["17.792543","48.415256",272.8]]}},{"type":"Feature","properties":{"type":99,"segment":"961","segmentName":"\u0160ainec - Bojni\u010dky","segmentDistance":"D\u013a\u017eka: 2.23 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -2.8 %<\/b>","segmentNameHref":"sainec-bojnicky"},"geometry":{"type":"LineString","coordinates":[["17.791068","48.415011",278.2],["17.791068","48.415011",278.2],["17.78946","48.413185",276.4],["17.789204","48.411655",271.9],["17.79051","48.409073",262],["17.790015","48.402975",251.4],["17.789483","48.399962",238.3],["17.789947","48.398933",231.1]]}},{"type":"Feature","properties":{"type":99,"segment":"962","segmentName":"Bojnicky > Dvorniky","segmentDistance":"D\u013a\u017eka: 2.19 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.7 %<\/b>","segmentNameHref":"bojnicky-%3E-dvorniky"},"geometry":{"type":"LineString","coordinates":[["17.79245","48.379703",172.7],["17.79245","48.379703",172.7],["17.793443","48.363397",157.2],["17.794545","48.360026",160]]}},{"type":"Feature","properties":{"type":99,"segment":"6784","segmentName":"Kopec pred Vinohradmi","segmentDistance":"D\u013a\u017eka: 2.37 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3.1 %<\/b>","segmentNameHref":"kopec-pred-vinohradmi"},"geometry":{"type":"LineString","coordinates":[["17.797022","48.355379",146],["17.797022","48.355379",146],["17.796514","48.352795",145],["17.795207","48.351793",147.3],["17.791925","48.35055",153.9],["17.787722","48.349481",161.1],["17.783528","48.344214",179.9],["17.783261","48.343057",189.1],["17.78395","48.341536",202.3]]}},{"type":"Feature","properties":{"type":99,"segment":"6785","segmentName":"Dvorn\u00edky - Sere\u010f tabu\u013ea","segmentDistance":"D\u013a\u017eka: 8.49 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.4 %<\/b>","segmentNameHref":"dvorniky-sered-tabula"},"geometry":{"type":"LineString","coordinates":[["17.787722","48.349481",161.1],["17.787722","48.349481",161.1],["17.783528","48.344214",179.9],["17.783261","48.343057",189.1],["17.78395","48.341536",202.3],["17.783985","48.340125",214.4],["17.781127","48.336048",216.2],["17.777697","48.333253",215],["17.776838","48.329869",193.9],["17.774669","48.317655",196.6],["17.774299","48.316012",191.8],["17.76803","48.312511",162.3],["17.7642","48.308177",162.9],["17.764512","48.306643",165.2],["17.767537","48.30184",156.6],["17.768162","48.298868",151.9],["17.769048","48.296084",148.6],["17.768778","48.294977",148.9],["17.759919","48.288631",144.9],["17.755511","48.285013",136],["17.750555","48.285172",135.3]]}},{"type":"Feature","properties":{"type":99,"segment":"6786","segmentName":"Dvorniky HP","segmentDistance":"D\u013a\u017eka: 1.07 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.7 %<\/b>","segmentNameHref":"dvorniky-hp"},"geometry":{"type":"LineString","coordinates":[["17.787722","48.349481",161.1],["17.787722","48.349481",161.1],["17.783528","48.344214",179.9],["17.783261","48.343057",189.1],["17.78395","48.341536",202.3]]}},{"type":"Feature","properties":{"type":99,"segment":"132309","segmentName":"Dubnik","segmentDistance":"D\u013a\u017eka: 518.70 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.5 %<\/b>","segmentNameHref":"dubnik"},"geometry":{"type":"LineString","coordinates":[["17.774669","48.317655",196.6],["17.774669","48.317655",196.6],["17.774299","48.316012",191.8]]}},{"type":"Feature","properties":{"type":99,"segment":"6787","segmentName":"\u0160intava-\u0161print","segmentDistance":"D\u013a\u017eka: 464.90 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1 %<\/b>","segmentNameHref":"sintava-sprint"},"geometry":{"type":"LineString","coordinates":[["17.759919","48.288631",144.9]]}}] 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\/stravaPhoto1370663-0_646c11e31ac76.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1370663-0_646c11e31ac76.jpg"},{"lat":"0","lng":"0","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1370663-1_646c11e63d379.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto1370663-1_646c11e63d379.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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTEzNzA2NjMmaXRlbU5hbWU9ViVDMyVCRGphemQrJUM0JThELisxMzcwNjYzJmNvbW1lbnRUeXBlPWNvbW1lbnQmYXV0aG9yVXNlcklkPTQ4MTE1JndpZGdldElkPWNvbW1lbnRzJmFsbG93SW5zZXJ0PTEmYWxsb3dSZXBseT0xJnJldHVyblVybD1odHRwcyUzQSUyRiUyRnd3dy5tdGhpa2VyLnNrJTJGYWt0aXZpdHklMkYxMzcwNjYzJTJGYmljeWtlbC1zZXJlZG1hcmF0b24tMjAyMy5odG1sJnBhcnNlZFVybCU1QnNjaGVtZSU1RD1odHRwcyZwYXJzZWRVcmwlNUJob3N0JTVEPXd3dy5tdGhpa2VyLnNrJnBhcnNlZFVybCU1QnBhdGglNUQ9JTJGYWt0aXZpdHklMkYxMzcwNjYzJTJGYmljeWtlbC1zZXJlZG1hcmF0b24tMjAyMy5odG1sJmluY2x1ZGVDb21tZW50SWQ9MA|" + 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"; }); }); }); -->