favorite comment 0
thumb_up0thumb_down

directions_bikeMorning Ride

Hmla, 14°C, Zdanlivá teplota 14°C, Vlhkosť 93%, Vietor 1m/s z S - Klimat.app

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ť
85,0 km
schedule Čas
03:06:58
landscape Nastúpané
626 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 27,3 km/h 64,1 km/h
Výkon 126 W -
Kadencia 88 rpm -
Tepová frekvencia 129 bpm 151 bpm
Energetický výdaj 1 806 kcal

cloudPodmienky

Priemerná teplota 18 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike Afternoon Ride

trending_up 67,3 km
schedule 02:19:01
landscape 632 m
thumb_up0thumb_down

directions_bike Afternoon Ride

trending_up 32,5 km
schedule 01:11:40
landscape 86 m
thumb_up0thumb_down

directions_bike Morning Mountain Bike Ride

trending_up 42,4 km
schedule 02:14:57
landscape 768 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.030979","48.372012",146.4],["18.030979","48.372012",146.4],["18.030999","48.375058",150],["18.031241","48.379771",153.4],["18.031413","48.383518",156.2],["18.031657","48.388451",163.6],["18.030612","48.392604",164.6],["18.030058","48.394974",160.8],["18.029398","48.397434",160],["18.028487","48.398229",156.4],["18.027772","48.398972",156.2],["18.027389","48.399813",157.4],["18.027086","48.402152",157.2],["18.025958","48.406313",158.8],["18.025588","48.407384",158.4],["18.025843","48.41005",153.6],["18.026539","48.412447",154.4],["18.027119","48.413641",154.6],["18.026042","48.416931",158],["18.02575","48.417353",158.4]]}},{"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.030979","48.372012",146.4],["18.030979","48.372012",146.4],["18.030999","48.375058",150],["18.031241","48.379771",153.4],["18.031413","48.383518",156.2],["18.031657","48.388451",163.6],["18.030612","48.392604",164.6],["18.030058","48.394974",160.8],["18.029398","48.397434",160],["18.028487","48.398229",156.4],["18.027772","48.398972",156.2],["18.027389","48.399813",157.4],["18.027086","48.402152",157.2],["18.025958","48.406313",158.8],["18.025588","48.407384",158.4],["18.025843","48.41005",153.6],["18.026539","48.412447",154.4],["18.027119","48.413641",154.6],["18.026042","48.416931",158],["18.02575","48.417353",158.4],["18.022964","48.418634",155.4],["18.023127","48.419743",154.8],["18.022879","48.421831",154.4],["18.021701","48.423528",156.6],["18.021097","48.424383",158.2],["18.020144","48.424913",161],["18.019367","48.425756",166],["18.018716","48.426499",172],["18.017864","48.427328",173.4],["18.017253","48.428602",172.2],["18.017115","48.429188",174.2],["18.017467","48.433987",173.2],["18.01788","48.438347",170.2],["18.018339","48.442836",180.4],["18.019308","48.447134",178.2],["18.019737","48.448755",173.4],["18.020285","48.452499",178.6],["18.020397","48.456296",178.6],["18.02071","48.458325",179.4],["18.020641","48.459532",184.6],["18.020281","48.461185",187.6],["18.021019","48.462954",181],["18.022598","48.466029",177.6],["18.024886","48.471833",178.8],["18.02668","48.476419",174.6],["18.027495","48.477806",177.6],["18.031519","48.480569",173],["18.036379","48.486391",181.8],["18.038452","48.488897",176.4],["18.041391","48.491258",176.6],["18.043319","48.494397",182.6],["18.044815","48.495534",180.6],["18.045923","48.496301",180.2],["18.047139","48.496229",180.8],["18.047396","48.495757",181.8],["18.047955","48.495137",182.2],["18.049264","48.494568",180.6],["18.04984","48.49478",180],["18.050678","48.49534",179.2],["18.051904","48.495328",177.2],["18.052777","48.49564",177],["18.055535","48.498855",176.8],["18.056567","48.499861",178.4]]}},{"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.020144","48.424913",161],["18.020144","48.424913",161],["18.019367","48.425756",166],["18.018716","48.426499",172],["18.017864","48.427328",173.4],["18.017253","48.428602",172.2],["18.017115","48.429188",174.2],["18.017467","48.433987",173.2],["18.01788","48.438347",170.2],["18.018339","48.442836",180.4],["18.019308","48.447134",178.2],["18.019737","48.448755",173.4],["18.020285","48.452499",178.6]]}},{"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.018716","48.426499",172],["18.018716","48.426499",172],["18.017864","48.427328",173.4],["18.017864","48.427328",173.4],["18.017253","48.428602",172.2],["18.017115","48.429188",174.2],["18.017467","48.433987",173.2],["18.01788","48.438347",170.2],["18.018339","48.442836",180.4],["18.019308","48.447134",178.2],["18.019737","48.448755",173.4],["18.020285","48.452499",178.6],["18.020397","48.456296",178.6],["18.02071","48.458325",179.4],["18.020641","48.459532",184.6],["18.020281","48.461185",187.6],["18.021019","48.462954",181],["18.022598","48.466029",177.6],["18.024886","48.471833",178.8],["18.02668","48.476419",174.6],["18.027495","48.477806",177.6],["18.031519","48.480569",173],["18.036379","48.486391",181.8],["18.038452","48.488897",176.4],["18.041391","48.491258",176.6]]}},{"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.064175","48.50596",183.2],["18.064175","48.50596",183.2],["18.067426","48.507103",199],["18.068804","48.507369",206.2],["18.070167","48.507229",214.4],["18.074932","48.506669",229.4],["18.076729","48.506574",236]]}},{"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.085111","48.507691",241.2],["18.085111","48.507691",241.2],["18.092152","48.508299",225]]}},{"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.126865","48.517558",164.2],["18.126865","48.517558",164.2],["18.129523","48.521226",165.6]]}},{"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.132269","48.531677",168.8],["18.132269","48.531677",168.8],["18.130089","48.53199",169.8],["18.126071","48.532675",171],["18.120249","48.532209",172.2],["18.116241","48.531848",173],["18.113378","48.531527",176.6],["18.109186","48.531669",179.2],["18.10606","48.531838",182.2]]}},{"type":"Feature","properties":{"type":99,"segment":"1862","segmentName":"Urmince - Nemcice","segmentDistance":"D\u013a\u017eka: 2.50 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"urmince-nemcice"},"geometry":{"type":"LineString","coordinates":[["18.098824","48.535546",179.6],["18.098824","48.535546",179.6],["18.100157","48.537561",179.2],["18.101077","48.539431",185.2],["18.101948","48.540261",191.2],["18.104141","48.5431",197.2],["18.105572","48.54431",197.4],["18.109135","48.546523",197.2],["18.111671","48.547245",197.2],["18.116126","48.549283",196.8],["18.118483","48.550776",194.6]]}},{"type":"Feature","properties":{"type":99,"segment":"3245","segmentName":"V\u00edtkovce","segmentDistance":"D\u013a\u017eka: 2.17 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2 %<\/b>","segmentNameHref":"vitkovce"},"geometry":{"type":"LineString","coordinates":[["18.109015","48.570304",186.2],["18.109015","48.570304",186.2],["18.105419","48.571357",192],["18.102493","48.571839",198.8],["18.101461","48.571636",202.2],["18.100622","48.571189",206.8],["18.098739","48.569813",218],["18.09716","48.569334",220],["18.091668","48.568799",224],["18.084531","48.568395",231.4]]}},{"type":"Feature","properties":{"type":99,"segment":"6583","segmentName":"Bojna 1","segmentDistance":"D\u013a\u017eka: 1.76 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.4 %<\/b>","segmentNameHref":"bojna-1"},"geometry":{"type":"LineString","coordinates":[["18.06399","48.569238",202.4],["18.06399","48.569238",202.4],["18.060833","48.571224",212.2],["18.060317","48.572246",211.2],["18.05829","48.574189",209.6],["18.057015","48.576167",209.2],["18.056689","48.576451",209.8],["18.054961","48.577849",210],["18.054264","48.57909",214.4],["18.053232","48.580871",223.2],["18.053213","48.58143",225]]}},{"type":"Feature","properties":{"type":99,"segment":"1841","segmentName":"Od Ran\u010da pod Babicou po Papier\u0148u","segmentDistance":"D\u013a\u017eka: 1.78 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2 %<\/b>","segmentNameHref":"od-ranca-pod-babicou-po-papiernu"},"geometry":{"type":"LineString","coordinates":[["18.050022","48.596437",225.8],["18.050022","48.596437",225.8],["18.048007","48.598327",226.2],["18.046965","48.599602",226],["18.046018","48.601138",228.6],["18.04483","48.603073",232.8],["18.043927","48.60424",234.8],["18.043484","48.605474",236],["18.042858","48.606365",235.2],["18.040629","48.60723",234.8],["18.04027","48.607531",234.4],["18.040494","48.607283",233],["18.039649","48.607096",233.6],["18.03829","48.606921",238],["18.037146","48.606834",239.8],["18.036249","48.606665",240.6]]}},{"type":"Feature","properties":{"type":99,"segment":"60989","segmentName":"Hradn\u00e1 dolina -Ran\u010d pod Babicou","segmentDistance":"D\u013a\u017eka: 1.14 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.8 %<\/b>","segmentNameHref":"hradna-dolina-ranc-pod-babicou"},"geometry":{"type":"LineString","coordinates":[["18.042216","48.60664",234.6],["18.042216","48.60664",234.6],["18.043307","48.60587",234.8],["18.043646","48.60489",236.2],["18.044484","48.603486",236],["18.045997","48.601108",234],["18.047556","48.598714",228.6]]}},{"type":"Feature","properties":{"type":99,"segment":"29263","segmentName":"Rampe","segmentDistance":"D\u013a\u017eka: 656.40 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.9 %<\/b>","segmentNameHref":"rampe"},"geometry":{"type":"LineString","coordinates":[["18.056803","48.576278",211.8],["18.056803","48.576278",211.8],["18.056972","48.57582",211.8],["18.055441","48.575295",217],["18.055281","48.575125",219.8],["18.055827","48.57454",224.2],["18.055347","48.575039",224],["18.054295","48.574534",227.6],["18.053731","48.574335",233.6],["18.051242","48.575335",240.4],["18.04815","48.575216",241.2]]}},{"type":"Feature","properties":{"type":99,"segment":"28274","segmentName":"Be4 Vozokany hill","segmentDistance":"D\u013a\u017eka: 2.18 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.5 %<\/b>","segmentNameHref":"be4-vozokany-hill"},"geometry":{"type":"LineString","coordinates":[["18.043312","48.574349",228.8],["18.043312","48.574349",228.8],["18.039464","48.573446",245.6],["18.037964","48.573268",250],["18.031962","48.573406",264],["18.027746","48.572935",270.4],["18.020369","48.571959",279.8],["18.017192","48.571282",279.6]]}},{"type":"Feature","properties":{"type":99,"segment":"3247","segmentName":"Lipovnik - Vozokany","segmentDistance":"D\u013a\u017eka: 850.80 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -1.2 %<\/b>","segmentNameHref":"lipovnik-vozokany"},"geometry":{"type":"LineString","coordinates":[["18.007919","48.568283",263.8],["18.007919","48.568283",263.8],["18.003575","48.565914",259.6],["18.000592","48.564856",258.8],["17.998721","48.564549",254]]}},{"type":"Feature","properties":{"type":99,"segment":"28275","segmentName":"doubled hill 2","segmentDistance":"D\u013a\u017eka: 1.37 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.1 %<\/b>","segmentNameHref":"doubled-hill-2"},"geometry":{"type":"LineString","coordinates":[["17.994693","48.56327",239.4],["17.994693","48.56327",239.4],["17.990278","48.561314",248.6],["17.986721","48.559846",255.6],["17.983264","48.558401",249.6],["17.980369","48.557312",259.4]]}},{"type":"Feature","properties":{"type":99,"segment":"3248","segmentName":"Nitrianska Blatnica smer PN","segmentDistance":"D\u013a\u017eka: 1.44 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -2.7 %<\/b>","segmentNameHref":"nitrianska-blatnica-smer-pn"},"geometry":{"type":"LineString","coordinates":[["17.978343","48.55683",261.8],["17.978343","48.55683",261.8],["17.972622","48.555331",245.2],["17.971318","48.554867",238.8],["17.969362","48.55352",232.6],["17.967993","48.552893",228.8],["17.966454","48.552515",225.2],["17.96311","48.551985",220.6]]}},{"type":"Feature","properties":{"type":99,"segment":"14069","segmentName":"Radosina --> Zbehy","segmentDistance":"D\u013a\u017eka: 20.79 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.2 %<\/b>","segmentNameHref":"radosina-%3E-zbehy"},"geometry":{"type":"LineString","coordinates":[["17.947783","48.538894",196.6],["17.947783","48.538894",196.6],["17.952621","48.536642",193.6],["17.957547","48.534338",189],["17.959539","48.532866",188.4],["17.960369","48.530677",189.4],["17.960933","48.529026",189.8],["17.962182","48.527902",187.6],["17.963906","48.52687",186.4],["17.965509","48.524689",187.6],["17.967162","48.523637",185.6],["17.969559","48.521707",183],["17.970998","48.520043",182.4],["17.971888","48.518758",182.6],["17.97402","48.517607",180.8],["17.977953","48.517208",178.6],["17.979321","48.516858",178.2],["17.981403","48.515492",179.2],["17.982447","48.513594",183.8],["17.984355","48.509667",181.4],["17.985932","48.506326",184.4],["17.985835","48.505206",184.8],["17.98496","48.504325",182.8],["17.983791","48.503689",179.6],["17.98325","48.502155",177.6],["17.983367","48.499989",175.8],["17.983749","48.499185",176.6],["17.98489","48.496525",182.8],["17.986066","48.4939",181.4],["17.987287","48.490986",180.8],["17.988023","48.489288",182],["17.989111","48.486652",182.2],["17.988819","48.48235",182],["17.988814","48.480474",180.6],["17.988505","48.477104",175.4],["17.988249","48.475058",173.2],["17.988643","48.474241",171.6],["17.990602","48.473138",169.4],["17.991434","48.47228",172.2],["17.991466","48.471898",172.4],["17.990115","48.470051",174.4],["17.989013","48.468524",179.8],["17.986981","48.465759",183],["17.985861","48.464535",181.8],["17.985601","48.463297",178.8],["17.984837","48.461405",173.6],["17.984702","48.460456",178.2],["17.984715","48.458081",180.8],["17.984877","48.455314",182.8],["17.9853","48.451518",181.8],["17.98555","48.44928",177.4],["17.985733","48.444396",167.4],["17.985737","48.439973",162.6],["17.985743","48.439279",165.8],["17.985701","48.437481",166.8],["17.985794","48.436602",166.4],["17.986958","48.4348",166.8],["17.987734","48.433572",166],["17.987999","48.433236",165.8],["17.988071","48.432076",165.8],["17.98671","48.428354",165.8],["17.984842","48.422561",163.2],["17.984184","48.420304",163.2],["17.983291","48.41884",160.8],["17.983327","48.418117",160.2],["17.984256","48.416568",158.8],["17.988111","48.412798",158.4],["17.991474","48.409795",163.2],["17.994265","48.408015",164],["18.003158","48.402576",167.8],["18.004798","48.400915",167.4],["18.006574","48.398591",167.2],["18.009318","48.394802",167],["18.01186","48.391265",164.4],["18.015537","48.386156",156.6],["18.019213","48.381028",155.2],["18.022048","48.377072",153],["18.025427","48.372402",151.8],["18.025776","48.370248",151.8],["18.02382","48.369334",152.8],["18.02114","48.367355",154.6],["18.018837","48.365986",153.4],["18.018532","48.365595",153.8],["18.020172","48.363916",154.4],["18.018368","48.363126",154]]}},{"type":"Feature","properties":{"type":99,"segment":"3253","segmentName":"Radosina --> Velke Ripnany","segmentDistance":"D\u013a\u017eka: 4.38 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.3 %<\/b>","segmentNameHref":"radosina-%3E-velke-ripnany"},"geometry":{"type":"LineString","coordinates":[["17.947783","48.538894",196.6],["17.947783","48.538894",196.6],["17.952621","48.536642",193.6],["17.957547","48.534338",189],["17.959539","48.532866",188.4],["17.960369","48.530677",189.4],["17.960933","48.529026",189.8],["17.962182","48.527902",187.6],["17.963906","48.52687",186.4],["17.965509","48.524689",187.6],["17.967162","48.523637",185.6],["17.969559","48.521707",183],["17.970998","48.520043",182.4],["17.971888","48.518758",182.6],["17.97402","48.517607",180.8],["17.977953","48.517208",178.6],["17.979321","48.516858",178.2],["17.981403","48.515492",179.2],["17.982447","48.513594",183.8],["17.984355","48.509667",181.4]]}},{"type":"Feature","properties":{"type":99,"segment":"1865","segmentName":"Velke Ripnany --> Nove Sady","segmentDistance":"D\u013a\u017eka: 9.67 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.2 %<\/b>","segmentNameHref":"velke-ripnany-%3E-nove-sady"},"geometry":{"type":"LineString","coordinates":[["17.983367","48.499989",175.8],["17.983367","48.499989",175.8],["17.983749","48.499185",176.6],["17.98489","48.496525",182.8],["17.986066","48.4939",181.4],["17.987287","48.490986",180.8],["17.988023","48.489288",182],["17.989111","48.486652",182.2],["17.988819","48.48235",182],["17.988814","48.480474",180.6],["17.988505","48.477104",175.4],["17.988249","48.475058",173.2],["17.988643","48.474241",171.6],["17.990602","48.473138",169.4],["17.991434","48.47228",172.2],["17.991466","48.471898",172.4],["17.990115","48.470051",174.4],["17.989013","48.468524",179.8],["17.986981","48.465759",183],["17.985861","48.464535",181.8],["17.985601","48.463297",178.8],["17.984837","48.461405",173.6],["17.984702","48.460456",178.2],["17.984715","48.458081",180.8],["17.984877","48.455314",182.8],["17.9853","48.451518",181.8],["17.98555","48.44928",177.4],["17.985733","48.444396",167.4],["17.985737","48.439973",162.6],["17.985743","48.439279",165.8],["17.985701","48.437481",166.8],["17.985794","48.436602",166.4],["17.986958","48.4348",166.8],["17.987734","48.433572",166],["17.987999","48.433236",165.8],["17.988071","48.432076",165.8],["17.98671","48.428354",165.8],["17.984842","48.422561",163.2],["17.984184","48.420304",163.2],["17.983291","48.41884",160.8],["17.983327","48.418117",160.2]]}},{"type":"Feature","properties":{"type":99,"segment":"1867","segmentName":"Mal\u00e9 Z\u00e1lu\u017eie -> Zbehy (\u017eel.most)","segmentDistance":"D\u013a\u017eka: 8.74 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.3 %<\/b>","segmentNameHref":"male-zaluzie-%3E-zbehy-zelmost"},"geometry":{"type":"LineString","coordinates":[["17.985733","48.444396",167.4],["17.985733","48.444396",167.4],["17.985737","48.439973",162.6],["17.985743","48.439279",165.8],["17.985701","48.437481",166.8],["17.985794","48.436602",166.4],["17.986958","48.4348",166.8],["17.987734","48.433572",166],["17.987999","48.433236",165.8],["17.988071","48.432076",165.8],["17.98671","48.428354",165.8],["17.984842","48.422561",163.2],["17.984184","48.420304",163.2],["17.983291","48.41884",160.8],["17.983327","48.418117",160.2],["17.984256","48.416568",158.8],["17.988111","48.412798",158.4],["17.991474","48.409795",163.2],["17.994265","48.408015",164],["18.003158","48.402576",167.8],["18.004798","48.400915",167.4],["18.006574","48.398591",167.2],["18.009318","48.394802",167],["18.01186","48.391265",164.4],["18.015537","48.386156",156.6],["18.019213","48.381028",155.2],["18.022048","48.377072",153],["18.025427","48.372402",151.8]]}},{"type":"Feature","properties":{"type":99,"segment":"1869","segmentName":"nov\u00e9 sady -zbehy most","segmentDistance":"D\u013a\u017eka: 4.96 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"nove-sady-zbehy-most"},"geometry":{"type":"LineString","coordinates":[["17.988111","48.412798",158.4],["17.988111","48.412798",158.4],["17.991474","48.409795",163.2],["17.994265","48.408015",164],["18.003158","48.402576",167.8],["18.004798","48.400915",167.4],["18.006574","48.398591",167.2],["18.009318","48.394802",167],["18.01186","48.391265",164.4],["18.015537","48.386156",156.6],["18.019213","48.381028",155.2],["18.022048","48.377072",153]]}},{"type":"Feature","properties":{"type":99,"segment":"1868","segmentName":"Z\u00e1lu\u017eie - Nov\u00e9 Sady","segmentDistance":"D\u013a\u017eka: 4.91 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"zaluzie-nove-sady"},"geometry":{"type":"LineString","coordinates":[["17.988111","48.412798",158.4],["17.988111","48.412798",158.4],["17.991474","48.409795",163.2],["17.994265","48.408015",164],["18.003158","48.402576",167.8],["18.004798","48.400915",167.4],["18.006574","48.398591",167.2],["18.009318","48.394802",167],["18.01186","48.391265",164.4],["18.015537","48.386156",156.6],["18.019213","48.381028",155.2],["18.022048","48.377072",153]]}}] 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\/stravaPhoto624892-0_60a168811b9ea.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto624892-0_60a168811b9ea.jpg"},{"lat":"0","lng":"0","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto624892-1_60a16882d4839.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto624892-1_60a16882d4839.jpg"},{"lat":"0","lng":"0","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto624892-2_60a168855b8be.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto624892-2_60a168855b8be.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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTYyNDg5MiZpdGVtTmFtZT1WJUMzJUJEamF6ZCslQzQlOEQuKzYyNDg5MiZjb21tZW50VHlwZT1jb21tZW50JmF1dGhvclVzZXJJZD00MDAzNSZ3aWRnZXRJZD1jb21tZW50cyZhbGxvd0luc2VydD0xJmFsbG93UmVwbHk9MSZyZXR1cm5Vcmw9aHR0cHMlM0ElMkYlMkZ3d3cubXRoaWtlci5zayUyRmFrdGl2aXR5JTJGNjI0ODkyJTJGYmljeWtlbC1tb3JuaW5nLXJpZGUuaHRtbCUzRm9kJTNENCUyNnJpZGVfaWQlM0Q2MjQ4OTImcGFyc2VkVXJsJTVCc2NoZW1lJTVEPWh0dHBzJnBhcnNlZFVybCU1Qmhvc3QlNUQ9d3d3Lm10aGlrZXIuc2smcGFyc2VkVXJsJTVCcGF0aCU1RD0lMkZha3Rpdml0eSUyRjYyNDg5MiUyRmJpY3lrZWwtbW9ybmluZy1yaWRlLmh0bWwmcGFyc2VkVXJsJTVCcXVlcnklNUQ9b2QlM0Q0JTI2cmlkZV9pZCUzRDYyNDg5MiZpbmNsdWRlQ29tbWVudElkPTA|" + 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"; }); }); }); -->