$(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(' Mio.', ''); } ); }; $.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 = {"214":{"id":"214","country":"England","countryCode":"EN","countryTr":"England"},"215":{"id":"215","country":"Scotland","countryCode":"SF","countryTr":"Schottland"},"51":{"id":"51","country":"Australia","countryCode":"AU","countryTr":"Australien"},"216":{"id":"216","country":"Wales","countryCode":"WL","countryTr":"Wales"},"61":{"id":"61","country":"Netherlands","countryCode":"NL","countryTr":"Die Niederlande"},"217":{"id":"217","country":"Northern Ireland","countryCode":"NIE","countryTr":"Nordirland"},"36":{"id":"36","country":"Canada","countryCode":"CA","countryTr":"Kanada"},"93":{"id":"93","country":"Austria","countryCode":"AT","countryTr":"\u00d6sterreich"},"14":{"id":"14","country":"Germany","countryCode":"DE","countryTr":"Deutschland"},"28":{"id":"28","country":"Spain","countryCode":"ES","countryTr":"Spanien"},"118":{"id":"118","country":"Ireland","countryCode":"IE","countryTr":"Irland"},"3":{"id":"3","country":"United States","countryCode":"US","countryTr":"Vereinigte Staaten"},"76":{"id":"76","country":"Belgium","countryCode":"BE","countryTr":"Belgien"},"88":{"id":"88","country":"Sweden","countryCode":"SE","countryTr":"Schweden"},"218":{"id":"218","country":"Gibraltar","countryCode":"GI","countryTr":"Gibraltar"},"74":{"id":"74","country":"Greece","countryCode":"GR","countryTr":"Griechenland"},"33":{"id":"33","country":"Poland","countryCode":"PL","countryTr":"Polen"},"2":{"id":"2","country":"India","countryCode":"IN","countryTr":"Indien"},"26":{"id":"26","country":"South Africa","countryCode":"ZA","countryTr":"S\u00fcdafrika"},"109":{"id":"109","country":"Denmark","countryCode":"DK","countryTr":"D\u00e4nemark"},"112":{"id":"112","country":"Finland","countryCode":"FI","countryTr":"Finnland"},"80":{"id":"80","country":"Hungary","countryCode":"HU","countryTr":"Ungarn"},"120":{"id":"120","country":"Croatia","countryCode":"HR","countryTr":"Kroatien"},"94":{"id":"94","country":"Swiss","countryCode":"CH","countryTr":"Schweiz"},"117":{"id":"117","country":"Norway","countryCode":"NO","countryTr":"Norwegen"},"23":{"id":"23","country":"Italy","countryCode":"IT","countryTr":"Italien"},"145":{"id":"145","country":"Slovenia","countryCode":"SI","countryTr":"Slowenien"},"116":{"id":"116","country":"Singapore","countryCode":"SG","countryTr":"Singapur"},"1":{"id":"1","country":"China","countryCode":"CN","countryTr":"China"},"98":{"id":"98","country":"Hong Kong","countryCode":"HK","countryTr":"Hongkong"},"10":{"id":"10","country":"Japan","countryCode":"JP","countryTr":"Japan"},"12":{"id":"12","country":"Philippines","countryCode":"PH","countryTr":"Philippinen"},"124":{"id":"124","country":"New Zealand","countryCode":"NZ","countryTr":"Neuseeland"},"78":{"id":"78","country":"Czech Republic","countryCode":"CZ","countryTr":"Tschechien"},"142":{"id":"142","country":"Latvia","countryCode":"LV","countryTr":"Lettland"},"43":{"id":"43","country":"Malaysia","countryCode":"MY","countryTr":"Malaysia"},"19":{"id":"19","country":"France","countryCode":"FR","countryTr":"Frankreich"},"9":{"id":"9","country":"Russia","countryCode":"RU","countryTr":"Russland"},"20":{"id":"20","country":"Thailand","countryCode":"TH","countryTr":"Thailand"},"132":{"id":"132","country":"Lithuania","countryCode":"LT","countryTr":"Litauen"},"17":{"id":"17","country":"Turkey","countryCode":"TR","countryTr":"T\u00fcrkei"},"173":{"id":"173","country":"Brunei","countryCode":"BN","countryTr":"Brunei"},"5":{"id":"5","country":"Brasil","countryCode":"BR","countryTr":"Brasilien"},"77":{"id":"77","country":"Portugal","countryCode":"PT","countryTr":"Portugal"},"81":{"id":"81","country":"Serbia","countryCode":"RS","countryTr":"Serbien"},"52":{"id":"52","country":"Romania","countryCode":"RO","countryTr":"Rum\u00e4nien"},"175":{"id":"175","country":"Iceland","countryCode":"IS","countryTr":"Island"},"22":{"id":"22","country":"United Kingdom","countryCode":"GB","countryTr":"Gro\u00df Britannien"},"27":{"id":"27","country":"Ukraine","countryCode":"UA","countryTr":"Ukraine"},"160":{"id":"160","country":"Bahrain","countryCode":"BH","countryTr":"Bahrain"},"161":{"id":"161","country":"Guyana","countryCode":"GY","countryTr":"Guyana"}}; var teams = {"0":{"id":0,"name":""},"152":{"id":"152","name":"BDO","nameTranslated":"BDO"},"153":{"id":"153","name":"PDC","nameTranslated":"PDC"}}; var sportsmen = [{"id":"4932","tem":"153","ctr":"61","nam":"Gerwen, Michael van","namorig":"Gerwen, Michael van","cat":"","pri":"25 Mio.","rat":0,"mw":"M","link":"Gerwen, Michael van<\/a>","confirmed_b":1},{"id":"10058","tem":"153","ctr":"216","nam":"Price, Gerwyn ","namorig":"Price, Gerwyn ","cat":"","pri":"24,2 Mio.","rat":0,"mw":"M","link":"Price, Gerwyn <\/a>","confirmed_b":1},{"id":"4925","tem":"153","ctr":"215","nam":"Wright, Peter ","namorig":"Wright, Peter ","cat":"","pri":"21,6 Mio.","rat":0,"mw":"M","link":"Wright, Peter <\/a>","confirmed_b":1},{"id":"4955","tem":"153","ctr":"214","nam":"Smith, Michael ","namorig":"Smith, Michael ","cat":"","pri":"21,1 Mio.","rat":0,"mw":"M","link":"Smith, Michael <\/a>","confirmed_b":1},{"id":"11874","tem":"153","ctr":"214","nam":"Aspinall, Nathan ","namorig":"Aspinall, Nathan ","cat":"","pri":"17,7 Mio.","rat":0,"mw":"M","link":"Aspinall, Nathan <\/a>","confirmed_b":1},{"id":"13607","tem":"153","ctr":"33","nam":"Ratajski, Krzysztof ","namorig":"Ratajski, Krzysztof ","cat":"","pri":"16,3 Mio.","rat":0,"mw":"M","link":"Ratajski, Krzysztof <\/a>","confirmed_b":1},{"id":"4897","tem":"153","ctr":"214","nam":"Wade, James ","namorig":"Wade, James ","cat":"","pri":"13,4 Mio.","rat":0,"mw":"M","link":"Wade, James <\/a>","confirmed_b":1},{"id":"4946","tem":"153","ctr":"214","nam":"Cullen, Joe ","namorig":"Cullen, Joe ","cat":"","pri":"12,9 Mio.","rat":0,"mw":"M","link":"Cullen, Joe <\/a>","confirmed_b":1},{"id":"22670","tem":"153","ctr":"77","nam":"De Sousa, Jose ","namorig":"De Sousa, Jose ","cat":"","pri":"11,8 Mio.","rat":0,"mw":"M","link":"De Sousa, Jose <\/a>","confirmed_b":1},{"id":"10185","tem":"153","ctr":"76","nam":"Bergh, Dimitri Van den","namorig":"Bergh, Dimitri Van den","cat":"","pri":"11,5 Mio.","rat":0,"mw":"M","link":"Bergh, Dimitri Van den<\/a>","confirmed_b":1},{"id":"8576","tem":"153","ctr":"61","nam":"Noppert, Danny ","namorig":"Noppert, Danny ","cat":"","pri":"10,2 Mio.","rat":0,"mw":"M","link":"Noppert, Danny <\/a>","confirmed_b":1},{"id":"5009","tem":"153","ctr":"26","nam":"Petersen, Devon ","namorig":"Petersen, Devon ","cat":"","pri":"10 Mio.","rat":0,"mw":"M","link":"Petersen, Devon <\/a>","confirmed_b":1},{"id":"16507","tem":"153","ctr":"14","nam":"Clemens, Gabriel ","namorig":"Clemens, Gabriel ","cat":"","pri":"9,7 Mio.","rat":0,"mw":"M","link":"Clemens, Gabriel <\/a>","confirmed_b":1},{"id":"15735","tem":"153","ctr":"214","nam":"Cross, Rob ","namorig":"Cross, Rob ","cat":"","pri":"9,1 Mio.","rat":0,"mw":"M","link":"Cross, Rob <\/a>","confirmed_b":1},{"id":"4960","tem":"153","ctr":"214","nam":"White, Ian ","namorig":"White, Ian ","cat":"","pri":"8,8 Mio.","rat":0,"mw":"M","link":"White, Ian <\/a>","confirmed_b":1},{"id":"21505","tem":"153","ctr":"51","nam":"Heta, Damon ","namorig":"Heta, Damon ","cat":"","pri":"8,4 Mio.","rat":0,"mw":"M","link":"Heta, Damon <\/a>","confirmed_b":1},{"id":"4933","tem":"153","ctr":"214","nam":"Chisnall, Dave ","namorig":"Chisnall, Dave ","cat":"","pri":"7,5 Mio.","rat":0,"mw":"M","link":"Chisnall, Dave <\/a>","confirmed_b":1},{"id":"5091","tem":"153","ctr":"61","nam":"Duijvenbode, Dirk van","namorig":"Duijvenbode, Dirk van","cat":"","pri":"7,2 Mio.","rat":0,"mw":"M","link":"Duijvenbode, Dirk van<\/a>","confirmed_b":1},{"id":"4898","tem":"153","ctr":"215","nam":"Anderson, Gary ","namorig":"Anderson, Gary ","cat":"","pri":"7 Mio.","rat":0,"mw":"M","link":"Anderson, Gary <\/a>","confirmed_b":1},{"id":"4919","tem":"153","ctr":"217","nam":"Dolan, Brendan ","namorig":"Dolan, Brendan ","cat":"","pri":"6,8 Mio.","rat":0,"mw":"M","link":"Dolan, Brendan <\/a>","confirmed_b":1},{"id":"6803","tem":"153","ctr":"217","nam":"Gurney, Daryl ","namorig":"Gurney, Daryl ","cat":"","pri":"6,7 Mio.","rat":0,"mw":"M","link":"Gurney, Daryl <\/a>","confirmed_b":1},{"id":"8297","tem":"153","ctr":"214","nam":"Durrant, Glen ","namorig":"Durrant, Glen ","cat":"","pri":"6,1 Mio.","rat":0,"mw":"M","link":"Durrant, Glen <\/a>","confirmed_b":1},{"id":"5164","tem":"153","ctr":"214","nam":"Bunting, Stephen ","namorig":"Bunting, Stephen ","cat":"","pri":"5,9 Mio.","rat":0,"mw":"M","link":"Bunting, Stephen <\/a>","confirmed_b":1},{"id":"4899","tem":"153","ctr":"51","nam":"Whitlock, Simon ","namorig":"Whitlock, Simon ","cat":"","pri":"5,8 Mio.","rat":0,"mw":"M","link":"Whitlock, Simon <\/a>","confirmed_b":1},{"id":"11873","tem":"153","ctr":"216","nam":"Clayton, Jonny ","namorig":"Clayton, Jonny ","cat":"","pri":"5,5 Mio.","rat":0,"mw":"M","link":"Clayton, Jonny <\/a>","confirmed_b":1},{"id":"11539","tem":"153","ctr":"61","nam":"Wattimena, Jermaine ","namorig":"Wattimena, Jermaine ","cat":"","pri":"5,4 Mio.","rat":0,"mw":"M","link":"Wattimena, Jermaine <\/a>","confirmed_b":1},{"id":"15858","tem":"153","ctr":"214","nam":"Joyce, Ryan ","namorig":"Joyce, Ryan ","cat":"","pri":"5,3 Mio.","rat":0,"mw":"M","link":"Joyce, Ryan <\/a>","confirmed_b":1},{"id":"4910","tem":"153","ctr":"61","nam":"Voort, Vincent van der","namorig":"Voort, Vincent van der","cat":"","pri":"5,1 Mio.","rat":0,"mw":"M","link":"Voort, Vincent van der<\/a>","confirmed_b":1},{"id":"10310","tem":"153","ctr":"214","nam":"Dobey, Chris ","namorig":"Dobey, Chris ","cat":"","pri":"5 Mio.","rat":0,"mw":"M","link":"Dobey, Chris <\/a>","confirmed_b":1},{"id":"7373","tem":"153","ctr":"214","nam":"Smith, Ross ","namorig":"Smith, Ross ","cat":"","pri":"4,8 Mio.","rat":0,"mw":"M","link":"Smith, Ross <\/a>","confirmed_b":1},{"id":"7406","tem":"153","ctr":"214","nam":"Evans, Ricky ","namorig":"Evans, Ricky ","cat":"","pri":"4,6 Mio.","rat":0,"mw":"M","link":"Evans, Ricky <\/a>","confirmed_b":1},{"id":"4964","tem":"153","ctr":"76","nam":"Huybrechts, Kim ","namorig":"Huybrechts, Kim ","cat":"","pri":"4,3 Mio.","rat":0,"mw":"M","link":"Huybrechts, Kim <\/a>","confirmed_b":1},{"id":"8304","tem":"153","ctr":"142","nam":"Razma, Madars ","namorig":"Razma, Madars ","cat":"","pri":"4,1 Mio.","rat":0,"mw":"M","link":"Razma, Madars <\/a>","confirmed_b":1},{"id":"17507","tem":"153","ctr":"214","nam":"Searle, Ryan ","namorig":"Searle, Ryan ","cat":"","pri":"4 Mio.","rat":0,"mw":"M","link":"Searle, Ryan <\/a>","confirmed_b":1},{"id":"8299","tem":"153","ctr":"61","nam":"Zwaan, Jeffrey de","namorig":"Zwaan, Jeffrey de","cat":"","pri":"3,9 Mio.","rat":0,"mw":"M","link":"Zwaan, Jeffrey de<\/a>","confirmed_b":1},{"id":"4896","tem":"153","ctr":"214","nam":"Lewis, Adrian ","namorig":"Lewis, Adrian ","cat":"","pri":"3,8 Mio.","rat":0,"mw":"M","link":"Lewis, Adrian <\/a>","confirmed_b":1},{"id":"4905","tem":"153","ctr":"214","nam":"King, Mervyn ","namorig":"King, Mervyn ","cat":"","pri":"3,6 Mio.","rat":0,"mw":"M","link":"King, Mervyn <\/a>","confirmed_b":1},{"id":"6648","tem":"153","ctr":"214","nam":"Webster, Darren ","namorig":"Webster, Darren ","cat":"","pri":"3,5 Mio.","rat":0,"mw":"M","link":"Webster, Darren <\/a>","confirmed_b":1},{"id":"4952","tem":"153","ctr":"118","nam":"O'Connor, William ","namorig":"O'Connor, William ","cat":"","pri":"3,2 Mio.","rat":0,"mw":"M","link":"O'Connor, William <\/a>","confirmed_b":1},{"id":"11041","tem":"153","ctr":"214","nam":"Hughes, Jamie ","namorig":"Hughes, Jamie ","cat":"","pri":"3,1 Mio.","rat":0,"mw":"M","link":"Hughes, Jamie <\/a>","confirmed_b":1},{"id":"19174","tem":"153","ctr":"214","nam":"Humphries, Luke ","namorig":"Humphries, Luke ","cat":"","pri":"3 Mio.","rat":0,"mw":"M","link":"Humphries, Luke <\/a>","confirmed_b":1},{"id":"16825","tem":"153","ctr":"61","nam":"Kleermaker, Martijn ","namorig":"Kleermaker, Martijn ","cat":"","pri":"2,9 Mio.","rat":0,"mw":"M","link":"Kleermaker, Martijn <\/a>","confirmed_b":1},{"id":"4923","tem":"153","ctr":"214","nam":"Beaton, Steve ","namorig":"Beaton, Steve ","cat":"","pri":"2,8 Mio.","rat":0,"mw":"M","link":"Beaton, Steve <\/a>","confirmed_b":1},{"id":"5168","tem":"153","ctr":"215","nam":"Boulton, Andy ","namorig":"Boulton, Andy ","cat":"","pri":"2,8 Mio.","rat":0,"mw":"M","link":"Boulton, Andy <\/a>","confirmed_b":1},{"id":"7381","tem":"153","ctr":"214","nam":"Brown, Keegan ","namorig":"Brown, Keegan ","cat":"","pri":"2,7 Mio.","rat":0,"mw":"M","link":"Brown, Keegan <\/a>","confirmed_b":1},{"id":"17951","tem":"153","ctr":"215","nam":"Murray, Ryan ","namorig":"Murray, Ryan ","cat":"","pri":"2,6 Mio.","rat":0,"mw":"M","link":"Murray, Ryan <\/a>","confirmed_b":1},{"id":"17506","tem":"153","ctr":"118","nam":"Lennon, Steve ","namorig":"Lennon, Steve ","cat":"","pri":"2,5 Mio.","rat":0,"mw":"M","link":"Lennon, Steve <\/a>","confirmed_b":1},{"id":"5160","tem":"153","ctr":"214","nam":"Woodhouse, Luke ","namorig":"Woodhouse, Luke ","cat":"","pri":"2,5 Mio.","rat":0,"mw":"M","link":"Woodhouse, Luke <\/a>","confirmed_b":1},{"id":"23510","tem":"153","ctr":"215","nam":"Borland, William ","namorig":"Borland, William ","cat":"","pri":"2,4 Mio.","rat":0,"mw":"M","link":"Borland, William <\/a>","confirmed_b":1},{"id":"5022","tem":"153","ctr":"214","nam":"Hunt, Adam ","namorig":"Hunt, Adam ","cat":"","pri":"2,3 Mio.","rat":0,"mw":"M","link":"Hunt, Adam <\/a>","confirmed_b":1},{"id":"18111","tem":"153","ctr":"214","nam":"Rydz, Callan ","namorig":"Rydz, Callan ","cat":"","pri":"2,3 Mio.","rat":0,"mw":"M","link":"Rydz, Callan <\/a>","confirmed_b":1},{"id":"20224","tem":"153","ctr":"61","nam":"Kuivenhoven, Maik ","namorig":"Kuivenhoven, Maik ","cat":"","pri":"2,2 Mio.","rat":0,"mw":"M","link":"Kuivenhoven, Maik <\/a>","confirmed_b":1},{"id":"4909","tem":"153","ctr":"214","nam":"Jones, Wayne ","namorig":"Jones, Wayne ","cat":"","pri":"2,1 Mio.","rat":0,"mw":"M","link":"Jones, Wayne <\/a>","confirmed_b":1},{"id":"20149","tem":"153","ctr":"214","nam":"Lowe, Jason ","namorig":"Lowe, Jason ","cat":"","pri":"2,1 Mio.","rat":0,"mw":"M","link":"Lowe, Jason <\/a>","confirmed_b":1},{"id":"5144","tem":"153","ctr":"214","nam":"Waites, Scott ","namorig":"Waites, Scott ","cat":"","pri":"2 Mio.","rat":0,"mw":"M","link":"Waites, Scott <\/a>","confirmed_b":1},{"id":"19275","tem":"153","ctr":"61","nam":"Telnekes, Derk ","namorig":"Telnekes, Derk ","cat":"","pri":"1,9 Mio.","rat":0,"mw":"M","link":"Telnekes, Derk <\/a>","confirmed_b":1},{"id":"10848","tem":"153","ctr":"76","nam":"Decker, Mike De","namorig":"Decker, Mike De","cat":"","pri":"1,7 Mio.","rat":0,"mw":"M","link":"Decker, Mike De<\/a>","confirmed_b":1},{"id":"4985","tem":"153","ctr":"217","nam":"Mansell, Mickey ","namorig":"Mansell, Mickey ","cat":"","pri":"1,5 Mio.","rat":0,"mw":"M","link":"Mansell, Mickey <\/a>","confirmed_b":1},{"id":"8293","tem":"153","ctr":"78","nam":"Sedlacek, Karel ","namorig":"Sedlacek, Karel ","cat":"","pri":"1,4 Mio.","rat":0,"mw":"M","link":"Sedlacek, Karel <\/a>","confirmed_b":1},{"id":"23180","tem":"153","ctr":"61","nam":"Zonneveld, Niels ","namorig":"Zonneveld, Niels ","cat":"","pri":"1,4 Mio.","rat":0,"mw":"M","link":"Zonneveld, Niels <\/a>","confirmed_b":1},{"id":"4939","tem":"153","ctr":"215","nam":"Henderson, John ","namorig":"Henderson, John ","cat":"","pri":"1,3 Mio.","rat":0,"mw":"M","link":"Henderson, John <\/a>","confirmed_b":1},{"id":"5036","tem":"153","ctr":"120","nam":"Krcmar, Boris ","namorig":"Krcmar, Boris ","cat":"","pri":"1,2 Mio.","rat":0,"mw":"M","link":"Krcmar, Boris <\/a>","confirmed_b":1},{"id":"15336","tem":"153","ctr":"214","nam":"Meikle, Ryan ","namorig":"Meikle, Ryan ","cat":"","pri":"1,2 Mio.","rat":0,"mw":"M","link":"Meikle, Ryan <\/a>","confirmed_b":1},{"id":"11040","tem":"153","ctr":"132","nam":"Labanauskas, Darius ","namorig":"Labanauskas, Darius ","cat":"","pri":"1,1 Mio.","rat":0,"mw":"M","link":"Labanauskas, Darius <\/a>","confirmed_b":1}]; var sportsmenTeams = []; var showTeams = 0; //*********************** //SPORTSMEN TABLE HEADERS //*********************** var headersTableSportsmen = [ { 'sTitle': 'Nr.' }, { 'sTitle': 'Gruppe' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'Land', 'sSortDataType': 'sortCountryFlag', sType : "text" }, { 'sTitle': 'Dartspieler'}, { 'sTitle': 'Wert', 'sSortDataType': 'sortMln', 'sType': 'numeric' }, { 'sTitle': 'Team' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'M/F' , 'bSearchable': false, 'bVisible': false } ]; //*********************** //TEAMS TABLE HEADERS //*********************** var headersTableTeams = [ {'sTitle': 'Nr.'}, {'sTitle': '' , 'bSearchable': false, 'bVisible': false }, {'sTitle': 'Land' , 'sSortDataType': 'sortCountryFlag', sType : 'text' }, { 'sTitle': ''}, { 'sTitle': 'Wert', '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(' Mio.', '').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 ""; }