$(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(' mln.', ''); } ); }; $.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":"Denemarken"},"9":{"id":"9","country":"Russia","countryCode":"RU","countryTr":"Rusland"},"76":{"id":"76","country":"Belgium","countryCode":"BE","countryTr":"Belgi\u00eb"},"3":{"id":"3","country":"United States","countryCode":"US","countryTr":"Verenigde Staten"},"51":{"id":"51","country":"Australia","countryCode":"AU","countryTr":"Australi\u00eb"},"23":{"id":"23","country":"Italy","countryCode":"IT","countryTr":"Itali\u00eb"},"81":{"id":"81","country":"Serbia","countryCode":"RS","countryTr":"Servi\u00eb"},"84":{"id":"84","country":"Belarus","countryCode":"BY","countryTr":"Wit-Rusland"},"1":{"id":"1","country":"China","countryCode":"CN","countryTr":"China"},"96":{"id":"96","country":"Israel","countryCode":"IL","countryTr":"Isra\u00ebl"},"33":{"id":"33","country":"Poland","countryCode":"PL","countryTr":"Polen"},"19":{"id":"19","country":"France","countryCode":"FR","countryTr":"Frankrijk"},"150":{"id":"150","country":"Estonia","countryCode":"EE","countryTr":"Estland"},"28":{"id":"28","country":"Spain","countryCode":"ES","countryTr":"Spanje"},"52":{"id":"52","country":"Romania","countryCode":"RO","countryTr":"Roemeni\u00eb"},"110":{"id":"110","country":"Slovakia","countryCode":"SK","countryTr":"Slowakije"},"14":{"id":"14","country":"Germany","countryCode":"DE","countryTr":"Duitsland"},"78":{"id":"78","country":"Czech Republic","countryCode":"CZ","countryTr":"Tsjechi\u00eb"},"95":{"id":"95","country":"Bulgaria","countryCode":"BG","countryTr":"Bulgarije"},"27":{"id":"27","country":"Ukraine","countryCode":"UA","countryTr":"Oekra\u00efne"},"80":{"id":"80","country":"Hungary","countryCode":"HU","countryTr":"Hongarije"},"62":{"id":"62","country":"Kazakhstan","countryCode":"KZ","countryTr":"Kazachstan"},"94":{"id":"94","country":"Swiss","countryCode":"CH","countryTr":"Zwitserland"},"142":{"id":"142","country":"Latvia","countryCode":"LV","countryTr":"Letland"},"145":{"id":"145","country":"Slovenia","countryCode":"SI","countryTr":"Sloveni\u00eb"},"31":{"id":"31","country":"Argentina","countryCode":"AR","countryTr":"Argentini\u00eb"},"10":{"id":"10","country":"Japan","countryCode":"JP","countryTr":"Japan"},"88":{"id":"88","country":"Sweden","countryCode":"SE","countryTr":"Zweden"},"22":{"id":"22","country":"United Kingdom","countryCode":"GB","countryTr":"Verenigd Koninkrijk"},"20":{"id":"20","country":"Thailand","countryCode":"TH","countryTr":"Thailand"},"44":{"id":"44","country":"Uzbekistan","countryCode":"UZ","countryTr":"Oezbekistan"},"93":{"id":"93","country":"Austria","countryCode":"AT","countryTr":"Oostenrijk"},"120":{"id":"120","country":"Croatia","countryCode":"HR","countryTr":"Kroati\u00eb"},"26":{"id":"26","country":"South Africa","countryCode":"ZA","countryTr":"Zuid-Afrika"},"36":{"id":"36","country":"Canada","countryCode":"CA","countryTr":"Canada"},"49":{"id":"49","country":"Taiwan","countryCode":"TW","countryTr":"Taiwan"},"29":{"id":"29","country":"Colombia","countryCode":"CO","countryTr":"Colombia"},"169":{"id":"169","country":"Luxembourg","countryCode":"LU","countryTr":"Luxemburg"},"61":{"id":"61","country":"Netherlands","countryCode":"NL","countryTr":"Nederland"},"25":{"id":"25","country":"South Korea","countryCode":"KR","countryTr":"Zuid-Korea"},"2":{"id":"2","country":"India","countryCode":"IN","countryTr":"India"},"74":{"id":"74","country":"Greece","countryCode":"GR","countryTr":"Griekenland"},"104":{"id":"104","country":"Paraguay","countryCode":"PY","countryTr":"Paraguay"},"17":{"id":"17","country":"Turkey","countryCode":"TR","countryTr":"Turkije"},"121":{"id":"121","country":"Georgia","countryCode":"GE","countryTr":"Georgi\u00eb"},"77":{"id":"77","country":"Portugal","countryCode":"PT","countryTr":"Portugal"},"98":{"id":"98","country":"Hong Kong","countryCode":"HK","countryTr":"Hong Kong"},"5":{"id":"5","country":"Brasil","countryCode":"BR","countryTr":"Brazili\u00eb"},"40":{"id":"40","country":"Peru","countryCode":"PE","countryTr":"Peru"},"113":{"id":"113","country":"Kyrgyzstan","countryCode":"KG","countryTr":"Kirgizi\u00eb"},"112":{"id":"112","country":"Finland","countryCode":"FI","countryTr":"Finland"},"208":{"id":"208","country":"Liechtenstein","countryCode":"LI","countryTr":"Liechtenstein"},"86":{"id":"86","country":"Bolivia","countryCode":"BO","countryTr":"Bolivia"},"124":{"id":"124","country":"New Zealand","countryCode":"NZ","countryTr":"Nieuw-Zeeland"},"4":{"id":"4","country":"Indonesia","countryCode":"ID","countryTr":"Indonesi\u00eb"},"141":{"id":"141","country":"Oman","countryCode":"OM","countryTr":"Oman"},"132":{"id":"132","country":"Lithuania","countryCode":"LT","countryTr":"Litouwen"},"60":{"id":"60","country":"Chile","countryCode":"CL","countryTr":"Chili"},"79":{"id":"79","country":"Tunisia","countryCode":"TN","countryTr":"Tunesi\u00eb"},"37":{"id":"37","country":"Morocco","countryCode":"MA","countryTr":"Marokko"},"127":{"id":"127","country":"Bosnia and Herzegovina","countryCode":"BA","countryTr":"Bosni\u00eb-Herzegovina"},"42":{"id":"42","country":"Venezuela","countryCode":"VE","countryTr":"Venezuela"},"159":{"id":"159","country":"Cyprus","countryCode":"CY","countryTr":"Cyprus"},"134":{"id":"134","country":"Uruguay","countryCode":"UY","countryTr":"Uruguay"},"118":{"id":"118","country":"Ireland","countryCode":"IE","countryTr":"Ierland"},"66":{"id":"66","country":"Ecuador","countryCode":"EC","countryTr":"Ecuador"},"82":{"id":"82","country":"Dominican Republic","countryCode":"DO","countryTr":"Dominicaanse Republiek"},"11":{"id":"11","country":"Mexico","countryCode":"MX","countryTr":"Mexico"},"131":{"id":"131","country":"Moldova","countryCode":"MD","countryTr":"Moldavi\u00eb"},"16":{"id":"16","country":"Egypt","countryCode":"EG","countryTr":"Egypte"},"85":{"id":"85","country":"Haiti","countryCode":"HT","countryTr":"Haiti"},"209":{"id":"209","country":"Monaco","countryCode":"MC","countryTr":"Monaco"},"126":{"id":"126","country":"Puerto Rico","countryCode":"PR","countryTr":"Puerto Rico"},"122":{"id":"122","country":"United Arab Emirates","countryCode":"AE","countryTr":"Verenigde Arabische Emiraten"},"164":{"id":"164","country":"Montenegro","countryCode":"ME","countryTr":"Montenegro"},"117":{"id":"117","country":"Norway","countryCode":"NO","countryTr":"Noorwegen"},"177":{"id":"177","country":"Barbados","countryCode":"BB","countryTr":"Barbados"},"144":{"id":"144","country":"North Macedonia","countryCode":"MK","countryTr":"Noord Macedoni\u00eb"},"99":{"id":"99","country":"El Salvador","countryCode":"SV","countryTr":"El Salvador"},"156":{"id":"156","country":"Qatar","countryCode":"QA","countryTr":"Qatar"},"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":"Papoea-Nieuw-Guinea"},"199":{"id":"199","country":"Andorra","countryCode":"AD","countryTr":"Andorra"},"12":{"id":"12","country":"Philippines","countryCode":"PH","countryTr":"Filipijnen"},"92":{"id":"92","country":"Burundi","countryCode":"BI","countryTr":"Boeroendi"},"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":"Jordani\u00eb"}}; var teams = [{"id":0,"name":""}]; var sportsmen = [{"id":"3586","tem":"0","ctr":"28","nam":"Nadal, Rafael ","namorig":"Nadal, Rafael ","cat":"","pri":"32,4 mln.","rat":0,"mw":"M","link":"Nadal, Rafael <\/a>","confirmed_b":1},{"id":"7522","tem":"45","ctr":"14","nam":"Zverev, Alexander ","namorig":"Zverev, Alexander ","cat":"","pri":"28,5 mln.","rat":0,"mw":"M","link":"Zverev, Alexander <\/a>","confirmed_b":1},{"id":"3691","tem":"0","ctr":"95","nam":"Dimitrov, Grigor ","namorig":"Dimitrov, Grigor ","cat":"","pri":"22,6 mln.","rat":0,"mw":"M","link":"Dimitrov, Grigor <\/a>","confirmed_b":1},{"id":"3599","tem":"0","ctr":"120","nam":"Cilic, Marin ","namorig":"Cilic, Marin ","cat":"","pri":"20,2 mln.","rat":0,"mw":"M","link":"Cilic, Marin <\/a>","confirmed_b":1},{"id":"8555","tem":"45","ctr":"93","nam":"Thiem, Dominic ","namorig":"Thiem, Dominic ","cat":"","pri":"16,6 mln.","rat":0,"mw":"M","link":"Thiem, Dominic <\/a>","confirmed_b":1},{"id":"7414","tem":"45","ctr":"51","nam":"Kyrgios, Nick ","namorig":"Kyrgios, Nick ","cat":"","pri":"16,1 mln.","rat":0,"mw":"M","link":"Kyrgios, Nick <\/a>","confirmed_b":1},{"id":"3646","tem":"0","ctr":"26","nam":"Anderson, Kevin ","namorig":"Anderson, Kevin ","cat":"","pri":"9,8 mln.","rat":0,"mw":"M","link":"Anderson, Kevin <\/a>","confirmed_b":1},{"id":"3755","tem":"0","ctr":"28","nam":"Bautista Agut, Roberto ","namorig":"Bautista Agut, Roberto ","cat":"","pri":"8,1 mln.","rat":0,"mw":"M","link":"Bautista Agut, Roberto <\/a>","confirmed_b":1},{"id":"3597","tem":"0","ctr":"19","nam":"Monfils, Gael ","namorig":"Monfils, Gael ","cat":"","pri":"7,7 mln.","rat":0,"mw":"M","link":"Monfils, Gael <\/a>","confirmed_b":1},{"id":"3814","tem":"0","ctr":"76","nam":"Goffin, David ","namorig":"Goffin, David ","cat":"","pri":"7,4 mln.","rat":0,"mw":"M","link":"Goffin, David <\/a>","confirmed_b":1},{"id":"3592","tem":"0","ctr":"28","nam":"Ferrer, David ","namorig":"Ferrer, David ","cat":"","pri":"6,6 mln.","rat":0,"mw":"M","link":"Ferrer, David <\/a>","confirmed_b":1},{"id":"7408","tem":"45","ctr":"19","nam":"Pouille, Lucas ","namorig":"Pouille, Lucas ","cat":"","pri":"6,1 mln.","rat":0,"mw":"M","link":"Pouille, Lucas <\/a>","confirmed_b":1},{"id":"3615","tem":"0","ctr":"19","nam":"Gasquet, Richard ","namorig":"Gasquet, Richard ","cat":"","pri":"5,8 mln.","rat":0,"mw":"M","link":"Gasquet, Richard <\/a>","confirmed_b":1},{"id":"10369","tem":"45","ctr":"9","nam":"Khachanov, Karen ","namorig":"Khachanov, Karen ","cat":"","pri":"5,5 mln.","rat":0,"mw":"M","link":"Khachanov, Karen <\/a>","confirmed_b":1},{"id":"3927","tem":"0","ctr":"28","nam":"Carreno Busta, Pablo ","namorig":"Carreno Busta, Pablo ","cat":"","pri":"5,4 mln.","rat":0,"mw":"M","link":"Carreno Busta, Pablo <\/a>","confirmed_b":1},{"id":"3708","tem":"0","ctr":"28","nam":"Ramos-Vinolas, Albert ","namorig":"Ramos-Vinolas, Albert ","cat":"","pri":"5 mln.","rat":0,"mw":"M","link":"Ramos-Vinolas, Albert <\/a>","confirmed_b":1},{"id":"4174","tem":"0","ctr":"3","nam":"Johnson, Steve ","namorig":"Johnson, Steve ","cat":"","pri":"4,6 mln.","rat":0,"mw":"M","link":"Johnson, Steve <\/a>","confirmed_b":1},{"id":"3668","tem":"0","ctr":"19","nam":"Mannarino, Adrian ","namorig":"Mannarino, Adrian ","cat":"","pri":"4,3 mln.","rat":0,"mw":"M","link":"Mannarino, Adrian <\/a>","confirmed_b":1},{"id":"3650","tem":"0","ctr":"61","nam":"Haase, Robin ","namorig":"Haase, Robin ","cat":"","pri":"4,1 mln.","rat":0,"mw":"M","link":"Haase, Robin <\/a>","confirmed_b":1},{"id":"3667","tem":"0","ctr":"14","nam":"Zverev, Mischa ","namorig":"Zverev, Mischa ","cat":"","pri":"3,8 mln.","rat":0,"mw":"M","link":"Zverev, Mischa <\/a>","confirmed_b":1},{"id":"3640","tem":"0","ctr":"23","nam":"Fognini, Fabio ","namorig":"Fognini, Fabio ","cat":"","pri":"3,7 mln.","rat":0,"mw":"M","link":"Fognini, Fabio <\/a>","confirmed_b":1},{"id":"3594","tem":"0","ctr":"28","nam":"Verdasco, Fernando ","namorig":"Verdasco, Fernando ","cat":"","pri":"3,6 mln.","rat":0,"mw":"M","link":"Verdasco, Fernando <\/a>","confirmed_b":1},{"id":"10750","tem":"45","ctr":"3","nam":"Donaldson, Jared ","namorig":"Donaldson, Jared ","cat":"","pri":"3,5 mln.","rat":0,"mw":"M","link":"Donaldson, Jared <\/a>","confirmed_b":1},{"id":"7446","tem":"45","ctr":"22","nam":"Edmund, Kyle ","namorig":"Edmund, Kyle ","cat":"","pri":"3,4 mln.","rat":0,"mw":"M","link":"Edmund, Kyle <\/a>","confirmed_b":1},{"id":"15867","tem":"45","ctr":"9","nam":"Medvedev, Daniil ","namorig":"Medvedev, Daniil ","cat":"","pri":"3,3 mln.","rat":0,"mw":"M","link":"Medvedev, Daniil <\/a>","confirmed_b":1},{"id":"15959","tem":"45","ctr":"36","nam":"Shapovalov, Denis ","namorig":"Shapovalov, Denis ","cat":"","pri":"3,3 mln.","rat":0,"mw":"M","link":"Shapovalov, Denis <\/a>","confirmed_b":1},{"id":"3758","tem":"0","ctr":"3","nam":"Harrison, Ryan ","namorig":"Harrison, Ryan ","cat":"","pri":"3,2 mln.","rat":0,"mw":"M","link":"Harrison, Ryan <\/a>","confirmed_b":1},{"id":"3648","tem":"0","ctr":"134","nam":"Cuevas, Pablo ","namorig":"Cuevas, Pablo ","cat":"","pri":"3 mln.","rat":0,"mw":"M","link":"Cuevas, Pablo <\/a>","confirmed_b":1},{"id":"6635","tem":"45","ctr":"31","nam":"Schwartzman, Diego ","namorig":"Schwartzman, Diego ","cat":"","pri":"3 mln.","rat":0,"mw":"M","link":"Schwartzman, Diego <\/a>","confirmed_b":1},{"id":"3737","tem":"0","ctr":"19","nam":"Paire, Benoit ","namorig":"Paire, Benoit ","cat":"","pri":"2,9 mln.","rat":0,"mw":"M","link":"Paire, Benoit <\/a>","confirmed_b":1},{"id":"8018","tem":"45","ctr":"25","nam":"Chung, Hyeon ","namorig":"Chung, Hyeon ","cat":"","pri":"2,8 mln.","rat":0,"mw":"M","link":"Chung, Hyeon <\/a>","confirmed_b":1},{"id":"12149","tem":"45","ctr":"9","nam":"Rublev, Andrey ","namorig":"Rublev, Andrey ","cat":"","pri":"2,8 mln.","rat":0,"mw":"M","link":"Rublev, Andrey <\/a>","confirmed_b":1},{"id":"10809","tem":"45","ctr":"120","nam":"Coric, Borna ","namorig":"Coric, Borna ","cat":"","pri":"2,7 mln.","rat":0,"mw":"M","link":"Coric, Borna <\/a>","confirmed_b":1},{"id":"10744","tem":"45","ctr":"3","nam":"Tiafoe, Frances ","namorig":"Tiafoe, Frances ","cat":"","pri":"2,7 mln.","rat":0,"mw":"M","link":"Tiafoe, Frances <\/a>","confirmed_b":1},{"id":"9959","tem":"45","ctr":"51","nam":"Kokkinakis, Thanasi ","namorig":"Kokkinakis, Thanasi ","cat":"","pri":"2,6 mln.","rat":0,"mw":"M","link":"Kokkinakis, Thanasi <\/a>","confirmed_b":1},{"id":"3816","tem":"0","ctr":"9","nam":"Kuznetsov, Andrey ","namorig":"Kuznetsov, Andrey ","cat":"","pri":"2,6 mln.","rat":0,"mw":"M","link":"Kuznetsov, Andrey <\/a>","confirmed_b":1},{"id":"13570","tem":"45","ctr":"3","nam":"Paul, Tommy ","namorig":"Paul, Tommy ","cat":"","pri":"2,4 mln.","rat":0,"mw":"M","link":"Paul, Tommy <\/a>","confirmed_b":1},{"id":"3712","tem":"0","ctr":"3","nam":"Young, Donald ","namorig":"Young, Donald ","cat":"","pri":"2,4 mln.","rat":0,"mw":"M","link":"Young, Donald <\/a>","confirmed_b":1},{"id":"3793","tem":"0","ctr":"51","nam":"Tomic, Bernard ","namorig":"Tomic, Bernard ","cat":"","pri":"2,3 mln.","rat":0,"mw":"M","link":"Tomic, Bernard <\/a>","confirmed_b":1},{"id":"7412","tem":"45","ctr":"78","nam":"Vesely, Jiri ","namorig":"Vesely, Jiri ","cat":"","pri":"2,3 mln.","rat":0,"mw":"M","link":"Vesely, Jiri <\/a>","confirmed_b":1},{"id":"3943","tem":"0","ctr":"14","nam":"Struff, Jan-Lennard ","namorig":"Struff, Jan-Lennard ","cat":"","pri":"2,2 mln.","rat":0,"mw":"M","link":"Struff, Jan-Lennard <\/a>","confirmed_b":1},{"id":"11475","tem":"45","ctr":"121","nam":"Basilashvili, Nikoloz ","namorig":"Basilashvili, Nikoloz ","cat":"","pri":"2,1 mln.","rat":0,"mw":"M","link":"Basilashvili, Nikoloz <\/a>","confirmed_b":1},{"id":"15868","tem":"45","ctr":"11","nam":"Escobedo, Ernesto ","namorig":"Escobedo, Ernesto ","cat":"","pri":"1,9 mln.","rat":0,"mw":"M","link":"Escobedo, Ernesto <\/a>","confirmed_b":1},{"id":"12466","tem":"45","ctr":"3","nam":"Fritz, Taylor ","namorig":"Fritz, Taylor ","cat":"","pri":"1,9 mln.","rat":0,"mw":"M","link":"Fritz, Taylor <\/a>","confirmed_b":1},{"id":"3829","tem":"0","ctr":"77","nam":"Sousa, Joao ","namorig":"Sousa, Joao ","cat":"","pri":"1,9 mln.","rat":0,"mw":"M","link":"Sousa, Joao <\/a>","confirmed_b":1},{"id":"3922","tem":"0","ctr":"36","nam":"Pospisil, Vasek ","namorig":"Pospisil, Vasek ","cat":"","pri":"1,8 mln.","rat":0,"mw":"M","link":"Pospisil, Vasek <\/a>","confirmed_b":1},{"id":"9696","tem":"45","ctr":"51","nam":"Thompson, Jordan ","namorig":"Thompson, Jordan ","cat":"","pri":"1,8 mln.","rat":0,"mw":"M","link":"Thompson, Jordan <\/a>","confirmed_b":1},{"id":"3609","tem":"0","ctr":"142","nam":"Gulbis, Ernests ","namorig":"Gulbis, Ernests ","cat":"","pri":"1,7 mln.","rat":0,"mw":"M","link":"Gulbis, Ernests <\/a>","confirmed_b":1},{"id":"8438","tem":"45","ctr":"19","nam":"Herbert, Pierre-Hugues ","namorig":"Herbert, Pierre-Hugues ","cat":"","pri":"1,6 mln.","rat":0,"mw":"M","link":"Herbert, Pierre-Hugues <\/a>","confirmed_b":1},{"id":"17175","tem":"45","ctr":"3","nam":"Eubanks, Christopher ","namorig":"Eubanks, Christopher ","cat":"","pri":"1,5 mln.","rat":0,"mw":"M","link":"Eubanks, Christopher <\/a>","confirmed_b":1},{"id":"13524","tem":"45","ctr":"3","nam":"Fratangelo, Bjorn ","namorig":"Fratangelo, Bjorn ","cat":"","pri":"1,5 mln.","rat":0,"mw":"M","link":"Fratangelo, Bjorn <\/a>","confirmed_b":1},{"id":"3695","tem":"0","ctr":"31","nam":"Zeballos, Horacio ","namorig":"Zeballos, Horacio ","cat":"","pri":"1,5 mln.","rat":0,"mw":"M","link":"Zeballos, Horacio <\/a>","confirmed_b":1},{"id":"3677","tem":"0","ctr":"14","nam":"Brown, Dustin ","namorig":"Brown, Dustin ","cat":"","pri":"1,4 mln.","rat":0,"mw":"M","link":"Brown, Dustin <\/a>","confirmed_b":1},{"id":"8561","tem":"45","ctr":"127","nam":"Dzumhur, Damir ","namorig":"Dzumhur, Damir ","cat":"","pri":"1,4 mln.","rat":0,"mw":"M","link":"Dzumhur, Damir <\/a>","confirmed_b":1},{"id":"3625","tem":"0","ctr":"44","nam":"Istomin, Denis ","namorig":"Istomin, Denis ","cat":"","pri":"1,4 mln.","rat":0,"mw":"M","link":"Istomin, Denis <\/a>","confirmed_b":1},{"id":"12412","tem":"45","ctr":"14","nam":"Marterer, Maximilian ","namorig":"Marterer, Maximilian ","cat":"","pri":"1,4 mln.","rat":0,"mw":"M","link":"Marterer, Maximilian <\/a>","confirmed_b":1},{"id":"6634","tem":"45","ctr":"81","nam":"Lajovic, Dusan ","namorig":"Lajovic, Dusan ","cat":"","pri":"1,3 mln.","rat":0,"mw":"M","link":"Lajovic, Dusan <\/a>","confirmed_b":1},{"id":"3717","tem":"0","ctr":"19","nam":"Mahut, Nicolas ","namorig":"Mahut, Nicolas ","cat":"","pri":"1,3 mln.","rat":0,"mw":"M","link":"Mahut, Nicolas <\/a>","confirmed_b":1},{"id":"3782","tem":"0","ctr":"9","nam":"Tursunov, Dmitry ","namorig":"Tursunov, Dmitry ","cat":"","pri":"1,3 mln.","rat":0,"mw":"M","link":"Tursunov, Dmitry <\/a>","confirmed_b":1},{"id":"3875","tem":"0","ctr":"52","nam":"Copil, Marius ","namorig":"Copil, Marius ","cat":"","pri":"1,2 mln.","rat":0,"mw":"M","link":"Copil, Marius <\/a>","confirmed_b":1},{"id":"17557","tem":"45","ctr":"51","nam":"De Minaur, Alex ","namorig":"De Minaur, Alex ","cat":"","pri":"1,2 mln.","rat":0,"mw":"M","link":"De Minaur, Alex <\/a>","confirmed_b":1},{"id":"3644","tem":"0","ctr":"62","nam":"Kukushkin, Mikhail ","namorig":"Kukushkin, Mikhail ","cat":"","pri":"1,2 mln.","rat":0,"mw":"M","link":"Kukushkin, Mikhail <\/a>","confirmed_b":1},{"id":"3960","tem":"0","ctr":"14","nam":"Stebe, Cedrik-Marcel ","namorig":"Stebe, Cedrik-Marcel ","cat":"","pri":"1,2 mln.","rat":0,"mw":"M","link":"Stebe, Cedrik-Marcel <\/a>","confirmed_b":1},{"id":"3844","tem":"0","ctr":"9","nam":"Donskoy, Evgeny ","namorig":"Donskoy, Evgeny ","cat":"","pri":"1,1 mln.","rat":0,"mw":"M","link":"Donskoy, Evgeny <\/a>","confirmed_b":1},{"id":"4069","tem":"0","ctr":"110","nam":"Gombos, Norbert ","namorig":"Gombos, Norbert ","cat":"","pri":"1,1 mln.","rat":0,"mw":"M","link":"Gombos, Norbert <\/a>","confirmed_b":1},{"id":"14795","tem":"45","ctr":"31","nam":"Kicker, Nicolas ","namorig":"Kicker, Nicolas ","cat":"","pri":"1,1 mln.","rat":0,"mw":"M","link":"Kicker, Nicolas <\/a>","confirmed_b":1},{"id":"18221","tem":"45","ctr":"3","nam":"Kwiatkowski, Thai-Son ","namorig":"Kwiatkowski, Thai-Son ","cat":"","pri":"1,1 mln.","rat":0,"mw":"M","link":"Kwiatkowski, Thai-Son <\/a>","confirmed_b":1},{"id":"6490","tem":"45","ctr":"94","nam":"Laaksonen, Henri ","namorig":"Laaksonen, Henri ","cat":"","pri":"1,1 mln.","rat":0,"mw":"M","link":"Laaksonen, Henri <\/a>","confirmed_b":1},{"id":"3789","tem":"0","ctr":"51","nam":"Millman, John ","namorig":"Millman, John ","cat":"","pri":"1,1 mln.","rat":0,"mw":"M","link":"Millman, John <\/a>","confirmed_b":1},{"id":"17107","tem":"45","ctr":"3","nam":"Sandgren, Tennys ","namorig":"Sandgren, Tennys ","cat":"","pri":"1,1 mln.","rat":0,"mw":"M","link":"Sandgren, Tennys <\/a>","confirmed_b":1},{"id":"3986","tem":"0","ctr":"131","nam":"Albot, Radu ","namorig":"Albot, Radu ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Albot, Radu <\/a>","confirmed_b":1},{"id":"18598","tem":"45","ctr":"3","nam":"Aragone, JC ","namorig":"Aragone, JC ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Aragone, JC <\/a>","confirmed_b":1},{"id":"3672","tem":"0","ctr":"132","nam":"Berankis, Ricardas ","namorig":"Berankis, Ricardas ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Berankis, Ricardas <\/a>","confirmed_b":1},{"id":"3651","tem":"0","ctr":"31","nam":"Berlocq, Carlos ","namorig":"Berlocq, Carlos ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Berlocq, Carlos <\/a>","confirmed_b":1},{"id":"18570","tem":"45","ctr":"19","nam":"Blancaneaux, Geoffrey ","namorig":"Blancaneaux, Geoffrey ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Blancaneaux, Geoffrey <\/a>","confirmed_b":1},{"id":"10807","tem":"45","ctr":"10","nam":"Daniel, Taro ","namorig":"Daniel, Taro ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Daniel, Taro <\/a>","confirmed_b":1},{"id":"11472","tem":"45","ctr":"80","nam":"Fucsovics, Marton ","namorig":"Fucsovics, Marton ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Fucsovics, Marton <\/a>","confirmed_b":1},{"id":"5388","tem":"0","ctr":"23","nam":"Giannessi, Alessandro ","namorig":"Giannessi, Alessandro ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Giannessi, Alessandro <\/a>","confirmed_b":1},{"id":"13499","tem":"45","ctr":"177","nam":"King, Darian ","namorig":"King, Darian ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"King, Darian <\/a>","confirmed_b":1},{"id":"18267","tem":"45","ctr":"3","nam":"King, Evan ","namorig":"King, Evan ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"King, Evan <\/a>","confirmed_b":1},{"id":"18571","tem":"45","ctr":"3","nam":"Kypson, Patrick ","namorig":"Kypson, Patrick ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Kypson, Patrick <\/a>","confirmed_b":1},{"id":"3674","tem":"0","ctr":"110","nam":"Lacko, Lukas ","namorig":"Lacko, Lukas ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Lacko, Lukas <\/a>","confirmed_b":1},{"id":"3868","tem":"0","ctr":"28","nam":"Menendez-Maceiras, Adrian ","namorig":"Menendez-Maceiras, Adrian ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Menendez-Maceiras, Adrian <\/a>","confirmed_b":1},{"id":"3791","tem":"0","ctr":"19","nam":"Millot, Vincent ","namorig":"Millot, Vincent ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Millot, Vincent <\/a>","confirmed_b":1},{"id":"15649","tem":"45","ctr":"5","nam":"Monteiro, Thiago ","namorig":"Monteiro, Thiago ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Monteiro, Thiago <\/a>","confirmed_b":1},{"id":"17136","tem":"45","ctr":"22","nam":"Norrie, Cameron ","namorig":"Norrie, Cameron ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Norrie, Cameron <\/a>","confirmed_b":1},{"id":"17127","tem":"45","ctr":"78","nam":"Safranek, Vaclav ","namorig":"Safranek, Vaclav ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Safranek, Vaclav <\/a>","confirmed_b":1},{"id":"7133","tem":"45","ctr":"51","nam":"Smith, John-Patrick ","namorig":"Smith, John-Patrick ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Smith, John-Patrick <\/a>","confirmed_b":1},{"id":"4005","tem":"0","ctr":"23","nam":"Travaglia, Stefano ","namorig":"Travaglia, Stefano ","cat":"","pri":"1 mln.","rat":0,"mw":"M","link":"Travaglia, Stefano <\/a>","confirmed_b":1}]; var sportsmenTeams = []; var showTeams = 0; //*********************** //SPORTSMEN TABLE HEADERS //*********************** var headersTableSportsmen = [ { 'sTitle': 'Nr.' }, { 'sTitle': 'Groep' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'Land', 'sSortDataType': 'sortCountryFlag', sType : "text" }, { 'sTitle': 'Tennisser'}, { 'sTitle': 'Waarde', 'sSortDataType': 'sortMln', 'sType': 'numeric' }, { 'sTitle': 'Team' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'M/V' , 'bSearchable': false, 'bVisible': false } ]; //*********************** //TEAMS TABLE HEADERS //*********************** var headersTableTeams = [ {'sTitle': 'Nr.'}, {'sTitle': '' , 'bSearchable': false, 'bVisible': false }, {'sTitle': 'Land' , 'sSortDataType': 'sortCountryFlag', sType : 'text' }, { 'sTitle': ''}, { 'sTitle': 'Waarde', 'sSortDataType': 'sortMln', 'sType': 'numeric' } ]; //*********************** //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, "", 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(' mln.', '').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 ""; }