$(document).ready(function() { $.fn.dataTable.ext.order['sortMln'] = function ( settings, col ) { return this.api().column( col, {order:'index'} ).nodes().map( function ( td ) { return 1*$(td).text().replace(' mil.', ''); } ); }; $.fn.dataTable.ext.order['sortCountryFlag'] = function ( settings, col ) { return this.api().column( col, {order:'index'} ).nodes().map( function ( td ) { return $('i', td).attr('title'); } ); }; $.fn.dataTable.ext.order['sortMostPopular'] = function ( settings, col ) { return this.api().column( col, {order:'index'} ).nodes().map( function ( td ) { return 1*$(td).text().substr(0,$(td).text().indexOf("x")-1); } ); }; }); var countries = {"109":{"id":"109","country":"Denmark","countryCode":"DK","countryTr":"D\u00e1nsko"},"9":{"id":"9","country":"Russia","countryCode":"RU","countryTr":"Rusko"},"76":{"id":"76","country":"Belgium","countryCode":"BE","countryTr":"Belgie"},"3":{"id":"3","country":"United States","countryCode":"US","countryTr":"USA"},"51":{"id":"51","country":"Australia","countryCode":"AU","countryTr":"Austr\u00e1lie"},"23":{"id":"23","country":"Italy","countryCode":"IT","countryTr":"It\u00e1lie"},"81":{"id":"81","country":"Serbia","countryCode":"RS","countryTr":"Srbsko"},"84":{"id":"84","country":"Belarus","countryCode":"BY","countryTr":"B\u011blorusko"},"1":{"id":"1","country":"China","countryCode":"CN","countryTr":"\u010c\u00edna"},"96":{"id":"96","country":"Israel","countryCode":"IL","countryTr":"Izrael"},"33":{"id":"33","country":"Poland","countryCode":"PL","countryTr":"Polsko"},"19":{"id":"19","country":"France","countryCode":"FR","countryTr":"Francie"},"150":{"id":"150","country":"Estonia","countryCode":"EE","countryTr":"Estonsko"},"28":{"id":"28","country":"Spain","countryCode":"ES","countryTr":"\u0160pan\u011blsko"},"52":{"id":"52","country":"Romania","countryCode":"RO","countryTr":"Rumunsko"},"110":{"id":"110","country":"Slovakia","countryCode":"SK","countryTr":"Slovensko"},"14":{"id":"14","country":"Germany","countryCode":"DE","countryTr":"N\u011bmecko"},"78":{"id":"78","country":"Czech Republic","countryCode":"CZ","countryTr":"\u010cesk\u00e1 republika"},"95":{"id":"95","country":"Bulgaria","countryCode":"BG","countryTr":"Bulharsko"},"27":{"id":"27","country":"Ukraine","countryCode":"UA","countryTr":"Ukrajina"},"80":{"id":"80","country":"Hungary","countryCode":"HU","countryTr":"Ma\u010farsko"},"62":{"id":"62","country":"Kazakhstan","countryCode":"KZ","countryTr":"Kazachst\u00e1n"},"94":{"id":"94","country":"Swiss","countryCode":"CH","countryTr":"\u0160v\u00fdcarsko"},"142":{"id":"142","country":"Latvia","countryCode":"LV","countryTr":"Loty\u0161sko"},"145":{"id":"145","country":"Slovenia","countryCode":"SI","countryTr":"Slovinsko"},"31":{"id":"31","country":"Argentina","countryCode":"AR","countryTr":"Argentina"},"10":{"id":"10","country":"Japan","countryCode":"JP","countryTr":"Japonsko"},"88":{"id":"88","country":"Sweden","countryCode":"SE","countryTr":"\u0160v\u00e9dsko"},"22":{"id":"22","country":"United Kingdom","countryCode":"GB","countryTr":"Velk\u00e1 Brit\u00e1nie"},"20":{"id":"20","country":"Thailand","countryCode":"TH","countryTr":"Thajsko"},"44":{"id":"44","country":"Uzbekistan","countryCode":"UZ","countryTr":"Uzbekist\u00e1n"},"93":{"id":"93","country":"Austria","countryCode":"AT","countryTr":"Rakousko"},"120":{"id":"120","country":"Croatia","countryCode":"HR","countryTr":"Chorvatsko"},"26":{"id":"26","country":"South Africa","countryCode":"ZA","countryTr":"Jihoafrick\u00e1 republika"},"36":{"id":"36","country":"Canada","countryCode":"CA","countryTr":"Kanada"},"49":{"id":"49","country":"Taiwan","countryCode":"TW","countryTr":"Tchaj-wan"},"29":{"id":"29","country":"Colombia","countryCode":"CO","countryTr":"Kolumbie"},"169":{"id":"169","country":"Luxembourg","countryCode":"LU","countryTr":"Lucembursko"},"61":{"id":"61","country":"Netherlands","countryCode":"NL","countryTr":"Nizozemsko"},"25":{"id":"25","country":"South Korea","countryCode":"KR","countryTr":"Ji\u017en\u00ed Korea"},"2":{"id":"2","country":"India","countryCode":"IN","countryTr":"Indie"},"74":{"id":"74","country":"Greece","countryCode":"GR","countryTr":"\u0158ecko"},"104":{"id":"104","country":"Paraguay","countryCode":"PY","countryTr":"Paraguay"},"17":{"id":"17","country":"Turkey","countryCode":"TR","countryTr":"Turecko"},"121":{"id":"121","country":"Georgia","countryCode":"GE","countryTr":"Gruzie"},"77":{"id":"77","country":"Portugal","countryCode":"PT","countryTr":"Portugalsko"},"98":{"id":"98","country":"Hong Kong","countryCode":"HK","countryTr":"Hongkong"},"5":{"id":"5","country":"Brasil","countryCode":"BR","countryTr":"Braz\u00edlie"},"40":{"id":"40","country":"Peru","countryCode":"PE","countryTr":"Peru"},"113":{"id":"113","country":"Kyrgyzstan","countryCode":"KG","countryTr":"Kyrgyzst\u00e1n"},"112":{"id":"112","country":"Finland","countryCode":"FI","countryTr":"Finsko"},"208":{"id":"208","country":"Liechtenstein","countryCode":"LI","countryTr":"Lichten\u0161tejnsko"},"86":{"id":"86","country":"Bolivia","countryCode":"BO","countryTr":"Bol\u00edvie"},"124":{"id":"124","country":"New Zealand","countryCode":"NZ","countryTr":"Nov\u00fd Z\u00e9land"},"4":{"id":"4","country":"Indonesia","countryCode":"ID","countryTr":"Indon\u00e9sie"},"141":{"id":"141","country":"Oman","countryCode":"OM","countryTr":"Om\u00e1n"},"132":{"id":"132","country":"Lithuania","countryCode":"LT","countryTr":"Litva"},"60":{"id":"60","country":"Chile","countryCode":"CL","countryTr":"Chile"},"79":{"id":"79","country":"Tunisia","countryCode":"TN","countryTr":"Tunisko"},"37":{"id":"37","country":"Morocco","countryCode":"MA","countryTr":"Maroko"},"127":{"id":"127","country":"Bosnia and Herzegovina","countryCode":"BA","countryTr":"Bosna a Hercegovina"},"42":{"id":"42","country":"Venezuela","countryCode":"VE","countryTr":"Venezuela"},"159":{"id":"159","country":"Cyprus","countryCode":"CY","countryTr":"Kypr"},"134":{"id":"134","country":"Uruguay","countryCode":"UY","countryTr":"Uruguay"},"118":{"id":"118","country":"Ireland","countryCode":"IE","countryTr":"Irsko"},"66":{"id":"66","country":"Ecuador","countryCode":"EC","countryTr":"Ekv\u00e1dor"},"82":{"id":"82","country":"Dominican Republic","countryCode":"DO","countryTr":"Dominik\u00e1nsk\u00e1 republika"},"11":{"id":"11","country":"Mexico","countryCode":"MX","countryTr":"Mexiko"},"131":{"id":"131","country":"Moldova","countryCode":"MD","countryTr":"Moldavsko"},"16":{"id":"16","country":"Egypt","countryCode":"EG","countryTr":"Egypt"},"85":{"id":"85","country":"Haiti","countryCode":"HT","countryTr":"Haiti"},"209":{"id":"209","country":"Monaco","countryCode":"MC","countryTr":"Monako"},"126":{"id":"126","country":"Puerto Rico","countryCode":"PR","countryTr":"Portoriko"},"122":{"id":"122","country":"United Arab Emirates","countryCode":"AE","countryTr":"Spojen\u00e9 arabsk\u00e9 emir\u00e1ty"},"164":{"id":"164","country":"Montenegro","countryCode":"ME","countryTr":"\u010cern\u00e1 hora"},"117":{"id":"117","country":"Norway","countryCode":"NO","countryTr":"Norsko"},"177":{"id":"177","country":"Barbados","countryCode":"BB","countryTr":"Barbados"},"144":{"id":"144","country":"North Macedonia","countryCode":"MK","countryTr":"Severn\u00ed Makedonie"},"99":{"id":"99","country":"El Salvador","countryCode":"SV","countryTr":"Salvador"},"156":{"id":"156","country":"Qatar","countryCode":"QA","countryTr":"Katar"},"69":{"id":"69","country":"Zimbabwe","countryCode":"ZW","countryTr":"Zimbabwe"},"125":{"id":"125","country":"Lebanon","countryCode":"LB","countryTr":"Libanon"},"102":{"id":"102","country":"Papua New Guinea","countryCode":"PG","countryTr":"Papua Nov\u00e1 Guinea"},"199":{"id":"199","country":"Andorra","countryCode":"AD","countryTr":"Andora"},"12":{"id":"12","country":"Philippines","countryCode":"PH","countryTr":"Filip\u00edny"},"135":{"id":"135","country":"Armenia","countryCode":"AM","countryTr":"Arm\u00e9nie"},"92":{"id":"92","country":"Burundi","countryCode":"BI","countryTr":"Burundi"},"172":{"id":"172","country":"Malta","countryCode":"MT","countryTr":"Malta"},"13":{"id":"13","country":"Vietnam","countryCode":"VN","countryTr":"Vietnam"},"105":{"id":"105","country":"Jordan","countryCode":"JO","countryTr":"Jord\u00e1nsko"}}; var teams = [{"id":0,"name":""}]; var sportsmen = [{"id":"3588","tem":"0","ctr":"81","nam":"Djokovic, Novak ","namorig":"Djokovic, Novak ","cat":"A","pri":"0","rat":0,"mw":"M","link":"Djokovic, Novak <\/a>","confirmed_c":1},{"id":"7522","tem":"45","ctr":"14","nam":"Zverev, Alexander ","namorig":"Zverev, Alexander ","cat":"A","pri":"0","rat":0,"mw":"M","link":"Zverev, Alexander <\/a>","confirmed_c":1},{"id":"10369","tem":"45","ctr":"9","nam":"Khachanov, Karen ","namorig":"Khachanov, Karen ","cat":"B","pri":"0","rat":0,"mw":"M","link":"Khachanov, Karen <\/a>","confirmed_c":1},{"id":"3683","tem":"0","ctr":"10","nam":"Nishikori, Kei ","namorig":"Nishikori, Kei ","cat":"B","pri":"0","rat":0,"mw":"M","link":"Nishikori, Kei <\/a>","confirmed_c":1},{"id":"3741","tem":"0","ctr":"36","nam":"Raonic, Milos ","namorig":"Raonic, Milos ","cat":"B","pri":"0","rat":0,"mw":"M","link":"Raonic, Milos <\/a>","confirmed_c":1},{"id":"8555","tem":"45","ctr":"93","nam":"Thiem, Dominic ","namorig":"Thiem, Dominic ","cat":"B","pri":"0","rat":0,"mw":"M","link":"Thiem, Dominic <\/a>","confirmed_c":1},{"id":"17109","tem":"45","ctr":"74","nam":"Tsitsipas, Stefanos ","namorig":"Tsitsipas, Stefanos ","cat":"B","pri":"0","rat":0,"mw":"M","link":"Tsitsipas, Stefanos <\/a>","confirmed_c":1},{"id":"3646","tem":"0","ctr":"26","nam":"Anderson, Kevin ","namorig":"Anderson, Kevin ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Anderson, Kevin <\/a>","confirmed_c":1},{"id":"3599","tem":"0","ctr":"120","nam":"Cilic, Marin ","namorig":"Cilic, Marin ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Cilic, Marin <\/a>","confirmed_c":1},{"id":"10809","tem":"45","ctr":"120","nam":"Coric, Borna ","namorig":"Coric, Borna ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Coric, Borna <\/a>","confirmed_c":1},{"id":"7446","tem":"45","ctr":"22","nam":"Edmund, Kyle ","namorig":"Edmund, Kyle ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Edmund, Kyle <\/a>","confirmed_c":1},{"id":"7414","tem":"45","ctr":"51","nam":"Kyrgios, Nick ","namorig":"Kyrgios, Nick ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Kyrgios, Nick <\/a>","confirmed_c":1},{"id":"15867","tem":"45","ctr":"9","nam":"Medvedev, Daniil ","namorig":"Medvedev, Daniil ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Medvedev, Daniil <\/a>","confirmed_c":1},{"id":"3597","tem":"0","ctr":"19","nam":"Monfils, Gael ","namorig":"Monfils, Gael ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Monfils, Gael <\/a>","confirmed_c":1},{"id":"15959","tem":"45","ctr":"36","nam":"Shapovalov, Denis ","namorig":"Shapovalov, Denis ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Shapovalov, Denis <\/a>","confirmed_c":1},{"id":"3606","tem":"0","ctr":"94","nam":"Wawrinka, Stan ","namorig":"Wawrinka, Stan ","cat":"C","pri":"0","rat":0,"mw":"M","link":"Wawrinka, Stan <\/a>","confirmed_c":1},{"id":"11475","tem":"45","ctr":"121","nam":"Basilashvili, Nikoloz ","namorig":"Basilashvili, Nikoloz ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Basilashvili, Nikoloz <\/a>","confirmed_c":1},{"id":"3755","tem":"0","ctr":"28","nam":"Bautista Agut, Roberto ","namorig":"Bautista Agut, Roberto ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Bautista Agut, Roberto <\/a>","confirmed_c":1},{"id":"3691","tem":"0","ctr":"95","nam":"Dimitrov, Grigor ","namorig":"Dimitrov, Grigor ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Dimitrov, Grigor <\/a>","confirmed_c":1},{"id":"11472","tem":"45","ctr":"80","nam":"Fucsovics, Marton ","namorig":"Fucsovics, Marton ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Fucsovics, Marton <\/a>","confirmed_c":1},{"id":"3814","tem":"0","ctr":"76","nam":"Goffin, David ","namorig":"Goffin, David ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Goffin, David <\/a>","confirmed_c":1},{"id":"19251","tem":"45","ctr":"33","nam":"Hurkacz, Hubert ","namorig":"Hurkacz, Hubert ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Hurkacz, Hubert <\/a>","confirmed_c":1},{"id":"3799","tem":"0","ctr":"81","nam":"Krajinovic, Filip ","namorig":"Krajinovic, Filip ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Krajinovic, Filip <\/a>","confirmed_c":1},{"id":"3789","tem":"0","ctr":"51","nam":"Millman, John ","namorig":"Millman, John ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Millman, John <\/a>","confirmed_c":1},{"id":"7408","tem":"45","ctr":"19","nam":"Pouille, Lucas ","namorig":"Pouille, Lucas ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Pouille, Lucas <\/a>","confirmed_c":1},{"id":"6635","tem":"45","ctr":"31","nam":"Schwartzman, Diego ","namorig":"Schwartzman, Diego ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Schwartzman, Diego <\/a>","confirmed_c":1},{"id":"10744","tem":"45","ctr":"3","nam":"Tiafoe, Frances ","namorig":"Tiafoe, Frances ","cat":"D","pri":"0","rat":0,"mw":"M","link":"Tiafoe, Frances <\/a>","confirmed_c":1},{"id":"8557","tem":"45","ctr":"23","nam":"Cecchinato, Marco ","namorig":"Cecchinato, Marco ","cat":"E","pri":"0","rat":0,"mw":"M","link":"Cecchinato, Marco <\/a>","confirmed_c":1},{"id":"3640","tem":"0","ctr":"23","nam":"Fognini, Fabio ","namorig":"Fognini, Fabio ","cat":"E","pri":"0","rat":0,"mw":"M","link":"Fognini, Fabio <\/a>","confirmed_c":1},{"id":"12466","tem":"45","ctr":"3","nam":"Fritz, Taylor ","namorig":"Fritz, Taylor ","cat":"E","pri":"0","rat":0,"mw":"M","link":"Fritz, Taylor <\/a>","confirmed_c":1},{"id":"4174","tem":"0","ctr":"3","nam":"Johnson, Steve ","namorig":"Johnson, Steve ","cat":"E","pri":"0","rat":0,"mw":"M","link":"Johnson, Steve <\/a>","confirmed_c":1},{"id":"19248","tem":"45","ctr":"81","nam":"Kecmanovic, Miomir ","namorig":"Kecmanovic, Miomir ","cat":"E","pri":"0","rat":0,"mw":"M","link":"Kecmanovic, Miomir <\/a>","confirmed_c":1},{"id":"3943","tem":"0","ctr":"14","nam":"Struff, Jan-Lennard ","namorig":"Struff, Jan-Lennard ","cat":"E","pri":"0","rat":0,"mw":"M","link":"Struff, Jan-Lennard <\/a>","confirmed_c":1},{"id":"3986","tem":"0","ctr":"131","nam":"Albot, Radu ","namorig":"Albot, Radu ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Albot, Radu <\/a>","confirmed_c":1},{"id":"6208","tem":"0","ctr":"31","nam":"Andreozzi, Guido ","namorig":"Andreozzi, Guido ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Andreozzi, Guido <\/a>","confirmed_c":1},{"id":"18377","tem":"45","ctr":"36","nam":"Auger-Aliassime, Felix ","namorig":"Auger-Aliassime, Felix ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Auger-Aliassime, Felix <\/a>","confirmed_c":1},{"id":"18115","tem":"45","ctr":"23","nam":"Berrettini, Matteo ","namorig":"Berrettini, Matteo ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Berrettini, Matteo <\/a>","confirmed_c":1},{"id":"16525","tem":"45","ctr":"62","nam":"Bublik, Alexander ","namorig":"Bublik, Alexander ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Bublik, Alexander <\/a>","confirmed_c":1},{"id":"7314","tem":"45","ctr":"28","nam":"Carballes Baena, Roberto ","namorig":"Carballes Baena, Roberto ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Carballes Baena, Roberto <\/a>","confirmed_c":1},{"id":"3875","tem":"0","ctr":"52","nam":"Copil, Marius ","namorig":"Copil, Marius ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Copil, Marius <\/a>","confirmed_c":1},{"id":"3648","tem":"0","ctr":"134","nam":"Cuevas, Pablo ","namorig":"Cuevas, Pablo ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Cuevas, Pablo <\/a>","confirmed_c":1},{"id":"10807","tem":"45","ctr":"10","nam":"Daniel, Taro ","namorig":"Daniel, Taro ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Daniel, Taro <\/a>","confirmed_c":1},{"id":"3745","tem":"0","ctr":"31","nam":"Delbonis, Federico ","namorig":"Delbonis, Federico ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Delbonis, Federico <\/a>","confirmed_c":1},{"id":"8561","tem":"45","ctr":"127","nam":"Dzumhur, Damir ","namorig":"Dzumhur, Damir ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Dzumhur, Damir <\/a>","confirmed_c":1},{"id":"3781","tem":"0","ctr":"51","nam":"Ebden, Matthew ","namorig":"Ebden, Matthew ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Ebden, Matthew <\/a>","confirmed_c":1},{"id":"17175","tem":"45","ctr":"3","nam":"Eubanks, Christopher ","namorig":"Eubanks, Christopher ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Eubanks, Christopher <\/a>","confirmed_c":1},{"id":"3948","tem":"0","ctr":"22","nam":"Evans, Daniel ","namorig":"Evans, Daniel ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Evans, Daniel <\/a>","confirmed_c":1},{"id":"3592","tem":"0","ctr":"28","nam":"Ferrer, David ","namorig":"Ferrer, David ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Ferrer, David <\/a>","confirmed_c":1},{"id":"3609","tem":"0","ctr":"142","nam":"Gulbis, Ernests ","namorig":"Gulbis, Ernests ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Gulbis, Ernests <\/a>","confirmed_c":1},{"id":"17138","tem":"45","ctr":"2","nam":"Gunneswaran, Prajnesh ","namorig":"Gunneswaran, Prajnesh ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Gunneswaran, Prajnesh <\/a>","confirmed_c":1},{"id":"3650","tem":"0","ctr":"61","nam":"Haase, Robin ","namorig":"Haase, Robin ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Haase, Robin <\/a>","confirmed_c":1},{"id":"17131","tem":"45","ctr":"26","nam":"Harris, Lloyd ","namorig":"Harris, Lloyd ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Harris, Lloyd <\/a>","confirmed_c":1},{"id":"8438","tem":"45","ctr":"19","nam":"Herbert, Pierre-Hugues ","namorig":"Herbert, Pierre-Hugues ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Herbert, Pierre-Hugues <\/a>","confirmed_c":1},{"id":"21554","tem":"45","ctr":"19","nam":"Humbert, Ugo ","namorig":"Humbert, Ugo ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Humbert, Ugo <\/a>","confirmed_c":1},{"id":"16461","tem":"45","ctr":"84","nam":"Ivashka, Ilya ","namorig":"Ivashka, Ilya ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Ivashka, Ilya <\/a>","confirmed_c":1},{"id":"11486","tem":"45","ctr":"60","nam":"Jarry, Nicolas ","namorig":"Jarry, Nicolas ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Jarry, Nicolas <\/a>","confirmed_c":1},{"id":"5394","tem":"0","ctr":"3","nam":"Kudla, Denis ","namorig":"Kudla, Denis ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Kudla, Denis <\/a>","confirmed_c":1},{"id":"18795","tem":"45","ctr":"14","nam":"Kuhn, Nicola ","namorig":"Kuhn, Nicola ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Kuhn, Nicola <\/a>","confirmed_c":1},{"id":"3644","tem":"0","ctr":"62","nam":"Kukushkin, Mikhail ","namorig":"Kukushkin, Mikhail ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Kukushkin, Mikhail <\/a>","confirmed_c":1},{"id":"3674","tem":"0","ctr":"110","nam":"Lacko, Lukas ","namorig":"Lacko, Lukas ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Lacko, Lukas <\/a>","confirmed_c":1},{"id":"6634","tem":"45","ctr":"81","nam":"Lajovic, Dusan ","namorig":"Lajovic, Dusan ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Lajovic, Dusan <\/a>","confirmed_c":1},{"id":"3668","tem":"0","ctr":"19","nam":"Mannarino, Adrian ","namorig":"Mannarino, Adrian ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Mannarino, Adrian <\/a>","confirmed_c":1},{"id":"12412","tem":"45","ctr":"14","nam":"Marterer, Maximilian ","namorig":"Marterer, Maximilian ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Marterer, Maximilian <\/a>","confirmed_c":1},{"id":"7616","tem":"45","ctr":"3","nam":"McDonald, Mackenzie ","namorig":"McDonald, Mackenzie ","cat":"F","pri":"0","rat":0,"mw":"M","link":"McDonald, Mackenzie <\/a>","confirmed_c":1},{"id":"15649","tem":"45","ctr":"5","nam":"Monteiro, Thiago ","namorig":"Monteiro, Thiago ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Monteiro, Thiago <\/a>","confirmed_c":1},{"id":"12337","tem":"45","ctr":"28","nam":"Munar, Jaume ","namorig":"Munar, Jaume ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Munar, Jaume <\/a>","confirmed_c":1},{"id":"17136","tem":"45","ctr":"22","nam":"Norrie, Cameron ","namorig":"Norrie, Cameron ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Norrie, Cameron <\/a>","confirmed_c":1},{"id":"15958","tem":"45","ctr":"3","nam":"Opelka, Reilly ","namorig":"Opelka, Reilly ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Opelka, Reilly <\/a>","confirmed_c":1},{"id":"3737","tem":"0","ctr":"19","nam":"Paire, Benoit ","namorig":"Paire, Benoit ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Paire, Benoit <\/a>","confirmed_c":1},{"id":"3708","tem":"0","ctr":"28","nam":"Ramos-Vinolas, Albert ","namorig":"Ramos-Vinolas, Albert ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Ramos-Vinolas, Albert <\/a>","confirmed_c":1},{"id":"12149","tem":"45","ctr":"9","nam":"Rublev, Andrey ","namorig":"Rublev, Andrey ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Rublev, Andrey <\/a>","confirmed_c":1},{"id":"17117","tem":"45","ctr":"117","nam":"Ruud, Casper ","namorig":"Ruud, Casper ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Ruud, Casper <\/a>","confirmed_c":1},{"id":"17107","tem":"45","ctr":"3","nam":"Sandgren, Tennys ","namorig":"Sandgren, Tennys ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Sandgren, Tennys <\/a>","confirmed_c":1},{"id":"15823","tem":"45","ctr":"23","nam":"Sonego, Lorenzo ","namorig":"Sonego, Lorenzo ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Sonego, Lorenzo <\/a>","confirmed_c":1},{"id":"3829","tem":"0","ctr":"77","nam":"Sousa, Joao ","namorig":"Sousa, Joao ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Sousa, Joao <\/a>","confirmed_c":1},{"id":"9696","tem":"45","ctr":"51","nam":"Thompson, Jordan ","namorig":"Thompson, Jordan ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Thompson, Jordan <\/a>","confirmed_c":1},{"id":"3793","tem":"0","ctr":"51","nam":"Tomic, Bernard ","namorig":"Tomic, Bernard ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Tomic, Bernard <\/a>","confirmed_c":1},{"id":"22207","tem":"45","ctr":"49","nam":"Tseng, Chun-Hsin ","namorig":"Tseng, Chun-Hsin ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Tseng, Chun-Hsin <\/a>","confirmed_c":1},{"id":"3667","tem":"0","ctr":"14","nam":"Zverev, Mischa ","namorig":"Zverev, Mischa ","cat":"F","pri":"0","rat":0,"mw":"M","link":"Zverev, Mischa <\/a>","confirmed_c":1}]; var sportsmenTeams = []; var showTeams = 0; //*********************** //SPORTSMEN TABLE HEADERS //*********************** var headersTableSportsmen = [ { 'sTitle': 'Č.' }, { 'sTitle': 'Skupina' }, { 'sTitle': 'Země', 'sSortDataType': 'sortCountryFlag', sType : "text" }, { 'sTitle': 'Tenista'}, { 'sTitle': 'Hodnota', 'sSortDataType': 'sortMln', 'sType': 'numeric' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'Tým' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'M/Ž' , 'bSearchable': false, 'bVisible': false } ]; //*********************** //TEAMS TABLE HEADERS //*********************** var headersTableTeams = [ {'sTitle': 'Č.'}, { 'sTitle': 'Skupina' }, {'sTitle': '' , 'bSearchable': false, 'bVisible': false }, {'sTitle': 'Země' , 'sSortDataType': 'sortCountryFlag', sType : 'text' }, { 'sTitle': ''}, { 'sTitle': 'Hodnota', 'sSortDataType': 'sortMln', 'sType': 'numeric' , 'bSearchable': false, 'bVisible': false } ]; //*********************** //SPORTSMEN TABLE CONTENT //*********************** var contentTableSportsmen = []; $.each(sportsmen, function(k, v) { contentTableSportsmen.push([ k + 1, v['cat'], getFlag(v['ctr']), v['link'], v['pri'], isset(teams[v['tem']])? teams[v['tem']]['name']:'', v['mw'] ]); }); //*********************** //TEAMS TABLE CONTENT //*********************** var contentTableTeams = []; $.each(sportsmenTeams, function(k, v) { contentTableTeams.push([ k + 1, v['cat'], "", getFlag(v['ctr']), v['nam'], v['pri'] ]); }); function isset (va) { return typeof va != 'undefined'; } $(document).ready(function() { $.fn.dataTable.ext.order['sortMln'] = function (settings, col) { return this.api().column(col, {order: 'index'}).nodes().map(function (td) { return parseFloat($(td).text().replace(' mil.', '').replace(',', '.')); } ); }; if (sportsmen.length) { var sportsmenTable = $('#tblSportsmen').dataTable( { "bPaginate": false, "bFilter": true, "bInfo": false, "bAutoWidth": true, "aoColumns" : headersTableSportsmen, "aaData": contentTableSportsmen, "bAutoWidth": false } ); } if (sportsmenTeams.length) { var sportsmenTeamsTable = $('#tblTeams').dataTable( { "bPaginate": false, "bFilter": true, "bInfo": false, "bAutoWidth": true, "aoColumns" : headersTableTeams, "aaData": contentTableTeams, "bAutoWidth": false } ); $('#teamsOverview').show(); } } ); function getFlag(id, margin) { if (!id || typeof countries[id] === "undefined" ) return ""; if (typeof margin == 'undefined') margin = true; return ""; }