$(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(' млн.', ''); } ); }; $.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":"\u0410\u043d\u0433\u043b\u0438\u044f"},"217":{"id":"217","country":"Northern Ireland","countryCode":"NIE","countryTr":"\u0421\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u0418\u0440\u043b\u0430\u043d\u0434\u0438\u044f"},"3":{"id":"3","country":"United States","countryCode":"US","countryTr":"\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0428\u0442\u0430\u0442\u044b"},"14":{"id":"14","country":"Germany","countryCode":"DE","countryTr":"\u0413\u0435\u0440\u043c\u0430\u043d\u0438\u044f"},"51":{"id":"51","country":"Australia","countryCode":"AU","countryTr":"\u0410\u0432\u0441\u0442\u0440\u0430\u043b\u0438\u044f"},"26":{"id":"26","country":"South Africa","countryCode":"ZA","countryTr":"\u042e\u0436\u043d\u0430\u044f \u0410\u0444\u0440\u0438\u043a\u0430"},"25":{"id":"25","country":"South Korea","countryCode":"KR","countryTr":"\u042e\u0436\u043d\u0430\u044f \u041a\u043e\u0440\u0435\u044f"},"88":{"id":"88","country":"Sweden","countryCode":"SE","countryTr":"\u0428\u0432\u0435\u0446\u0438\u044f"},"109":{"id":"109","country":"Denmark","countryCode":"DK","countryTr":"\u0414\u0430\u043d\u0438\u044f"},"23":{"id":"23","country":"Italy","countryCode":"IT","countryTr":"\u0418\u0442\u0430\u043b\u0438\u044f"},"215":{"id":"215","country":"Scotland","countryCode":"SF","countryTr":"\u0428\u043e\u0442\u043b\u0430\u043d\u0434\u0438\u044f"},"28":{"id":"28","country":"Spain","countryCode":"ES","countryTr":"\u0418\u0441\u043f\u0430\u043d\u0438\u044f"},"10":{"id":"10","country":"Japan","countryCode":"JP","countryTr":"\u042f\u043f\u043e\u043d\u0438\u044f"},"158":{"id":"158","country":"Fiji","countryCode":"FJ","countryTr":"\u0424\u0438\u0434\u0436\u0438"},"110":{"id":"110","country":"Slovakia","countryCode":"SK","countryTr":"\u0421\u043b\u043e\u0432\u0430\u043a\u0438\u044f"},"76":{"id":"76","country":"Belgium","countryCode":"BE","countryTr":"\u0411\u0435\u043b\u044c\u0433\u0438\u044f"},"29":{"id":"29","country":"Colombia","countryCode":"CO","countryTr":"\u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f"},"118":{"id":"118","country":"Ireland","countryCode":"IE","countryTr":"\u0418\u0440\u043b\u0430\u043d\u0434\u0438\u044f"},"216":{"id":"216","country":"Wales","countryCode":"WL","countryTr":"\u0423\u044d\u043b\u044c\u0441"},"19":{"id":"19","country":"France","countryCode":"FR","countryTr":"\u0424\u0440\u0430\u043d\u0446\u0438\u044f"},"61":{"id":"61","country":"Netherlands","countryCode":"NL","countryTr":"\u041d\u0438\u0434\u0435\u0440\u043b\u0430\u043d\u0434\u044b"},"42":{"id":"42","country":"Venezuela","countryCode":"VE","countryTr":"\u0412\u0435\u043d\u0435\u0441\u0443\u044d\u043b\u0430"},"31":{"id":"31","country":"Argentina","countryCode":"AR","countryTr":"\u0410\u0440\u0433\u0435\u043d\u0442\u0438\u043d\u0430"},"69":{"id":"69","country":"Zimbabwe","countryCode":"ZW","countryTr":"\u0417\u0438\u043c\u0431\u0430\u0431\u0432\u0435"},"20":{"id":"20","country":"Thailand","countryCode":"TH","countryTr":"\u0422\u0430\u0439\u043b\u0430\u043d\u0434"},"7":{"id":"7","country":"Bangladesh","countryCode":"BD","countryTr":"\u0411\u0430\u043d\u0433\u043b\u0430\u0434\u0435\u0448"},"124":{"id":"124","country":"New Zealand","countryCode":"NZ","countryTr":"\u041d\u043e\u0432\u0430\u044f \u0417\u0435\u043b\u0430\u043d\u0434\u0438\u044f"},"2":{"id":"2","country":"India","countryCode":"IN","countryTr":"\u0418\u043d\u0434\u0438\u044f"},"93":{"id":"93","country":"Austria","countryCode":"AT","countryTr":"\u0410\u0432\u0441\u0442\u0440\u0438\u044f"},"60":{"id":"60","country":"Chile","countryCode":"CL","countryTr":"\u0427\u0438\u043b\u0438"},"1":{"id":"1","country":"China","countryCode":"CN","countryTr":"\u041a\u0438\u0442\u0430\u0439"},"36":{"id":"36","country":"Canada","countryCode":"CA","countryTr":"\u041a\u0430\u043d\u0430\u0434\u0430"},"116":{"id":"116","country":"Singapore","countryCode":"SG","countryTr":"\u0421\u0438\u043d\u0433\u0430\u043f\u0443\u0440"},"77":{"id":"77","country":"Portugal","countryCode":"PT","countryTr":"\u041f\u043e\u0440\u0442\u0443\u0433\u0430\u043b\u0438\u044f"},"104":{"id":"104","country":"Paraguay","countryCode":"PY","countryTr":"\u041f\u0430\u0440\u0430\u0433\u0432\u0430\u0439"},"49":{"id":"49","country":"Taiwan","countryCode":"TW","countryTr":"\u0422\u0430\u0439\u0432\u0430\u043d\u044c"},"112":{"id":"112","country":"Finland","countryCode":"FI","countryTr":"\u0424\u0438\u043d\u043b\u044f\u043d\u0434\u0438\u044f"},"5":{"id":"5","country":"Brasil","countryCode":"BR","countryTr":"\u0411\u0440\u0430\u0437\u0438\u043b\u0438\u044f"},"12":{"id":"12","country":"Philippines","countryCode":"PH","countryTr":"\u0424\u0438\u043b\u0438\u043f\u0438\u043d\u044b"},"11":{"id":"11","country":"Mexico","countryCode":"MX","countryTr":"\u041c\u0435\u043a\u0441\u0438\u043a\u0430"},"117":{"id":"117","country":"Norway","countryCode":"NO","countryTr":"\u041d\u043e\u0440\u0432\u0435\u0433\u0438\u044f"},"43":{"id":"43","country":"Malaysia","countryCode":"MY","countryTr":"\u041c\u0430\u043b\u0430\u0439\u0437\u0438\u044f"},"119":{"id":"119","country":"Costa Rica","countryCode":"CR","countryTr":"\u041a\u043e\u0441\u0442\u0430-\u0420\u0438\u043a\u0430"},"126":{"id":"126","country":"Puerto Rico","countryCode":"PR","countryTr":"\u041f\u0443\u044d\u0440\u0442\u043e-\u0420\u0438\u043a\u043e"},"122":{"id":"122","country":"United Arab Emirates","countryCode":"AE","countryTr":"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0410\u0440\u0430\u0431\u0441\u043a\u0438\u0435 \u042d\u043c\u0438\u0440\u0430\u0442\u044b"},"175":{"id":"175","country":"Iceland","countryCode":"IS","countryTr":"\u0418\u0441\u043b\u0430\u043d\u0434\u0438\u044f"},"17":{"id":"17","country":"Turkey","countryCode":"TR","countryTr":"\u0422\u0443\u0440\u0446\u0438\u044f"},"94":{"id":"94","country":"Swiss","countryCode":"CH","countryTr":"\u0428\u0432\u0435\u0439\u0446\u0430\u0440\u0438\u044f"},"33":{"id":"33","country":"Poland","countryCode":"PL","countryTr":"\u041f\u043e\u043b\u044c\u0448\u0430"},"37":{"id":"37","country":"Morocco","countryCode":"MA","countryTr":"\u041c\u0430\u0440\u043e\u043a\u043a\u043e"},"105":{"id":"105","country":"Jordan","countryCode":"JO","countryTr":"\u0418\u043e\u0440\u0434\u0430\u043d\u0438\u044f"},"46":{"id":"46","country":"Saudi Arabia","countryCode":"SA","countryTr":"\u0421\u0430\u0443\u0434\u043e\u0432\u0441\u043a\u0430\u044f \u0410\u0440\u0430\u0432\u0438\u044f"},"40":{"id":"40","country":"Peru","countryCode":"PE","countryTr":"\u041f\u0435\u0440\u0443"},"78":{"id":"78","country":"Czech Republic","countryCode":"CZ","countryTr":"\u0427\u0435\u0445\u0438\u044f"},"203":{"id":"203","country":"Bermuda","countryCode":"BM","countryTr":"\u0411\u0435\u0440\u043c\u0443\u0434\u0441\u043a\u0438\u0435 \u043e\u0441\u0442\u0440\u043e\u0432\u0430"},"220":{"id":"220","country":"Cayman Islands","countryCode":"KY","countryTr":"Cayman Islands"},"68":{"id":"68","country":"Guatemala","countryCode":"GT","countryTr":"\u0413\u0432\u0430\u0442\u0435\u043c\u0430\u043b\u0430"},"98":{"id":"98","country":"Hong Kong","countryCode":"HK","countryTr":"\u0413\u043e\u043d\u043a\u043e\u043d\u0433"},"66":{"id":"66","country":"Ecuador","countryCode":"EC","countryTr":"\u042d\u043a\u0432\u0430\u0434\u043e\u0440"}}; var teams = [{"id":0,"name":""}]; var sportsmen = [{"id":"4427","tem":"0","ctr":"214","nam":"Rose, Justin ","namorig":"Rose, Justin ","cat":"","pri":"20 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Rose, Justin <\/a>","confirmed_b":1},{"id":"15875","tem":"0","ctr":"28","nam":"Rahm, Jon ","namorig":"Rahm, Jon ","cat":"","pri":"18,4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Rahm, Jon <\/a>","confirmed_b":1},{"id":"4457","tem":"0","ctr":"28","nam":"Garcia, Sergio ","namorig":"Garcia, Sergio ","cat":"","pri":"16,3 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Garcia, Sergio <\/a>","confirmed_b":1},{"id":"7537","tem":"0","ctr":"214","nam":"Hatton, Tyrrell ","namorig":"Hatton, Tyrrell ","cat":"","pri":"14,6 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Hatton, Tyrrell <\/a>","confirmed_b":1},{"id":"4561","tem":"0","ctr":"214","nam":"Fleetwood, Tommy ","namorig":"Fleetwood, Tommy ","cat":"","pri":"14,5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Fleetwood, Tommy <\/a>","confirmed_b":1},{"id":"4482","tem":"0","ctr":"88","nam":"Noren, Alex ","namorig":"Noren, Alex ","cat":"","pri":"12,9 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Noren, Alex <\/a>","confirmed_b":1},{"id":"4442","tem":"0","ctr":"23","nam":"Molinari, Francesco ","namorig":"Molinari, Francesco ","cat":"","pri":"11,8 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Molinari, Francesco <\/a>","confirmed_b":1},{"id":"4579","tem":"0","ctr":"28","nam":"Cabrera Bello, Rafa ","namorig":"Cabrera Bello, Rafa ","cat":"","pri":"11,2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Cabrera Bello, Rafa <\/a>","confirmed_b":1},{"id":"7509","tem":"0","ctr":"3","nam":"Reed, Patrick ","namorig":"Reed, Patrick ","cat":"","pri":"10,9 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Reed, Patrick <\/a>","confirmed_b":1},{"id":"4489","tem":"0","ctr":"214","nam":"Fisher, Ross ","namorig":"Fisher, Ross ","cat":"","pri":"10 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Fisher, Ross <\/a>","confirmed_b":1},{"id":"4628","tem":"0","ctr":"93","nam":"Wiesberger, Bernd ","namorig":"Wiesberger, Bernd ","cat":"","pri":"9,4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Wiesberger, Bernd <\/a>","confirmed_b":1},{"id":"10425","tem":"0","ctr":"76","nam":"Pieters, Thomas ","namorig":"Pieters, Thomas ","cat":"","pri":"9,3 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Pieters, Thomas <\/a>","confirmed_b":1},{"id":"7534","tem":"0","ctr":"214","nam":"Fitzpatrick, Matt ","namorig":"Fitzpatrick, Matt ","cat":"","pri":"8,5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Fitzpatrick, Matt <\/a>","confirmed_b":1},{"id":"4422","tem":"0","ctr":"26","nam":"Schwartzel, Charl ","namorig":"Schwartzel, Charl ","cat":"","pri":"8,1 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Schwartzel, Charl <\/a>","confirmed_b":1},{"id":"4670","tem":"0","ctr":"26","nam":"Grace, Branden ","namorig":"Grace, Branden ","cat":"","pri":"7,4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Grace, Branden <\/a>","confirmed_b":1},{"id":"7418","tem":"0","ctr":"3","nam":"Uihlein, Peter ","namorig":"Uihlein, Peter ","cat":"","pri":"6,7 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Uihlein, Peter <\/a>","confirmed_b":1},{"id":"7501","tem":"0","ctr":"19","nam":"Levy, Alexander ","namorig":"Levy, Alexander ","cat":"","pri":"6,3 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Levy, Alexander <\/a>","confirmed_b":1},{"id":"4546","tem":"0","ctr":"109","nam":"Olesen, Thorbj\u00f8rn ","namorig":"Olesen, Thorbj\u00f8rn ","cat":"","pri":"6,2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Olesen, Thorbj\u00f8rn <\/a>","confirmed_b":1},{"id":"4433","tem":"0","ctr":"214","nam":"Poulter, Ian ","namorig":"Poulter, Ian ","cat":"","pri":"6,1 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Poulter, Ian <\/a>","confirmed_b":1},{"id":"4575","tem":"0","ctr":"20","nam":"Aphibarnrat, Kiradech ","namorig":"Aphibarnrat, Kiradech ","cat":"","pri":"6 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Aphibarnrat, Kiradech <\/a>","confirmed_b":1},{"id":"4506","tem":"0","ctr":"61","nam":"Luiten, Joost ","namorig":"Luiten, Joost ","cat":"","pri":"5,9 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Luiten, Joost <\/a>","confirmed_b":1},{"id":"4484","tem":"0","ctr":"76","nam":"Colsaerts, Nicolas ","namorig":"Colsaerts, Nicolas ","cat":"","pri":"5,8 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Colsaerts, Nicolas <\/a>","confirmed_b":1},{"id":"8451","tem":"0","ctr":"1","nam":"Li, Haotong ","namorig":"Li, Haotong ","cat":"","pri":"5,7 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Li, Haotong <\/a>","confirmed_b":1},{"id":"11915","tem":"0","ctr":"26","nam":"Frittelli, Dylan ","namorig":"Frittelli, Dylan ","cat":"","pri":"5,6 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Frittelli, Dylan <\/a>","confirmed_b":1},{"id":"17644","tem":"0","ctr":"214","nam":"Smith, Jordan ","namorig":"Smith, Jordan ","cat":"","pri":"5,5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Smith, Jordan <\/a>","confirmed_b":1},{"id":"10697","tem":"0","ctr":"118","nam":"Dunne, Paul ","namorig":"Dunne, Paul ","cat":"","pri":"5,3 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Dunne, Paul <\/a>","confirmed_b":1},{"id":"4647","tem":"0","ctr":"19","nam":"Dubuisson, Victor ","namorig":"Dubuisson, Victor ","cat":"","pri":"5,2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Dubuisson, Victor <\/a>","confirmed_b":1},{"id":"8587","tem":"0","ctr":"10","nam":"Tanihara, Hideto ","namorig":"Tanihara, Hideto ","cat":"","pri":"5,1 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Tanihara, Hideto <\/a>","confirmed_b":1},{"id":"4412","tem":"0","ctr":"214","nam":"Westwood, Lee ","namorig":"Westwood, Lee ","cat":"","pri":"5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Westwood, Lee <\/a>","confirmed_b":1},{"id":"4578","tem":"0","ctr":"214","nam":"Wood, Chris ","namorig":"Wood, Chris ","cat":"","pri":"4,9 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Wood, Chris <\/a>","confirmed_b":1},{"id":"4416","tem":"0","ctr":"14","nam":"Kaymer, Martin ","namorig":"Kaymer, Martin ","cat":"","pri":"4,8 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Kaymer, Martin <\/a>","confirmed_b":1},{"id":"4618","tem":"0","ctr":"118","nam":"Lowry, Shane ","namorig":"Lowry, Shane ","cat":"","pri":"4,7 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Lowry, Shane <\/a>","confirmed_b":1},{"id":"6484","tem":"0","ctr":"51","nam":"Hend, Scott ","namorig":"Hend, Scott ","cat":"","pri":"4,6 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Hend, Scott <\/a>","confirmed_b":1},{"id":"4674","tem":"0","ctr":"104","nam":"Zanotti, Fabrizio ","namorig":"Zanotti, Fabrizio ","cat":"","pri":"4,5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Zanotti, Fabrizio <\/a>","confirmed_b":1},{"id":"11064","tem":"0","ctr":"124","nam":"Fox, Ryan ","namorig":"Fox, Ryan ","cat":"","pri":"4,4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Fox, Ryan <\/a>","confirmed_b":1},{"id":"4580","tem":"0","ctr":"215","nam":"Jamieson, Scott ","namorig":"Jamieson, Scott ","cat":"","pri":"4,4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Jamieson, Scott <\/a>","confirmed_b":1},{"id":"10705","tem":"0","ctr":"214","nam":"Southgate, Matthew ","namorig":"Southgate, Matthew ","cat":"","pri":"4,3 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Southgate, Matthew <\/a>","confirmed_b":1},{"id":"4577","tem":"0","ctr":"109","nam":"Kjeldsen, S\u00f8ren ","namorig":"Kjeldsen, S\u00f8ren ","cat":"","pri":"4,2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Kjeldsen, S\u00f8ren <\/a>","confirmed_b":1},{"id":"7254","tem":"0","ctr":"214","nam":"Sullivan, Andy ","namorig":"Sullivan, Andy ","cat":"","pri":"4,2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Sullivan, Andy <\/a>","confirmed_b":1},{"id":"4567","tem":"0","ctr":"215","nam":"Ramsay, Richie ","namorig":"Ramsay, Richie ","cat":"","pri":"4,1 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Ramsay, Richie <\/a>","confirmed_b":1},{"id":"4504","tem":"0","ctr":"28","nam":"Larraz\u00e1bal, Pablo ","namorig":"Larraz\u00e1bal, Pablo ","cat":"","pri":"4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Larraz\u00e1bal, Pablo <\/a>","confirmed_b":1},{"id":"11993","tem":"0","ctr":"25","nam":"Wang, Jeunghun ","namorig":"Wang, Jeunghun ","cat":"","pri":"4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Wang, Jeunghun <\/a>","confirmed_b":1},{"id":"4513","tem":"0","ctr":"214","nam":"Horsey, David ","namorig":"Horsey, David ","cat":"","pri":"3,9 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Horsey, David <\/a>","confirmed_b":1},{"id":"4708","tem":"0","ctr":"214","nam":"Storm, Graeme ","namorig":"Storm, Graeme ","cat":"","pri":"3,8 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Storm, Graeme <\/a>","confirmed_b":1},{"id":"17665","tem":"0","ctr":"88","nam":"Bj\u00f6rk, Alexander ","namorig":"Bj\u00f6rk, Alexander ","cat":"","pri":"3,7 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Bj\u00f6rk, Alexander <\/a>","confirmed_b":1},{"id":"7416","tem":"0","ctr":"214","nam":"Pepperell, Eddie ","namorig":"Pepperell, Eddie ","cat":"","pri":"3,6 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Pepperell, Eddie <\/a>","confirmed_b":1},{"id":"4511","tem":"0","ctr":"26","nam":"Coetzee, George ","namorig":"Coetzee, George ","cat":"","pri":"3,5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Coetzee, George <\/a>","confirmed_b":1},{"id":"18205","tem":"0","ctr":"3","nam":"Suri, Julian ","namorig":"Suri, Julian ","cat":"","pri":"3,5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Suri, Julian <\/a>","confirmed_b":1},{"id":"12387","tem":"0","ctr":"19","nam":"Lorenzo-Vera, Mike ","namorig":"Lorenzo-Vera, Mike ","cat":"","pri":"3,4 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Lorenzo-Vera, Mike <\/a>","confirmed_b":1},{"id":"12056","tem":"0","ctr":"51","nam":"Dodt, Andrew ","namorig":"Dodt, Andrew ","cat":"","pri":"3,3 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Dodt, Andrew <\/a>","confirmed_b":1},{"id":"6481","tem":"0","ctr":"3","nam":"Lipsky, David ","namorig":"Lipsky, David ","cat":"","pri":"3,2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Lipsky, David <\/a>","confirmed_b":1},{"id":"12417","tem":"0","ctr":"214","nam":"Shinkwin, Callum ","namorig":"Shinkwin, Callum ","cat":"","pri":"3,2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Shinkwin, Callum <\/a>","confirmed_b":1},{"id":"10430","tem":"0","ctr":"28","nam":"Otaegui, Adrian ","namorig":"Otaegui, Adrian ","cat":"","pri":"3,1 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Otaegui, Adrian <\/a>","confirmed_b":1},{"id":"5741","tem":"0","ctr":"26","nam":"Sterne, Richard ","namorig":"Sterne, Richard ","cat":"","pri":"3,1 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Sterne, Richard <\/a>","confirmed_b":1},{"id":"15354","tem":"0","ctr":"26","nam":"Burmester, Dean ","namorig":"Burmester, Dean ","cat":"","pri":"3 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Burmester, Dean <\/a>","confirmed_b":1},{"id":"17664","tem":"0","ctr":"19","nam":"Pavon, Matthieu ","namorig":"Pavon, Matthieu ","cat":"","pri":"2,9 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Pavon, Matthieu <\/a>","confirmed_b":1},{"id":"10481","tem":"0","ctr":"109","nam":"Bjerregaard, Lucas ","namorig":"Bjerregaard, Lucas ","cat":"","pri":"2,8 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Bjerregaard, Lucas <\/a>","confirmed_b":1},{"id":"15360","tem":"0","ctr":"26","nam":"Porteous, Haydn ","namorig":"Porteous, Haydn ","cat":"","pri":"2,7 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Porteous, Haydn <\/a>","confirmed_b":1},{"id":"6526","tem":"0","ctr":"215","nam":"Drysdale, David ","namorig":"Drysdale, David ","cat":"","pri":"2,5 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Drysdale, David <\/a>","confirmed_b":1},{"id":"7504","tem":"0","ctr":"214","nam":"Waring, Paul ","namorig":"Waring, Paul ","cat":"","pri":"2 \u043c\u043b\u043d.","rat":0,"mw":"\u041c","link":"Waring, Paul <\/a>","confirmed_b":1}]; var sportsmenTeams = []; var showTeams = 0; //*********************** //SPORTSMEN TABLE HEADERS //*********************** var headersTableSportsmen = [ { 'sTitle': '№.' }, { 'sTitle': 'Группа' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'Страна', 'sSortDataType': 'sortCountryFlag', sType : "text" }, { 'sTitle': 'игрок в гольф'}, { 'sTitle': 'Стоимость', 'sSortDataType': 'sortMln', 'sType': 'numeric' }, { 'sTitle': 'Команда' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'М/Ж' , 'bSearchable': false, 'bVisible': false } ]; //*********************** //TEAMS TABLE HEADERS //*********************** var headersTableTeams = [ {'sTitle': '№.'}, {'sTitle': '' , 'bSearchable': false, 'bVisible': false }, {'sTitle': 'Страна' , 'sSortDataType': 'sortCountryFlag', sType : 'text' }, { 'sTitle': ''}, { 'sTitle': 'Стоимость', '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(' млн.', '').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 ""; }