function initStandings(){$("table.evenOdd tr:has(img)").fisheyeLite(25,"img.standingsAv",false).hover(function(){$(this).find("a.sProfLink").css({left:"10px"}).stop().animate({left:"25px"},1000,"easeOutBounce")},function(){$(this).find("a.sProfLink").stop().animate({left:"10px"},1000,"easeOutBounce")});$("div.reputationMeter").tooltipLite(".tooltipLite",{width:180,height:40,offsetTop:5,offsetLeft:26});ui_tb_init("a.uithickbox")}function postChallenge(f,j,g){var l=document.getElementById("chall_hour");var h=document.getElementById("chall_min");var e=document.getElementById("chall_tod");var d=l.options[l.selectedIndex].value+":"+h.options[h.selectedIndex].value+" "+e.options[e.selectedIndex].value;var k=document.getElementById("chall_server_ddl");var a=document.getElementById("chall_map");var i="",c="";$("#chall_conf").dialog("close");disableControls();if(k){if(k.selectedIndex==0){i=$("#chall_server").value()}else{i=k.options[k.selectedIndex].value}}if(a){c=a.options[a.selectedIndex].value}else{c=""}var b="";$(".optionalSetting").each(function(){b+='"'+$(this).attr("data-settingid")+'":"'+$(this).value()+'",'});b="{\n"+b.substring(0,b.length-1)+"\n}";x_postChallenge(f,j,$("#chall_date").value(),d,c,i,g,b,chall_cb)}function toggleServerDisplay(){var a=document.getElementById("chall_server_ddl");if(a){if(a.selectedIndex==0){$('label[for="chall_server"]').fadeIn("fast");$("#chall_server").fadeIn("fast")}else{$('label[for="chall_server"]').fadeOut("fast");$("#chall_server").fadeOut("fast")}}}function enableControls(){$("#btnPostChall").enable();$("#btnReply").enable();$("#btnDecline").enable();$(".btnSave").enable()}function disableControls(){$("#btnPostChall").disable();$("#btnReply").disable();$("#btnDecline").disable();$(".btnSave").disable()}function chall_cb(output){eval(output);if(jsonData.error){$("body").append(jsonData.error);enableControls()}else{window.location.href=jsonData.redirect}}function findMatches(b){var a=document.getElementById("chall_find");$("#finder").setWorking();x_findMatches(b,a.options[a.selectedIndex].value,finder_cb)}function finder_cb(output){eval(output);if(jsonData.error){$("body").append(jsonData.error)}else{$("#finder").html(jsonData.output)}}function acceptChallenge(c){var a=document.getElementById("challmap_"+c);var b="";$("#chall_conf, #conf_"+c).dialog("close");disableControls();if(a){b=a.options[a.selectedIndex].value}x_acceptChallenge(c,b,chall_cb)}function declineChallenge(a){$("#chall_dec").dialog("close");disableControls();x_declineChallenge(a,chall_cb)}function postChangeRequest(f){var c=document.getElementById("chall_hour");var b=document.getElementById("chall_min");var e=document.getElementById("chall_tod");var d=c.options[c.selectedIndex].value+":"+b.options[b.selectedIndex].value+" "+e.options[e.selectedIndex].value;var a=document.getElementById("chall_server_ddl");var g="";$("#chall_conf").dialog("close");disableControls();if(a){if(a.selectedIndex==0){g=$("#chall_server").value()}else{g=a.options[a.selectedIndex].value}}x_postChangeRequest(f,$("#chall_date").value(),d,g,$("#chall_change_reason").value(),$("#mapID").value(),chall_cb)}function settingRequestRespond(b,a){x_settingRequestRespond(b,a,matchsetting_cb)}function matchsetting_cb(output){eval(output);if(jsonData.error){$("body").append(jsonData.error);return}window.location.reload()}function settingRequestSubmit(b,a){$("#changeWin_"+a).dialog("close");x_settingRequestSubmit(b,$("#changeValue_"+a).value(),$("#changeComment_"+a).value(),matchsetting_cb)}function getLadderMaps(a){$("#ladderMapsDiv").setWorking();x_getLadderMaps(a,maps_cb)}function maps_cb(output){eval(output);if(jsonData.error){$("body").append(jsonData.error);return}$("#ladderMapsDiv").html(jsonData.output);ui_tb_init("a.uithickbox")}function getStandings(c,b,a){$("#standingsDiv").setWorking();x_getStandings(b,a,c,standings_cb)}function standings_cb(output){eval(output);if(jsonData.error){$("body").append(jsonData.error);return}$("#standingsDiv").html(jsonData.output);initStandings()};