$(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"},"217":{"id":"217","country":"Northern Ireland","countryCode":"NIE","countryTr":"Nordirland"},"3":{"id":"3","country":"United States","countryCode":"US","countryTr":"Vereinigte Staaten"},"14":{"id":"14","country":"Germany","countryCode":"DE","countryTr":"Deutschland"},"51":{"id":"51","country":"Australia","countryCode":"AU","countryTr":"Australien"},"26":{"id":"26","country":"South Africa","countryCode":"ZA","countryTr":"S\u00fcdafrika"},"25":{"id":"25","country":"South Korea","countryCode":"KR","countryTr":"S\u00fcdkorea"},"88":{"id":"88","country":"Sweden","countryCode":"SE","countryTr":"Schweden"},"109":{"id":"109","country":"Denmark","countryCode":"DK","countryTr":"D\u00e4nemark"},"23":{"id":"23","country":"Italy","countryCode":"IT","countryTr":"Italien"},"215":{"id":"215","country":"Scotland","countryCode":"SF","countryTr":"Schottland"},"28":{"id":"28","country":"Spain","countryCode":"ES","countryTr":"Spanien"},"10":{"id":"10","country":"Japan","countryCode":"JP","countryTr":"Japan"},"158":{"id":"158","country":"Fiji","countryCode":"FJ","countryTr":"Fidschi"},"110":{"id":"110","country":"Slovakia","countryCode":"SK","countryTr":"Slowakei"},"76":{"id":"76","country":"Belgium","countryCode":"BE","countryTr":"Belgien"},"29":{"id":"29","country":"Colombia","countryCode":"CO","countryTr":"Kolumbien"},"118":{"id":"118","country":"Ireland","countryCode":"IE","countryTr":"Irland"},"216":{"id":"216","country":"Wales","countryCode":"WL","countryTr":"Wales"},"19":{"id":"19","country":"France","countryCode":"FR","countryTr":"Frankreich"},"61":{"id":"61","country":"Netherlands","countryCode":"NL","countryTr":"Die Niederlande"},"42":{"id":"42","country":"Venezuela","countryCode":"VE","countryTr":"Venezuela"},"31":{"id":"31","country":"Argentina","countryCode":"AR","countryTr":"Argentinien"},"69":{"id":"69","country":"Zimbabwe","countryCode":"ZW","countryTr":"Simbabwe"},"20":{"id":"20","country":"Thailand","countryCode":"TH","countryTr":"Thailand"},"7":{"id":"7","country":"Bangladesh","countryCode":"BD","countryTr":"Bangladesch"},"124":{"id":"124","country":"New Zealand","countryCode":"NZ","countryTr":"Neuseeland"},"2":{"id":"2","country":"India","countryCode":"IN","countryTr":"Indien"},"93":{"id":"93","country":"Austria","countryCode":"AT","countryTr":"\u00d6sterreich"},"60":{"id":"60","country":"Chile","countryCode":"CL","countryTr":"Chile"},"1":{"id":"1","country":"China","countryCode":"CN","countryTr":"China"},"36":{"id":"36","country":"Canada","countryCode":"CA","countryTr":"Kanada"},"116":{"id":"116","country":"Singapore","countryCode":"SG","countryTr":"Singapur"},"77":{"id":"77","country":"Portugal","countryCode":"PT","countryTr":"Portugal"},"104":{"id":"104","country":"Paraguay","countryCode":"PY","countryTr":"Paraguay"},"49":{"id":"49","country":"Taiwan","countryCode":"TW","countryTr":"Taiwan"},"112":{"id":"112","country":"Finland","countryCode":"FI","countryTr":"Finnland"},"5":{"id":"5","country":"Brasil","countryCode":"BR","countryTr":"Brasilien"},"12":{"id":"12","country":"Philippines","countryCode":"PH","countryTr":"Philippinen"},"11":{"id":"11","country":"Mexico","countryCode":"MX","countryTr":"Mexiko"},"117":{"id":"117","country":"Norway","countryCode":"NO","countryTr":"Norwegen"},"43":{"id":"43","country":"Malaysia","countryCode":"MY","countryTr":"Malaysia"},"119":{"id":"119","country":"Costa Rica","countryCode":"CR","countryTr":"Costa Rica"},"126":{"id":"126","country":"Puerto Rico","countryCode":"PR","countryTr":"Puerto Rico"},"122":{"id":"122","country":"United Arab Emirates","countryCode":"AE","countryTr":"Vereinigte Arabische Emirate"},"175":{"id":"175","country":"Iceland","countryCode":"IS","countryTr":"Island"},"17":{"id":"17","country":"Turkey","countryCode":"TR","countryTr":"T\u00fcrkei"},"94":{"id":"94","country":"Swiss","countryCode":"CH","countryTr":"Schweiz"},"33":{"id":"33","country":"Poland","countryCode":"PL","countryTr":"Polen"},"37":{"id":"37","country":"Morocco","countryCode":"MA","countryTr":"Marokko"},"105":{"id":"105","country":"Jordan","countryCode":"JO","countryTr":"Jordanien"},"46":{"id":"46","country":"Saudi Arabia","countryCode":"SA","countryTr":"Saudi-Arabien"},"40":{"id":"40","country":"Peru","countryCode":"PE","countryTr":"Peru"},"78":{"id":"78","country":"Czech Republic","countryCode":"CZ","countryTr":"Tschechien"},"203":{"id":"203","country":"Bermuda","countryCode":"BM","countryTr":"Bermuda-Inseln"},"220":{"id":"220","country":"Cayman Islands","countryCode":"KY","countryTr":"Cayman Islands"},"68":{"id":"68","country":"Guatemala","countryCode":"GT","countryTr":"Guatemala"},"98":{"id":"98","country":"Hong Kong","countryCode":"HK","countryTr":"Hongkong"},"66":{"id":"66","country":"Ecuador","countryCode":"EC","countryTr":"Ecuador"}}; var teams = [{"id":0,"name":""}]; var sportsmen = [{"id":"4415","tem":"0","ctr":"3","nam":"Johnson, Dustin ","namorig":"Johnson, Dustin ","cat":"","pri":"25 Mio.","rat":0,"mw":"M","link":"Johnson, Dustin <\/a>","confirmed_b":1},{"id":"4413","tem":"0","ctr":"217","nam":"McIlroy, Rory ","namorig":"McIlroy, Rory ","cat":"","pri":"22,8 Mio.","rat":0,"mw":"M","link":"McIlroy, Rory <\/a>","confirmed_b":1},{"id":"4572","tem":"0","ctr":"88","nam":"Stenson, Henrik ","namorig":"Stenson, Henrik ","cat":"","pri":"18,1 Mio.","rat":0,"mw":"M","link":"Stenson, Henrik <\/a>","confirmed_b":1},{"id":"4558","tem":"0","ctr":"214","nam":"Willett, Danny ","namorig":"Willett, Danny ","cat":"","pri":"15,9 Mio.","rat":0,"mw":"M","link":"Willett, Danny <\/a>","confirmed_b":1},{"id":"7509","tem":"0","ctr":"3","nam":"Reed, Patrick ","namorig":"Reed, Patrick ","cat":"","pri":"14,2 Mio.","rat":0,"mw":"M","link":"Reed, Patrick <\/a>","confirmed_b":1},{"id":"4418","tem":"0","ctr":"51","nam":"Scott, Adam ","namorig":"Scott, Adam ","cat":"","pri":"13,7 Mio.","rat":0,"mw":"M","link":"Scott, Adam <\/a>","confirmed_b":1},{"id":"4426","tem":"0","ctr":"3","nam":"Watson, Bubba ","namorig":"Watson, Bubba ","cat":"","pri":"13,3 Mio.","rat":0,"mw":"M","link":"Watson, Bubba <\/a>","confirmed_b":1},{"id":"4446","tem":"0","ctr":"3","nam":"Fowler, Rickie ","namorig":"Fowler, Rickie ","cat":"","pri":"13 Mio.","rat":0,"mw":"M","link":"Fowler, Rickie <\/a>","confirmed_b":1},{"id":"4457","tem":"0","ctr":"28","nam":"Garcia, Sergio ","namorig":"Garcia, Sergio ","cat":"","pri":"12,4 Mio.","rat":0,"mw":"M","link":"Garcia, Sergio <\/a>","confirmed_b":1},{"id":"4685","tem":"0","ctr":"215","nam":"Knox, Russell ","namorig":"Knox, Russell ","cat":"","pri":"12,1 Mio.","rat":0,"mw":"M","link":"Knox, Russell <\/a>","confirmed_b":1},{"id":"4430","tem":"0","ctr":"214","nam":"Casey, Paul ","namorig":"Casey, Paul ","cat":"","pri":"11,5 Mio.","rat":0,"mw":"M","link":"Casey, Paul <\/a>","confirmed_b":1},{"id":"4670","tem":"0","ctr":"26","nam":"Grace, Branden ","namorig":"Grace, Branden ","cat":"","pri":"11,2 Mio.","rat":0,"mw":"M","link":"Grace, Branden <\/a>","confirmed_b":1},{"id":"5502","tem":"0","ctr":"10","nam":"Matsuyama, Hideki ","namorig":"Matsuyama, Hideki ","cat":"","pri":"10,9 Mio.","rat":0,"mw":"M","link":"Matsuyama, Hideki <\/a>","confirmed_b":1},{"id":"4555","tem":"0","ctr":"3","nam":"Walker, Jimmy ","namorig":"Walker, Jimmy ","cat":"","pri":"10,3 Mio.","rat":0,"mw":"M","link":"Walker, Jimmy <\/a>","confirmed_b":1},{"id":"4419","tem":"0","ctr":"3","nam":"Kuchar, Matt ","namorig":"Kuchar, Matt ","cat":"","pri":"10,1 Mio.","rat":0,"mw":"M","link":"Kuchar, Matt <\/a>","confirmed_b":1},{"id":"4482","tem":"0","ctr":"88","nam":"Noren, Alex ","namorig":"Noren, Alex ","cat":"","pri":"10 Mio.","rat":0,"mw":"M","link":"Noren, Alex <\/a>","confirmed_b":1},{"id":"5617","tem":"0","ctr":"3","nam":"Koepka, Brooks ","namorig":"Koepka, Brooks ","cat":"","pri":"9,2 Mio.","rat":0,"mw":"M","link":"Koepka, Brooks <\/a>","confirmed_b":1},{"id":"4459","tem":"0","ctr":"26","nam":"Oosthuizen, Louis ","namorig":"Oosthuizen, Louis ","cat":"","pri":"8,9 Mio.","rat":0,"mw":"M","link":"Oosthuizen, Louis <\/a>","confirmed_b":1},{"id":"4490","tem":"0","ctr":"3","nam":"Holmes, J.B. ","namorig":"Holmes, J.B. ","cat":"","pri":"8,8 Mio.","rat":0,"mw":"M","link":"Holmes, J.B. <\/a>","confirmed_b":1},{"id":"4579","tem":"0","ctr":"28","nam":"Cabrera Bello, Rafa ","namorig":"Cabrera Bello, Rafa ","cat":"","pri":"8,5 Mio.","rat":0,"mw":"M","link":"Cabrera Bello, Rafa <\/a>","confirmed_b":1},{"id":"7847","tem":"0","ctr":"31","nam":"Grillo, Emiliano ","namorig":"Grillo, Emiliano ","cat":"","pri":"8,3 Mio.","rat":0,"mw":"M","link":"Grillo, Emiliano <\/a>","confirmed_b":1},{"id":"4422","tem":"0","ctr":"26","nam":"Schwartzel, Charl ","namorig":"Schwartzel, Charl ","cat":"","pri":"8,1 Mio.","rat":0,"mw":"M","link":"Schwartzel, Charl <\/a>","confirmed_b":1},{"id":"7537","tem":"0","ctr":"214","nam":"Hatton, Tyrrell ","namorig":"Hatton, Tyrrell ","cat":"","pri":"8 Mio.","rat":0,"mw":"M","link":"Hatton, Tyrrell <\/a>","confirmed_b":1},{"id":"10433","tem":"0","ctr":"3","nam":"Kisner, Kevin ","namorig":"Kisner, Kevin ","cat":"","pri":"7,7 Mio.","rat":0,"mw":"M","link":"Kisner, Kevin <\/a>","confirmed_b":1},{"id":"4562","tem":"0","ctr":"3","nam":"Chappell, Kevin ","namorig":"Chappell, Kevin ","cat":"","pri":"7,2 Mio.","rat":0,"mw":"M","link":"Chappell, Kevin <\/a>","confirmed_b":1},{"id":"4458","tem":"0","ctr":"3","nam":"Moore, Ryan ","namorig":"Moore, Ryan ","cat":"","pri":"7,1 Mio.","rat":0,"mw":"M","link":"Moore, Ryan <\/a>","confirmed_b":1},{"id":"4578","tem":"0","ctr":"214","nam":"Wood, Chris ","namorig":"Wood, Chris ","cat":"","pri":"7 Mio.","rat":0,"mw":"M","link":"Wood, Chris <\/a>","confirmed_b":1},{"id":"4556","tem":"0","ctr":"3","nam":"Piercy, Scott ","namorig":"Piercy, Scott ","cat":"","pri":"6,9 Mio.","rat":0,"mw":"M","link":"Piercy, Scott <\/a>","confirmed_b":1},{"id":"10511","tem":"0","ctr":"3","nam":"Thomas, Justin ","namorig":"Thomas, Justin ","cat":"","pri":"6,7 Mio.","rat":0,"mw":"M","link":"Thomas, Justin <\/a>","confirmed_b":1},{"id":"10480","tem":"0","ctr":"3","nam":"Berger, Daniel ","namorig":"Berger, Daniel ","cat":"","pri":"6,5 Mio.","rat":0,"mw":"M","link":"Berger, Daniel <\/a>","confirmed_b":1},{"id":"4472","tem":"0","ctr":"3","nam":"Na, Kevin ","namorig":"Na, Kevin ","cat":"","pri":"6,4 Mio.","rat":0,"mw":"M","link":"Na, Kevin <\/a>","confirmed_b":1},{"id":"10425","tem":"0","ctr":"76","nam":"Pieters, Thomas ","namorig":"Pieters, Thomas ","cat":"","pri":"6,3 Mio.","rat":0,"mw":"M","link":"Pieters, Thomas <\/a>","confirmed_b":1},{"id":"10696","tem":"0","ctr":"25","nam":"An, Byeong-Hun ","namorig":"An, Byeong-Hun ","cat":"","pri":"6,2 Mio.","rat":0,"mw":"M","link":"An, Byeong-Hun <\/a>","confirmed_b":1},{"id":"4442","tem":"0","ctr":"23","nam":"Molinari, Francesco ","namorig":"Molinari, Francesco ","cat":"","pri":"5,9 Mio.","rat":0,"mw":"M","link":"Molinari, Francesco <\/a>","confirmed_b":1},{"id":"4412","tem":"0","ctr":"214","nam":"Westwood, Lee ","namorig":"Westwood, Lee ","cat":"","pri":"5,8 Mio.","rat":0,"mw":"M","link":"Westwood, Lee <\/a>","confirmed_b":1},{"id":"4618","tem":"0","ctr":"118","nam":"Lowry, Shane ","namorig":"Lowry, Shane ","cat":"","pri":"5,6 Mio.","rat":0,"mw":"M","link":"Lowry, Shane <\/a>","confirmed_b":1},{"id":"7534","tem":"0","ctr":"214","nam":"Fitzpatrick, Matt ","namorig":"Fitzpatrick, Matt ","cat":"","pri":"5,5 Mio.","rat":0,"mw":"M","link":"Fitzpatrick, Matt <\/a>","confirmed_b":1},{"id":"4431","tem":"0","ctr":"3","nam":"Haas, Bill ","namorig":"Haas, Bill ","cat":"","pri":"5,4 Mio.","rat":0,"mw":"M","link":"Haas, Bill <\/a>","confirmed_b":1},{"id":"4416","tem":"0","ctr":"14","nam":"Kaymer, Martin ","namorig":"Kaymer, Martin ","cat":"","pri":"5,4 Mio.","rat":0,"mw":"M","link":"Kaymer, Martin <\/a>","confirmed_b":1},{"id":"4628","tem":"0","ctr":"93","nam":"Wiesberger, Bernd ","namorig":"Wiesberger, Bernd ","cat":"","pri":"5,3 Mio.","rat":0,"mw":"M","link":"Wiesberger, Bernd <\/a>","confirmed_b":1},{"id":"4577","tem":"0","ctr":"109","nam":"Kjeldsen, S\u00f8ren ","namorig":"Kjeldsen, S\u00f8ren ","cat":"","pri":"5,2 Mio.","rat":0,"mw":"M","link":"Kjeldsen, S\u00f8ren <\/a>","confirmed_b":1},{"id":"4452","tem":"0","ctr":"3","nam":"Woodland, Gary ","namorig":"Woodland, Gary ","cat":"","pri":"5,1 Mio.","rat":0,"mw":"M","link":"Woodland, Gary <\/a>","confirmed_b":1},{"id":"4489","tem":"0","ctr":"214","nam":"Fisher, Ross ","namorig":"Fisher, Ross ","cat":"","pri":"5 Mio.","rat":0,"mw":"M","link":"Fisher, Ross <\/a>","confirmed_b":1},{"id":"4506","tem":"0","ctr":"61","nam":"Luiten, Joost ","namorig":"Luiten, Joost ","cat":"","pri":"4,7 Mio.","rat":0,"mw":"M","link":"Luiten, Joost <\/a>","confirmed_b":1},{"id":"5601","tem":"0","ctr":"3","nam":"Castro, Roberto ","namorig":"Castro, Roberto ","cat":"","pri":"4,6 Mio.","rat":0,"mw":"M","link":"Castro, Roberto <\/a>","confirmed_b":1},{"id":"6484","tem":"0","ctr":"51","nam":"Hend, Scott ","namorig":"Hend, Scott ","cat":"","pri":"4,5 Mio.","rat":0,"mw":"M","link":"Hend, Scott <\/a>","confirmed_b":1},{"id":"15357","tem":"0","ctr":"25","nam":"Kim, Si Woo ","namorig":"Kim, Si Woo ","cat":"","pri":"4,4 Mio.","rat":0,"mw":"M","link":"Kim, Si Woo <\/a>","confirmed_b":1},{"id":"4541","tem":"0","ctr":"20","nam":"Jaidee, Thongchai ","namorig":"Jaidee, Thongchai ","cat":"","pri":"4,3 Mio.","rat":0,"mw":"M","link":"Jaidee, Thongchai <\/a>","confirmed_b":1},{"id":"4479","tem":"0","ctr":"3","nam":"O'Hair, Sean ","namorig":"O'Hair, Sean ","cat":"","pri":"4,2 Mio.","rat":0,"mw":"M","link":"O'Hair, Sean <\/a>","confirmed_b":1},{"id":"4516","tem":"0","ctr":"42","nam":"Vegas, Jhonattan ","namorig":"Vegas, Jhonattan ","cat":"","pri":"4,2 Mio.","rat":0,"mw":"M","link":"Vegas, Jhonattan <\/a>","confirmed_b":1},{"id":"4432","tem":"0","ctr":"25","nam":"Kim, K.T. ","namorig":"Kim, K.T. ","cat":"","pri":"4,1 Mio.","rat":0,"mw":"M","link":"Kim, K.T. <\/a>","confirmed_b":1},{"id":"11885","tem":"0","ctr":"214","nam":"Johnston, Andrew ","namorig":"Johnston, Andrew ","cat":"","pri":"4 Mio.","rat":0,"mw":"M","link":"Johnston, Andrew <\/a>","confirmed_b":1},{"id":"4613","tem":"0","ctr":"216","nam":"Dredge, Bradley ","namorig":"Dredge, Bradley ","cat":"","pri":"3,9 Mio.","rat":0,"mw":"M","link":"Dredge, Bradley <\/a>","confirmed_b":1},{"id":"4648","tem":"0","ctr":"88","nam":"Karlberg, Rikard ","namorig":"Karlberg, Rikard ","cat":"","pri":"3,9 Mio.","rat":0,"mw":"M","link":"Karlberg, Rikard <\/a>","confirmed_b":1},{"id":"7420","tem":"0","ctr":"3","nam":"Kokrak, Jason ","namorig":"Kokrak, Jason ","cat":"","pri":"3,8 Mio.","rat":0,"mw":"M","link":"Kokrak, Jason <\/a>","confirmed_b":1},{"id":"7501","tem":"0","ctr":"19","nam":"Levy, Alexander ","namorig":"Levy, Alexander ","cat":"","pri":"3,6 Mio.","rat":0,"mw":"M","link":"Levy, Alexander <\/a>","confirmed_b":1},{"id":"4586","tem":"0","ctr":"51","nam":"Fraser, Marcus ","namorig":"Fraser, Marcus ","cat":"","pri":"3,5 Mio.","rat":0,"mw":"M","link":"Fraser, Marcus <\/a>","confirmed_b":1},{"id":"7261","tem":"0","ctr":"214","nam":"Bland, Richard ","namorig":"Bland, Richard ","cat":"","pri":"3,3 Mio.","rat":0,"mw":"M","link":"Bland, Richard <\/a>","confirmed_b":1},{"id":"4524","tem":"0","ctr":"19","nam":"Bourdy, Gr\u00e9gory ","namorig":"Bourdy, Gr\u00e9gory ","cat":"","pri":"3,2 Mio.","rat":0,"mw":"M","link":"Bourdy, Gr\u00e9gory <\/a>","confirmed_b":1},{"id":"8587","tem":"0","ctr":"10","nam":"Tanihara, Hideto ","namorig":"Tanihara, Hideto ","cat":"","pri":"3,1 Mio.","rat":0,"mw":"M","link":"Tanihara, Hideto <\/a>","confirmed_b":1},{"id":"15365","tem":"0","ctr":"25","nam":"Lee, Soo-Min ","namorig":"Lee, Soo-Min ","cat":"","pri":"3 Mio.","rat":0,"mw":"M","link":"Lee, Soo-Min <\/a>","confirmed_b":1},{"id":"5741","tem":"0","ctr":"26","nam":"Sterne, Richard ","namorig":"Sterne, Richard ","cat":"","pri":"3 Mio.","rat":0,"mw":"M","link":"Sterne, Richard <\/a>","confirmed_b":1},{"id":"4511","tem":"0","ctr":"26","nam":"Coetzee, George ","namorig":"Coetzee, George ","cat":"","pri":"2,8 Mio.","rat":0,"mw":"M","link":"Coetzee, George <\/a>","confirmed_b":1},{"id":"8451","tem":"0","ctr":"1","nam":"Li, Haotong ","namorig":"Li, Haotong ","cat":"","pri":"2,7 Mio.","rat":0,"mw":"M","link":"Li, Haotong <\/a>","confirmed_b":1},{"id":"15354","tem":"0","ctr":"26","nam":"Burmester, Dean ","namorig":"Burmester, Dean ","cat":"","pri":"2,6 Mio.","rat":0,"mw":"M","link":"Burmester, Dean <\/a>","confirmed_b":1},{"id":"15359","tem":"0","ctr":"12","nam":"Tabuena, Miguel ","namorig":"Tabuena, Miguel ","cat":"","pri":"2,6 Mio.","rat":0,"mw":"M","link":"Tabuena, Miguel <\/a>","confirmed_b":1},{"id":"11993","tem":"0","ctr":"25","nam":"Wang, Jeunghun ","namorig":"Wang, Jeunghun ","cat":"","pri":"2,5 Mio.","rat":0,"mw":"M","link":"Wang, Jeunghun <\/a>","confirmed_b":1},{"id":"10930","tem":"0","ctr":"51","nam":"Holman, Nathan ","namorig":"Holman, Nathan ","cat":"","pri":"2,4 Mio.","rat":0,"mw":"M","link":"Holman, Nathan <\/a>","confirmed_b":1},{"id":"15358","tem":"0","ctr":"25","nam":"Song, Younghan ","namorig":"Song, Younghan ","cat":"","pri":"2,3 Mio.","rat":0,"mw":"M","link":"Song, Younghan <\/a>","confirmed_b":1},{"id":"4835","tem":"0","ctr":"1","nam":"Wu, Ashun ","namorig":"Wu, Ashun ","cat":"","pri":"2,3 Mio.","rat":0,"mw":"M","link":"Wu, Ashun <\/a>","confirmed_b":1},{"id":"16660","tem":"0","ctr":"49","nam":"Chan, Shih-Chang ","namorig":"Chan, Shih-Chang ","cat":"","pri":"2,2 Mio.","rat":0,"mw":"M","link":"Chan, Shih-Chang <\/a>","confirmed_b":1},{"id":"11118","tem":"0","ctr":"1","nam":"Dou, Zecheng ","namorig":"Dou, Zecheng ","cat":"","pri":"2,1 Mio.","rat":0,"mw":"M","link":"Dou, Zecheng <\/a>","confirmed_b":1},{"id":"16659","tem":"0","ctr":"26","nam":"Blaauw, Jacques ","namorig":"Blaauw, Jacques ","cat":"","pri":"2 Mio.","rat":0,"mw":"M","link":"Blaauw, Jacques <\/a>","confirmed_b":1},{"id":"16693","tem":"0","ctr":"51","nam":"Millar, Matthew ","namorig":"Millar, Matthew ","cat":"","pri":"2 Mio.","rat":0,"mw":"M","link":"Millar, Matthew <\/a>","confirmed_b":1},{"id":"4634","tem":"0","ctr":"1","nam":"Liang, Wenchong ","namorig":"Liang, Wenchong ","cat":"","pri":"1,9 Mio.","rat":0,"mw":"M","link":"Liang, Wenchong <\/a>","confirmed_b":1},{"id":"4834","tem":"0","ctr":"1","nam":"Zhang, Xinjun ","namorig":"Zhang, Xinjun ","cat":"","pri":"1,6 Mio.","rat":0,"mw":"M","link":"Zhang, Xinjun <\/a>","confirmed_b":1},{"id":"15682","tem":"0","ctr":"51","nam":"Zunic, Jordan ","namorig":"Zunic, Jordan ","cat":"","pri":"1,4 Mio.","rat":0,"mw":"M","link":"Zunic, Jordan <\/a>","confirmed_b":1},{"id":"16658","tem":"0","ctr":"1","nam":"Zhang, Huilin ","namorig":"Zhang, Huilin ","cat":"","pri":"1,3 Mio.","rat":0,"mw":"M","link":"Zhang, Huilin <\/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': 'Golfspieler'}, { '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 ""; }