favorite comment 0
thumb_up0thumb_down

directions_bikeAfternoon Mountain Bike Ride

Bicykel lock_open

place Graf prevýšenia

comment Komentáre ku aktivite

Momentálne sa tu nenachádzajú žiadne komentáre

Formulár sa odosiela
Pridaj komentár
Formulár sa odosiela
trending_up Vzdialenosť
51,3 km
schedule Čas
03:07:29
landscape Nastúpané
1 097 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 16,4 km/h 50,2 km/h
Výkon 123 W 760 W
Kadencia 65 rpm -
Tepová frekvencia 123 bpm 165 bpm
Energetický výdaj 1 619 kcal

cloudPodmienky

Priemerná teplota 11 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike Afternoon Mountain Bike Ride

trending_up 56,3 km
schedule 03:06:02
landscape 1 142 m
thumb_up0thumb_down

directions_bike Morning Ride

trending_up 80,6 km
schedule 03:29:33
landscape 1 152 m
thumb_up0thumb_down

directions_bike Afternoon Ride

trending_up 44,6 km
schedule 02:02:56
landscape 421 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.876971","48.565664",403],["17.876971","48.565664",403],["17.87639","48.565964",403.4],["17.874194","48.56595",396.8],["17.873651","48.565797",395],["17.873282","48.565376",392.6],["17.872857","48.564555",386.2],["17.872319","48.564153",382.6],["17.871641","48.564127",380.4],["17.871156","48.564402",378],["17.870296","48.565659",370.2],["17.869965","48.566024",367.6],["17.869273","48.566278",364.6],["17.868133","48.566291",359.2],["17.866921","48.565886",353.6],["17.866347","48.56543",350],["17.865856","48.564729",345],["17.865398","48.564839",340.8],["17.865241","48.565397",336.4],["17.864938","48.566428",330.4],["17.865199","48.56683",327],["17.864808","48.567061",324.6],["17.863982","48.56681",319.8],["17.863342","48.566839",316.4],["17.862537","48.567195",312.8],["17.861933","48.567361",310.4],["17.860973","48.567359",305.4],["17.8604","48.567181",303.4],["17.859659","48.566685",297.2],["17.858801","48.56692",293.2],["17.857974","48.567697",286.8],["17.85674","48.568637",278.8],["17.854891","48.570203",265.4],["17.853963","48.570526",261.4],["17.853048","48.571073",255.4],["17.852418","48.571254",252.4],["17.851626","48.571258",248.2],["17.851609","48.571735",243.2],["17.851536","48.572366",239.4],["17.851693","48.572786",236.4],["17.851438","48.573913",228.6]]}},{"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.876971","48.565664",403],["17.876971","48.565664",403],["17.87639","48.565964",403.4],["17.874194","48.56595",396.8],["17.873651","48.565797",395],["17.873282","48.565376",392.6],["17.872857","48.564555",386.2],["17.872319","48.564153",382.6],["17.871641","48.564127",380.4],["17.871156","48.564402",378],["17.870296","48.565659",370.2],["17.869965","48.566024",367.6],["17.869273","48.566278",364.6],["17.868133","48.566291",359.2],["17.866921","48.565886",353.6],["17.866347","48.56543",350],["17.865856","48.564729",345],["17.865398","48.564839",340.8],["17.865241","48.565397",336.4],["17.864938","48.566428",330.4],["17.865199","48.56683",327],["17.864808","48.567061",324.6],["17.863982","48.56681",319.8],["17.863342","48.566839",316.4],["17.862537","48.567195",312.8],["17.861933","48.567361",310.4],["17.860973","48.567359",305.4],["17.8604","48.567181",303.4],["17.859659","48.566685",297.2],["17.858801","48.56692",293.2],["17.857974","48.567697",286.8],["17.85674","48.568637",278.8],["17.854891","48.570203",265.4],["17.853963","48.570526",261.4],["17.853048","48.571073",255.4],["17.852418","48.571254",252.4],["17.851626","48.571258",248.2],["17.851609","48.571735",243.2],["17.851536","48.572366",239.4],["17.851693","48.572786",236.4],["17.851438","48.573913",228.6],["17.851488","48.576288",212.8],["17.852003","48.577788",203],["17.852671","48.579181",194],["17.853153","48.579853",190.8],["17.852872","48.580354",188.8],["17.852395","48.581134",185.6],["17.851705","48.581497",184.6]]}},{"type":"Feature","properties":{"type":99,"segment":"588","segmentName":"Gazda - slepa ulica","segmentDistance":"D\u013a\u017eka: 1.15 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.6 %<\/b>","segmentNameHref":"gazda-slepa-ulica"},"geometry":{"type":"LineString","coordinates":[["17.862973","48.602232",175.2],["17.862973","48.602232",175.2],["17.863871","48.602413",174.2],["17.865379","48.60271",175],["17.866293","48.602494",175.6],["17.867571","48.602336",177.6],["17.868231","48.602513",178.4],["17.869893","48.60295",182.6],["17.870544","48.603209",185.2],["17.871298","48.603527",185.6],["17.872734","48.604041",188],["17.87343","48.604448",189],["17.874677","48.605218",189.6],["17.875887","48.605796",192],["17.876776","48.605941",192.2]]}},{"type":"Feature","properties":{"type":99,"segment":"7387","segmentName":"V\u00fdtoky po odbo\u010dku do lesa","segmentDistance":"D\u013a\u017eka: 2.29 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.6 %<\/b>","segmentNameHref":"vytoky-po-odbocku-do-lesa"},"geometry":{"type":"LineString","coordinates":[["17.925113","48.607893",249],["17.925113","48.607893",249],["17.926305","48.607514",249.4],["17.927356","48.607083",252],["17.928247","48.606631",254.8],["17.92859","48.606379",256],["17.929105","48.605781",259],["17.929848","48.604877",263.6],["17.930249","48.60434",268.2],["17.930524","48.604012",270.4],["17.931305","48.603414",274.6],["17.932094","48.603029",276.6],["17.93391","48.602694",283.6],["17.935001","48.602583",288],["17.936236","48.602346",291.2],["17.937939","48.602015",297.2],["17.93899","48.602225",299.2],["17.939638","48.60237",302.8],["17.94044","48.602474",307.4],["17.941319","48.602412",311.6],["17.942366","48.602395",319],["17.943021","48.602334",325.4],["17.943482","48.602354",328],["17.944002","48.602411",330.8],["17.944355","48.602451",332.6],["17.944638","48.602503",334],["17.945045","48.602537",336.2],["17.94589","48.602534",340.6],["17.946967","48.602556",346.8],["17.947432","48.602496",350.4],["17.948267","48.602295",355.4],["17.949144","48.602052",360],["17.949654","48.601925",363],["17.950294","48.601752",367.2]]}},{"type":"Feature","properties":{"type":99,"segment":"7388","segmentName":"V\u00fdtoky climb ","segmentDistance":"D\u013a\u017eka: 1.15 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3.6 %<\/b>","segmentNameHref":"vytoky-climb"},"geometry":{"type":"LineString","coordinates":[["17.925113","48.607893",249],["17.925113","48.607893",249],["17.926305","48.607514",249.4],["17.927356","48.607083",252],["17.928247","48.606631",254.8],["17.92859","48.606379",256],["17.929105","48.605781",259],["17.929848","48.604877",263.6],["17.930249","48.60434",268.2],["17.930524","48.604012",270.4],["17.931305","48.603414",274.6],["17.932094","48.603029",276.6],["17.93391","48.602694",283.6],["17.935001","48.602583",288],["17.936236","48.602346",291.2],["17.937939","48.602015",297.2]]}},{"type":"Feature","properties":{"type":99,"segment":"40846","segmentName":"Vytoky - Gajda","segmentDistance":"D\u013a\u017eka: 3.23 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.6 %<\/b>","segmentNameHref":"vytoky-gajda"},"geometry":{"type":"LineString","coordinates":[["17.937939","48.602015",297.2],["17.937939","48.602015",297.2],["17.93899","48.602225",299.2],["17.939638","48.60237",302.8],["17.94044","48.602474",307.4],["17.941319","48.602412",311.6],["17.942366","48.602395",319],["17.943021","48.602334",325.4],["17.943482","48.602354",328],["17.944002","48.602411",330.8],["17.944355","48.602451",332.6],["17.944638","48.602503",334],["17.945045","48.602537",336.2],["17.94589","48.602534",340.6],["17.946967","48.602556",346.8],["17.947432","48.602496",350.4],["17.948267","48.602295",355.4],["17.949144","48.602052",360],["17.949654","48.601925",363],["17.950294","48.601752",367.2],["17.951358","48.601477",376.2],["17.951524","48.601411",378.4],["17.951443","48.601305",379],["17.951059","48.601279",379.8],["17.950367","48.601278",384.4],["17.949763","48.601304",389.2],["17.949318","48.601272",393.2],["17.948923","48.601152",396.4],["17.948872","48.600977",398.2],["17.949092","48.600602",403],["17.949159","48.600339",406],["17.948965","48.600144",409],["17.948449","48.599958",414.4],["17.948314","48.599762",417],["17.948033","48.59957",420],["17.947598","48.599467",423.4],["17.947323","48.599432",424.2],["17.946644","48.599555",426.4],["17.946221","48.599839",426.2],["17.945864","48.599753",426.8],["17.945293","48.599678",427.8],["17.944488","48.599862",428],["17.944102","48.599766",428],["17.944151","48.599462",430.6],["17.94439","48.599097",434.4],["17.944437","48.598918",436.2],["17.944495","48.598675",438.4],["17.944412","48.598383",441.2],["17.944268","48.598117",443.8],["17.944041","48.597593",448.2],["17.944084","48.59737",450.2],["17.944244","48.597114",452.6],["17.944402","48.596934",454.2],["17.944646","48.596607",458.4],["17.944606","48.596418",460.4],["17.944923","48.59599",464.2],["17.945175","48.595687",467.4],["17.945438","48.595407",470.2],["17.945703","48.595239",472.4],["17.945837","48.595004",475.2],["17.945796","48.594855",477],["17.945285","48.594641",480.4],["17.944863","48.594531",483.6],["17.944752","48.594261",486],["17.944951","48.593393",493],["17.945178","48.59303",496],["17.945505","48.592618",500],["17.946179","48.592048",506.8],["17.946237","48.591859",508.8],["17.946054","48.591366",513],["17.945906","48.591206",514.4],["17.945603","48.590766",518.4],["17.945618","48.5904",520.8],["17.946062","48.589888",524.8]]}},{"type":"Feature","properties":{"type":99,"segment":"7389","segmentName":"Segment","segmentDistance":"D\u013a\u017eka: 1.15 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 8.4 %<\/b>","segmentNameHref":"segment"},"geometry":{"type":"LineString","coordinates":[["17.944002","48.602411",330.8],["17.944002","48.602411",330.8],["17.944355","48.602451",332.6],["17.944638","48.602503",334],["17.945045","48.602537",336.2],["17.94589","48.602534",340.6],["17.946967","48.602556",346.8],["17.947432","48.602496",350.4],["17.948267","48.602295",355.4],["17.949144","48.602052",360],["17.949654","48.601925",363],["17.950294","48.601752",367.2],["17.951358","48.601477",376.2],["17.951524","48.601411",378.4],["17.951443","48.601305",379],["17.951059","48.601279",379.8],["17.950367","48.601278",384.4],["17.949763","48.601304",389.2],["17.949318","48.601272",393.2],["17.948923","48.601152",396.4],["17.948872","48.600977",398.2],["17.949092","48.600602",403],["17.949159","48.600339",406],["17.948965","48.600144",409],["17.948449","48.599958",414.4],["17.948314","48.599762",417],["17.948033","48.59957",420],["17.947598","48.599467",423.4],["17.947323","48.599432",424.2],["17.946644","48.599555",426.4]]}},{"type":"Feature","properties":{"type":99,"segment":"7391","segmentName":"na Gajdu","segmentDistance":"D\u013a\u017eka: 2.01 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.5 %<\/b>","segmentNameHref":"na-gajdu"},"geometry":{"type":"LineString","coordinates":[["17.951358","48.601477",376.2],["17.951358","48.601477",376.2],["17.951524","48.601411",378.4],["17.951524","48.601411",378.4],["17.951443","48.601305",379],["17.951443","48.601305",379],["17.951059","48.601279",379.8],["17.951059","48.601279",379.8],["17.950367","48.601278",384.4],["17.949763","48.601304",389.2],["17.949318","48.601272",393.2],["17.948923","48.601152",396.4],["17.948872","48.600977",398.2],["17.949092","48.600602",403],["17.949159","48.600339",406],["17.948965","48.600144",409],["17.948449","48.599958",414.4],["17.948314","48.599762",417],["17.948033","48.59957",420],["17.947598","48.599467",423.4],["17.947323","48.599432",424.2],["17.946644","48.599555",426.4],["17.946221","48.599839",426.2],["17.945864","48.599753",426.8],["17.945293","48.599678",427.8],["17.944488","48.599862",428],["17.944102","48.599766",428],["17.944151","48.599462",430.6],["17.94439","48.599097",434.4],["17.944437","48.598918",436.2],["17.944495","48.598675",438.4],["17.944412","48.598383",441.2],["17.944268","48.598117",443.8],["17.944041","48.597593",448.2],["17.944084","48.59737",450.2],["17.944244","48.597114",452.6],["17.944402","48.596934",454.2],["17.944646","48.596607",458.4],["17.944606","48.596418",460.4],["17.944923","48.59599",464.2],["17.945175","48.595687",467.4],["17.945438","48.595407",470.2],["17.945703","48.595239",472.4],["17.945837","48.595004",475.2],["17.945796","48.594855",477],["17.945285","48.594641",480.4],["17.944863","48.594531",483.6],["17.944752","48.594261",486],["17.944951","48.593393",493],["17.945178","48.59303",496],["17.945505","48.592618",500],["17.946179","48.592048",506.8],["17.946237","48.591859",508.8],["17.946054","48.591366",513],["17.945906","48.591206",514.4],["17.945603","48.590766",518.4],["17.945618","48.5904",520.8],["17.946062","48.589888",524.8]]}},{"type":"Feature","properties":{"type":99,"segment":"7390","segmentName":"V\u00fdtoky-pod Marh\u00e1t","segmentDistance":"D\u013a\u017eka: 4.75 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.8 %<\/b>","segmentNameHref":"vytoky-pod-marhat"},"geometry":{"type":"LineString","coordinates":[["17.951443","48.601305",379],["17.951443","48.601305",379],["17.951059","48.601279",379.8],["17.950367","48.601278",384.4],["17.949763","48.601304",389.2],["17.949318","48.601272",393.2],["17.948923","48.601152",396.4],["17.948872","48.600977",398.2],["17.949092","48.600602",403],["17.949159","48.600339",406],["17.948965","48.600144",409],["17.948449","48.599958",414.4],["17.948314","48.599762",417],["17.948033","48.59957",420],["17.947598","48.599467",423.4],["17.947323","48.599432",424.2],["17.946644","48.599555",426.4],["17.946221","48.599839",426.2],["17.945864","48.599753",426.8],["17.945293","48.599678",427.8],["17.944488","48.599862",428],["17.944102","48.599766",428],["17.944151","48.599462",430.6],["17.94439","48.599097",434.4],["17.944437","48.598918",436.2],["17.944495","48.598675",438.4],["17.944412","48.598383",441.2],["17.944268","48.598117",443.8],["17.944041","48.597593",448.2],["17.944084","48.59737",450.2],["17.944244","48.597114",452.6],["17.944402","48.596934",454.2],["17.944646","48.596607",458.4],["17.944606","48.596418",460.4],["17.944923","48.59599",464.2],["17.945175","48.595687",467.4],["17.945438","48.595407",470.2],["17.945703","48.595239",472.4],["17.945837","48.595004",475.2],["17.945796","48.594855",477],["17.945285","48.594641",480.4],["17.944863","48.594531",483.6],["17.944752","48.594261",486],["17.944951","48.593393",493],["17.945178","48.59303",496],["17.945505","48.592618",500],["17.946179","48.592048",506.8],["17.946237","48.591859",508.8],["17.946054","48.591366",513],["17.945906","48.591206",514.4],["17.945603","48.590766",518.4],["17.945618","48.5904",520.8],["17.946062","48.589888",524.8],["17.946909","48.589601",530],["17.947569","48.589506",535],["17.94808","48.589505",539.4],["17.948847","48.589417",543.8],["17.948955","48.589605",545.4],["17.948875","48.589906",547.6],["17.948842","48.590149",550.6],["17.949233","48.590484",553],["17.94965","48.590693",556],["17.949818","48.591082",555],["17.949817","48.591469",552.8],["17.949847","48.59171",553],["17.949919","48.592004",554],["17.950056","48.59242",556.6],["17.950163","48.592729",558.6],["17.950271","48.593101",562.4],["17.950263","48.593282",564.4],["17.950683","48.593721",569],["17.950815","48.594026",573.4],["17.950714","48.59435",575.8],["17.950946","48.594815",575.4],["17.951444","48.595267",575.4],["17.952205","48.595746",576.6],["17.952994","48.595887",578.6],["17.954082","48.595577",582.2],["17.955821","48.595371",587],["17.956763","48.595398",589.6],["17.95754","48.59533",592.2],["17.958664","48.595294",595.8],["17.959358","48.595653",598.4],["17.959572","48.595591",599.2],["17.960546","48.595347",601.4],["17.962073","48.595322",604.2],["17.96335","48.595176",606.6],["17.963696","48.595221",607],["17.964592","48.595626",608.8],["17.965027","48.595898",610.4],["17.965045","48.596145",611.8],["17.964584","48.596693",614.2],["17.96424","48.597255",617.4],["17.964091","48.597566",618.4],["17.964203","48.597756",619.6],["17.964942","48.598165",621],["17.96593","48.598372",621.6],["17.966933","48.598678",622.2],["17.967821","48.598872",623],["17.968525","48.599098",624.2],["17.968576","48.599329",624.4],["17.968383","48.599773",624.4],["17.968523","48.600585",624.4],["17.968238","48.600885",624.6]]}},{"type":"Feature","properties":{"type":99,"segment":"26447","segmentName":"Kamenn\u00e1 Climb","segmentDistance":"D\u013a\u017eka: 1.07 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 7.7 %<\/b>","segmentNameHref":"kamenna-climb"},"geometry":{"type":"LineString","coordinates":[["17.944151","48.599462",430.6],["17.944151","48.599462",430.6],["17.94439","48.599097",434.4],["17.944437","48.598918",436.2],["17.944495","48.598675",438.4],["17.944412","48.598383",441.2],["17.944268","48.598117",443.8],["17.944041","48.597593",448.2],["17.944084","48.59737",450.2],["17.944244","48.597114",452.6],["17.944402","48.596934",454.2],["17.944646","48.596607",458.4],["17.944606","48.596418",460.4],["17.944923","48.59599",464.2],["17.945175","48.595687",467.4],["17.945438","48.595407",470.2],["17.945703","48.595239",472.4],["17.945837","48.595004",475.2],["17.945796","48.594855",477],["17.945285","48.594641",480.4],["17.944863","48.594531",483.6],["17.944752","48.594261",486],["17.944951","48.593393",493],["17.945178","48.59303",496],["17.945505","48.592618",500],["17.946179","48.592048",506.8],["17.946237","48.591859",508.8]]}},{"type":"Feature","properties":{"type":99,"segment":"7392","segmentName":"chumbawamba ","segmentDistance":"D\u013a\u017eka: 2.52 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3.2 %<\/b>","segmentNameHref":"chumbawamba"},"geometry":{"type":"LineString","coordinates":[["17.949233","48.590484",553],["17.949233","48.590484",553],["17.94965","48.590693",556],["17.949818","48.591082",555],["17.949817","48.591469",552.8],["17.949847","48.59171",553],["17.949919","48.592004",554],["17.950056","48.59242",556.6],["17.950163","48.592729",558.6],["17.950271","48.593101",562.4],["17.950263","48.593282",564.4],["17.950683","48.593721",569],["17.950815","48.594026",573.4],["17.950714","48.59435",575.8],["17.950946","48.594815",575.4],["17.951444","48.595267",575.4],["17.952205","48.595746",576.6],["17.952994","48.595887",578.6],["17.954082","48.595577",582.2],["17.955821","48.595371",587],["17.956763","48.595398",589.6],["17.95754","48.59533",592.2],["17.958664","48.595294",595.8],["17.959358","48.595653",598.4],["17.959572","48.595591",599.2],["17.960546","48.595347",601.4],["17.962073","48.595322",604.2],["17.96335","48.595176",606.6],["17.963696","48.595221",607],["17.964592","48.595626",608.8],["17.965027","48.595898",610.4],["17.965045","48.596145",611.8],["17.964584","48.596693",614.2],["17.96424","48.597255",617.4],["17.964091","48.597566",618.4],["17.964203","48.597756",619.6],["17.964942","48.598165",621],["17.96593","48.598372",621.6],["17.966933","48.598678",622.2],["17.967821","48.598872",623],["17.968525","48.599098",624.2],["17.968576","48.599329",624.4],["17.968383","48.599773",624.4],["17.968523","48.600585",624.4],["17.968238","48.600885",624.6],["17.967581","48.601245",624.8],["17.967329","48.601777",626.4],["17.96641","48.602596",627.6],["17.966135","48.602996",628.2],["17.966078","48.603031",627.6],["17.966212","48.602967",627.4],["17.966002","48.603094",627],["17.965619","48.603485",626.2],["17.965125","48.603778",625.6],["17.964529","48.604117",624],["17.964036","48.604948",621],["17.963738","48.605412",617.8],["17.963629","48.606076",612.8],["17.964026","48.607202",604.6],["17.964066","48.607684",601.8],["17.963726","48.608159",600.2],["17.964103","48.608921",595.4],["17.964749","48.610108",587.6],["17.964537","48.610628",584.8]]}},{"type":"Feature","properties":{"type":99,"segment":"36953","segmentName":"Pod marh\u00e1t","segmentDistance":"D\u013a\u017eka: 2.22 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.9 %<\/b>","segmentNameHref":"pod-marhat"},"geometry":{"type":"LineString","coordinates":[["17.950714","48.59435",575.8],["17.950714","48.59435",575.8],["17.950946","48.594815",575.4],["17.951444","48.595267",575.4],["17.952205","48.595746",576.6],["17.952994","48.595887",578.6],["17.954082","48.595577",582.2],["17.955821","48.595371",587],["17.956763","48.595398",589.6],["17.95754","48.59533",592.2],["17.958664","48.595294",595.8],["17.959358","48.595653",598.4],["17.959572","48.595591",599.2],["17.960546","48.595347",601.4],["17.962073","48.595322",604.2],["17.96335","48.595176",606.6],["17.963696","48.595221",607],["17.964592","48.595626",608.8],["17.965027","48.595898",610.4],["17.965045","48.596145",611.8],["17.964584","48.596693",614.2],["17.96424","48.597255",617.4],["17.964091","48.597566",618.4],["17.964203","48.597756",619.6],["17.964942","48.598165",621],["17.96593","48.598372",621.6],["17.966933","48.598678",622.2],["17.967821","48.598872",623],["17.968525","48.599098",624.2],["17.968576","48.599329",624.4],["17.968383","48.599773",624.4],["17.968523","48.600585",624.4],["17.968238","48.600885",624.6],["17.967581","48.601245",624.8],["17.967329","48.601777",626.4]]}},{"type":"Feature","properties":{"type":99,"segment":"1986","segmentName":"Z Bojnej na Krizovatku pod Marhatom","segmentDistance":"D\u013a\u017eka: 3.02 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.9 %<\/b>","segmentNameHref":"z-bojnej-na-krizovatku-pod-marhatom"},"geometry":{"type":"LineString","coordinates":[["17.989233","48.619868",348.6],["17.989233","48.619868",348.6],["17.988683","48.619996",349.4],["17.987482","48.620079",358.8],["17.986278","48.619998",367],["17.98474","48.619842",374],["17.983857","48.619742",377.2],["17.983265","48.619686",379],["17.982129","48.619593",382.8],["17.980671","48.619323",387],["17.979851","48.619183",389.2],["17.979096","48.619154",392],["17.977361","48.618824",398],["17.975825","48.618517",405.2],["17.9753","48.618363",408],["17.974483","48.61772",413.6],["17.9738","48.617188",418],["17.973456","48.617191",419.4],["17.973288","48.617453",421.2],["17.973157","48.617897",423.8],["17.972781","48.618398",426.8],["17.97188","48.618714",432],["17.970729","48.618763",437.2],["17.970196","48.61865",439.6],["17.969204","48.618035",445.6],["17.968681","48.617574",449.4],["17.968223","48.617268",453.4],["17.968097","48.616528",458.6],["17.968019","48.61609",461.8],["17.967935","48.61564",464.6],["17.967744","48.615512",465.6],["17.967449","48.615657",466.8],["17.967335","48.615927",468.2],["17.967239","48.616318",470],["17.96697","48.617158",475],["17.96672","48.617557",477.4],["17.965944","48.617811",481],["17.964652","48.618034",488.2],["17.964197","48.617953",491],["17.963798","48.617478",494.4],["17.963393","48.616882",496.6],["17.962365","48.616649",500.2],["17.961563","48.616655",504],["17.960515","48.616654",509.2],["17.95993","48.616728",512.2],["17.959023","48.616883",517.8]]}},{"type":"Feature","properties":{"type":99,"segment":"4131","segmentName":"BB \/ Staropramen","segmentDistance":"D\u013a\u017eka: 731.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -6.7 %<\/b>","segmentNameHref":"bb-staropramen"},"geometry":{"type":"LineString","coordinates":[["17.945612","48.606873",373.6],["17.945612","48.606873",373.6],["17.944226","48.607332",360.6],["17.943232","48.607738",351],["17.942344","48.608029",343],["17.940044","48.6087",325.2],["17.938103","48.609493",310.8]]}},{"type":"Feature","properties":{"type":99,"segment":"7386","segmentName":"Strieborn\u00edcka po odbo\u010dku do lesa","segmentDistance":"D\u013a\u017eka: 6.02 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.8 %<\/b>","segmentNameHref":"striebornicka-po-odbocku-do-lesa"},"geometry":{"type":"LineString","coordinates":[["17.877479","48.605975",198.6],["17.877479","48.605975",198.6],["17.877691","48.606153",197.8],["17.87757","48.606158",194],["17.877296","48.605925",194.2],["17.877296","48.605925",194.2],["17.876696","48.605938",195.2],["17.875717","48.605748",195.4],["17.874088","48.604915",193.4],["17.872754","48.604064",192.2],["17.871793","48.603773",190.6],["17.8699","48.602965",188.4],["17.868544","48.602689",185.6],["17.867645","48.602383",183],["17.866073","48.60256",180.2],["17.865425","48.602743",179.2],["17.864314","48.602472",177.4],["17.86269","48.602277",176.4],["17.862026","48.60199",173.2],["17.86134","48.601153",169.8],["17.861187","48.600334",168.6],["17.861654","48.599549",168.4],["17.862409","48.598619",168.2],["17.862249","48.597116",168],["17.861973","48.596318",167.6],["17.861076","48.595661",166.4],["17.8603","48.59507",166.6],["17.859068","48.594158",166.4],["17.857879","48.593291",165.4],["17.857154","48.593501",165.2],["17.855808","48.593889",165],["17.852991","48.594666",165.8],["17.851773","48.594775",165.6],["17.851731","48.594514",165.4],["17.85134","48.593975",165],["17.851","48.59362",164.8],["17.850828","48.593534",164.8],["17.850291","48.592977",162.8],["17.849531","48.592019",162.6],["17.848442","48.590631",162.6],["17.847737","48.589829",162.8],["17.8469","48.589391",163],["17.846422","48.589345",163.2],["17.845378","48.589507",163.2],["17.84505","48.589842",163.6],["17.844885","48.590146",164],["17.84375","48.590569",165.6],["17.84342","48.590368",166.4],["17.842498","48.589261",167.2],["17.84128","48.587972",167],["17.840968","48.587735",166.8],["17.839808","48.588222",167.2],["17.839049","48.588589",166.8],["17.838334","48.588466",164],["17.83724","48.588193",162.6],["17.835778","48.587565",162.8],["17.834102","48.587065",162],["17.833795","48.587086",162],["17.833668","48.587336",162.6],["17.833604","48.58747",162.6],["17.833503","48.587763",162.8],["17.833564","48.588173",162.8],["17.833659","48.588585",162.8],["17.833281","48.588878",163],["17.83266","48.589159",163.2],["17.831594","48.589755",162.8]]}}] var layerGroup = L.layerGroup().addTo(map_leaflet); var layerGroupAllSegments = L.layerGroup(); if (gpx_segments != undefined) { gpx_segments_layer = L.geoJson(gpx_segments, { style: function(feature, layer) { return { 'weight': 10, 'color': '#bb6300', 'opacity': 1, }; }, onEachFeature:onEachFeature, }); function onEachFeature(feature, layer) { sn++; var prop = layer.feature.properties; var desc = getDescription(prop.type, prop.trailName, prop.trailId, prop.trailStatus, prop.segmentName, prop.segment, prop.segmentDistance, prop.segmentGrade, prop.segmentNameHref); var sl = feature.geometry.coordinates[0][1]; var sr = feature.geometry.coordinates[0][0]; var el = feature.geometry.coordinates[feature.geometry.coordinates.length - 1][1]; var er = feature.geometry.coordinates[feature.geometry.coordinates.length - 1][0]; if (sl != '' && sr != '' && el != '' && er != '') { var sm = new L.marker(L.latLng(sl, sr), {icon: startIcon}); var em = new L.marker(L.latLng(el, er), {icon: endIcon}); } var layerGroup = L.featureGroup(); layerGroup.addLayer(sm); layerGroup.addLayer(em); sm.bindPopup(desc); em.bindPopup(desc); var popupLayer = L.popup().setLatLng(L.latLng(sl, sr)).setContent(desc); layerGroup.bindPopup(popupLayer).openPopup(); layerGroup.addLayer(layer); segments.push(layerGroup); layer.on("click", function(e) { var desc = getDescription(prop.type, prop.trailName, prop.trailId, prop.trailStatus, prop.segmentName, prop.segment, prop.segmentDistance, prop.segmentGrade, prop.segmentNameHref); if (desc) { var popup = L.popup() .setLatLng(e.latlng) .setContent(desc) .openOn(map_leaflet); } }); //controlLayers.addOverlay(layerGroup, 'Segmenty na trase - ' + feature.properties.segmentName); } var displaySeg = 0; function showSegment(seg) { segments[displaySeg].remove(map_leaflet); segments[displaySeg]._popup.remove(map_leaflet); segments[seg].addTo(map_leaflet); segments[seg]._popup.addTo(map_leaflet); displaySeg = seg; var bounds = segments[seg].getBounds(); map_leaflet.fitBounds(bounds, {padding: [30, 30]}); $.scrollTo( '#map_leaflet', 800, {offset: -120} ); } } // geo location through leaflet plugin var lc = L.control.locate({ drawCircle: false, follow: true, markerStyle: {color: '#000000',fillColor: '#ee7711',fillOpacity: 0.7,weight: 4,opacity: 0.7,radius: 7}, strings: { title: "Ukáž mi, kde sa nachádzam", // title of the locate control popup: "Si v okolí {distance} {unit} od tohto bodu", // text to appear if user clicks on circle outsideMapBoundsMsg: "Nachádzaš sa mimo oblasti tejto mapy" // default message for onLocationOutsideMapBounds } }).addTo(map_leaflet); map_leaflet.on('startfollowing', function() { map_leaflet.on('dragstart', lc.stopFollowing); }).on('stopfollowing', function() { map_leaflet.off('dragstart', lc.stopFollowing); }); $(document).ready(function() { map_leaflet.on('baselayerchange', function(){ var id = event.currentTarget.layerId; var layer = this._layers[id]; $.ajax({ type: "POST", url: "/ajax.php?u=Cyklotrasy&f=saveDefaultMap&a=" + layer.options.name, }); }) }); $('#elevationDiv').html(''); $('.elevation').appendTo('#elevationDiv'); //gallery carousel multiple items - hack $(function(){ // init arrows $('.gallery-carousel').each(function(){ var itemsPerSlide = 3; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); if ($('.carousel-item', this).length <= itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); } }); $('.gallery-carousel').on('slide.bs.carousel', function (e) { if (!window.matchMedia("(min-width: 768px)").matches) return; // default behaviour on mobile /* CC 2.0 License Iatek LLC 2018 - Attribution required */ var $e = $(e.relatedTarget); var idx = $e.index(); var itemsPerSlide = 3; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); var totalItems = $('.carousel-item', this).length; if ($(this).data('ended')==true && e.direction=='left'){ return false; } if (e.to===0){ $('.carousel-control-prev', this).addClass('disabled'); }else{ $('.carousel-control-prev', this).removeClass('disabled'); } if (e.to>=totalItems - itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); $(this).data('ended', true); }else{ $('.carousel-control-next', this).removeClass('disabled'); $(this).data('ended', false); } }); }); function initEkkoLightbox(){ $('[data-toggle="lightbox"]:not(.lightbox-ready)').on('click', function(event) { event.preventDefault(); event.stopImmediatePropagation(); //$(this).removeAttr('href').attr('role', 'button'); var $this = $(this); $this.ekkoLightbox({ alwaysShowClose: true, wrapping: false, //Whether the gallery should loop or not leftArrow: '', rightArrow: '', onNavigate: function(){ $('.ekko-lightbox').removeClass('zoomed'); }, onShow: function(){ if (!$this.hasClass('no-zoom')) { $('.ekko-lightbox .modal-header').prepend('zoom_inzoom_out'); } $('.ekko-lightbox .ekko-lightbox-item').bind('touchstart touchend touchup swipeLeft swipeRight', function(event) { if ($('.ekko-lightbox').hasClass('zoomed') || (window.visualViewport && window.visualViewport.scale > 1.02)){ event.stopPropagation(); } }); $('.ekko-lightbox .ekko-lightbox-nav-overlay').bind('touchstart touchend touchup swipeLeft swipeRight', function(event) { if ($('.ekko-lightbox').hasClass('pinch-zoomed') || (window.visualViewport && window.visualViewport.scale > 1.02)){ $('.ekko-lightbox').addClass('pinch-zoomed'); event.stopPropagation(); } if (window.visualViewport && window.visualViewport.scale <= 1.02){ setTimeout(function(){ if (window.visualViewport && window.visualViewport.scale <= 1.02){ //check again after timeout $('.ekko-lightbox').removeClass('pinch-zoomed'); } },100); } }); if (window.matchMedia("(min-width: 768px)").matches) { $('body').addClass('ekko-modal-open'); } onPopupOpened('ekko-lightbox'); }, onShown: function(){ }, onHidden: function(){ $('body').removeClass('ekko-modal-open'); onPopupClosed(); } }); return false; }); $('[data-toggle="lightbox"]').addClass('lightbox-ready'); } $(function(){ $('.show-alt-in-lightbox[data-toggle="lightbox"]').each(function(){ $(this).data('footer', $(this).find('img').attr('title')); }); $('body').on('click', '.ekko-lightbox-zoom', function(){ $('.ekko-lightbox').toggleClass('zoomed'); }); $('body').on('click', '.ekko-lightbox.zoomed .ekko-lightbox-item.show ', function(){ $('.ekko-lightbox').removeClass('zoomed'); }) initEkkoLightbox(); $(document).ajaxComplete(function(event, xhr, settings) { //if (xhr.responseText.indexOf('lightbox') >= 0){ initEkkoLightbox(); //} }); }); function favoriteRide(ride) { $.ajax({ type: "POST", data: {id : ride, ride : 1}, dataType: "json", url: "/ajax.php?u=cyklotrasy&f=toggleFavourite", success: function(data) { if (data.added === 1) { $('.btn-wishlist.show-add-to-wishlist').hide(); $('.btn-wishlist.show-remove-from-wishlist').show(); //potrebuje dllllho zobrazit showMessageBar('#favoriteSuccess', 60*1000); } else { $('.btn-wishlist.show-remove-from-wishlist').hide(); $('.btn-wishlist.show-add-to-wishlist').show(); showMessageBar('#favoriteSuccessRemove'); } } }); } $(document).ready(function(){ //mobile map popup $('.close-map-widget').click(function(){ $('#map-widget').removeClass('show'); return false; }); $('.show-map-widget').click(function(){ $('#map-widget').addClass('show'); return false; }); $('a[href="#comments"]').on('click', function(e){ e.preventDefault(); commentsScroll('#comments'); return false; }); if ($('#segmenty').length){ if (location.hash.indexOf('#segmenty')>=0){ if (window.innerWidth>=768){ $.scrollTo( '#segmenty', 800, {offset: -100} ); } $('#segmenty-expander').prop('checked', true); } var $pagination = $('#segmentyList table .pagination-wrap'); $pagination.appendTo('#segmentyList'); $('#segmentyList .row-pagination').remove(); } }); 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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTIwNjczNzImaXRlbU5hbWU9ViVDMyVCRGphemQrJUM0JThELisyMDY3MzcyJmNvbW1lbnRUeXBlPWNvbW1lbnQmYXV0aG9yVXNlcklkPTMxNjk0JndpZGdldElkPWNvbW1lbnRzJmFsbG93SW5zZXJ0PTEmYWxsb3dSZXBseT0xJnJldHVyblVybD1odHRwcyUzQSUyRiUyRnd3dy5tdGhpa2VyLnNrJTJGYWt0aXZpdHklMkYyMDY3MzcyJTJGYmljeWtlbC1hZnRlcm5vb24tbW91bnRhaW4uaHRtbCZwYXJzZWRVcmwlNUJzY2hlbWUlNUQ9aHR0cHMmcGFyc2VkVXJsJTVCaG9zdCU1RD13d3cubXRoaWtlci5zayZwYXJzZWRVcmwlNUJwYXRoJTVEPSUyRmFrdGl2aXR5JTJGMjA2NzM3MiUyRmJpY3lrZWwtYWZ0ZXJub29uLW1vdW50YWluLmh0bWwmaW5jbHVkZUNvbW1lbnRJZD0w|" + 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"; }); }); }); -->