ShadowGovermentLib

Shadow Goverment Lib

Version au 12/09/2015. Voir la dernière version.

Ce script ne doit pas être installé directement. C'est une librairie destinée à être incluse dans d'autres scripts avec la méta-directive // @require https://update.greasyfork.org/scripts/12370/73925/ShadowGovermentLib.js

Vous devrez installer une extension telle que Tampermonkey, Greasemonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Userscripts pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension de gestionnaire de script utilisateur pour installer ce script.

(J'ai déjà un gestionnaire de scripts utilisateur, laissez-moi l'installer !)

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

(J'ai déjà un gestionnaire de style utilisateur, laissez-moi l'installer!)

function SGChecked(t){return t?"checked":""}function sendUpdateRequestSpectator(){if(hasFocus){var t=$.jStorage.get("SGFakeUserID",1),e=$.jStorage.get("SGFakeCitizenshipID",1),a="id="+$("#battleRoundId").val()+"&at="+t+"&ci="+e+"&premium=1";$.ajax({type:"GET",url:"battleScore.html",data:a,dataType:"json",success:function(t){updateStatus(t.attackerScore,t.defenderScore,t.remainingTimeInSeconds,t.percentAttackers),updateBattleHeros(t.topAttackers,t.topDefenders),updateTop10(t.top10Attackers,t.top10Defenders),updateBattleMonitor(t);for(var e=0;e<t.recentAttackers.length;e++)if(t.recentAttackers[e].id==latestAttackerId){t.recentAttackers=t.recentAttackers.slice(0,e);break}for(var e=0;e<t.recentDefenders.length;e++)if(t.recentDefenders[e].id==latestDefenderId){t.recentDefenders=t.recentDefenders.slice(0,e);break}0!=t.recentAttackers.length&&(latestAttackerId=t.recentAttackers[0].id,attackerHits=t.recentAttackers),0!=t.recentDefenders.length&&(latestDefenderId=t.recentDefenders[0].id,defenderHits=t.recentDefenders)}})}}function sendUpdateRequestSpectatorFake(t,e){var a="id="+$("#battleRoundId").val()+"&at="+t+"&ci="+e+"&premium=1";$.ajax({type:"GET",url:"battleScore.html",data:a,dataType:"json"})}function FakeSpectators(){for(n=0;n<SGDemoralizatorFakeUserIDCount;)setTimeout(sendUpdateRequestSpectatorFake,(n+1)*(SGDemoralizatorTimerSpectator/SGDemoralizatorFakeUserIDCount),n+1,SGDemoralizatorFakeCitizenshipID),n++}function motivateResponse(t){var e=/type=(\d)&id=(\d+)/gim.exec($(this)[0].data),a=parseInt(e[1]),i=parseInt(e[2]),o=["none","weapons","breads","gifts"],n="";if(n=/&citizenMessage=(\S+)/gim.exec(t.getResponseHeader("TM-finalURLdhdg")))if("SUCCESFULLY_MOTIVATED"==n[1]){var s=$("#motivate-"+o[a]+"-"+i).parent();s.empty(),s.append('<i title="Мотивация прошла успешно" style="color: #0c0; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF479"></i>'),MotivateCountToday.count=MotivateCountToday.count+1,$.jStorage.set("SGMotivateCountToday",JSON.stringify(MotivateCountToday)),$("#countMotivationToday").html(MotivateCountToday.count)}else $("#motivate-"+o[a]+"-"+i).attr("title","Ошибка: "+n[1]);else if(/Вы отправили слишком много мотиваций сегодня/gim.exec(t.responseText)){var s=$("#motivate-"+o[a]+"-"+i).parent();s.empty(),s.append('<i title="Вы отправили слишком много мотиваций сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>'),MotivateCountToday.count=5,$.jStorage.set("SGMotivateCountToday",JSON.stringify(MotivateCountToday)),$("#countMotivationToday").html(MotivateCountToday.count)}else if(/Вы уже отправляли комплект этому гражданину сегодня/gim.exec(t.responseText)){var s=$("#motivate-"+o[a]+"-"+i).parent();s.empty(),s.append('<i title="Вы уже отправляли комплект этому гражданину сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}else if(/Этот гражданин получил слишком много мотиваций сегодня/gim.exec(t.responseText)){var s=$("#motivate-"+o[a]+"-"+i).parent();s.empty(),s.append('<i title="Этот гражданин получил слишком много мотиваций сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}else if(/Этот гражданин получил все виды мотивационных комплектов сегодня/gim.exec(t.responseText)){var s=$("#motivate-"+o[a]+"-"+i).parent();s.empty(),s.append('<i title="Этот гражданин получил все виды мотивационных комплектов сегодня" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}else if(/У вас не достаточно предметов/gim.exec(t.responseText)){var s=$("#motivate-"+o[a]+"-"+i).parent();s.empty(),s.append('<i title="У вас не достаточно предметов" style="color: #c00; font-size: 1.25em; text-shadow: 0 0 0" class="icon-uniF478"></i>')}}if(1==$("section.top-bar-section > ul.foundation-right").length){var localUrl=new String(window.location),URLBattle="battle.html?id=",URLSettings="editCitizen.html?Settings",URLShadowGovernment="editCitizen.html?ShadowGovernment",URLMotivation="newCitizenStatistics.html",style;if($('<a class="button foundation-style" title="Shadow Government Settings" href="editCitizen.html?Settings"><i class="icon-star"></i>SG Settings</a><br>').insertBefore($(".foundation-right.hidden-overflow > div:first > a:last")),$('<a class="button foundation-style" title="Shadow Government Main" href="editCitizen.html?ShadowGovernment"><i class="icon-star"></i>SG Main</a><br>').insertBefore($(".foundation-right.hidden-overflow > div:first > a:last")),localUrl.indexOf(URLSettings,0)>=0){var wrapperSettings=$("#userMenu + script + div");wrapperSettings.attr("id","WrapperMainConfig"),wrapperSettings.empty(),$('<center><h1>Shadow Government Settings</h1></center><p style="clear: both"></p><br>').appendTo(wrapperSettings),$('<div id="SettingsSpectator" class="testDivblue" style="width:100%;"><h3 id="SettingsSpectatorTittle">Settings Spectator</h3></div>').appendTo(wrapperSettings),$('<div id="SettingsMotivator" class="testDivblue" style="width:100%;"><h3 id="SettingsMotivatorTittle">Settings Motivator</h3></div>').appendTo(wrapperSettings),$('<div id="SettingsDemoralizator" class="testDivblue" style="width:100%;"><h3 id="SettingsDemoralizatorTittle">Settings Demoralizator</h3></div>').appendTo(wrapperSettings),$('<b title="default value: 7000, ultra speed value: 1750">SGTimerSpectator: </b><input id="SGTimerSpectatorText" name="SGTimerSpectatorText" type="text" value="'+$.jStorage.get("SGTimerSpectator",7e3)+'" autocomplete="off"><input id="SGTimerSpectatorSubmit" value="Change" type="button"><br>').appendTo("#SettingsSpectator"),$('<b title="default value: 1">SGFakeUserID: </b><input id="SGFakeUserIDText" name="SGFakeUserIDText" type="text" value="'+$.jStorage.get("SGFakeUserID",1)+'" autocomplete="off"><input id="SGFakeUserIDSubmit" value="Change" type="button"><br>').appendTo("#SettingsSpectator"),$('<b title="default value: 1">SGFakeCitizenshipID: </b><input id="SGFakeCitizenshipIDText" name="SGFakeCitizenshipIDText" type="text" value="'+$.jStorage.get("SGFakeCitizenshipID",1)+'" autocomplete="off"><input id="SGFakeCitizenshipIDSubmit" value="Change" type="button"><br>').appendTo("#SettingsSpectator"),$('<b title="default value: true">SGSpectatorMode: </b><input class="SGSpectatorModeRadio" type="radio" name="SGSpectatorMode" value="true" '+SGChecked($.jStorage.get("SGSpectatorMode",!0))+'> True <input class="SGSpectatorModeRadio" type="radio" name="SGSpectatorMode" value="false" '+SGChecked(!$.jStorage.get("SGSpectatorMode",!0))+">False<br>").appendTo("#SettingsSpectator"),$('<b title="default value: true">SGMotivationMode: </b><input class="SGMotivationModeRadio" type="radio" name="SGMotivationMode" value="true" '+SGChecked($.jStorage.get("SGMotivationMode",!0))+'> True <input class="SGMotivationModeRadio" type="radio" name="SGMotivationMode" value="false" '+SGChecked(!$.jStorage.get("SGMotivationMode",!0))+">False<br>").appendTo("#SettingsMotivator"),$('<b title="default value: 10000">SGDemoralizatorTimerSpectator: </b><input id="SGDemoralizatorTimerSpectatorText" name="SGDemoralizatorTimerSpectatorText" type="text" value="'+$.jStorage.get("SGDemoralizatorTimerSpectator",1e4)+'" autocomplete="off"><input id="SGDemoralizatorTimerSpectatorSubmit" value="Change" type="button"><br>').appendTo("#SettingsDemoralizator"),$('<b title="default value: 10">SGDemoralizatorFakeUserIDCount: </b><input id="SGDemoralizatorFakeUserIDCountText" name="SGDemoralizatorFakeUserIDCountText" type="text" value="'+$.jStorage.get("SGDemoralizatorFakeUserIDCount",10)+'" autocomplete="off"><input id="SGDemoralizatorFakeUserIDCountSubmit" value="Change" type="button"><br>').appendTo("#SettingsDemoralizator"),$('<b title="default value: 2">SGDemoralizatorFakeCitizenshipID: </b><input id="SGDemoralizatorFakeCitizenshipIDText" name="SGDemoralizatorFakeCitizenshipIDText" type="text" value="'+$.jStorage.get("SGDemoralizatorFakeCitizenshipID",2)+'" autocomplete="off"><input id="SGDemoralizatorFakeCitizenshipIDSubmit" value="Change" type="button"><br>').appendTo("#SettingsDemoralizator"),$('<b title="default value: false">SGDemoralizatorMode: </b><input class="SGDemoralizatorModeRadio" type="radio" name="SGDemoralizatorMode" value="true" '+SGChecked($.jStorage.get("SGDemoralizatorMode",!1))+'> True <input class="SGDemoralizatorModeRadio" type="radio" name="SGDemoralizatorMode" value="false" '+SGChecked(!$.jStorage.get("SGDemoralizatorMode",!1))+">False<br>").appendTo("#SettingsDemoralizator"),$("#SGTimerSpectatorSubmit").click(function(){$.jStorage.set("SGTimerSpectator",$("#SGTimerSpectatorText").val())}),$("#SGFakeUserIDSubmit").click(function(){$.jStorage.set("SGFakeUserID",$("#SGFakeUserIDText").val())}),$("#SGFakeCitizenshipIDSubmit").click(function(){$.jStorage.set("SGFakeCitizenshipID",$("#SGFakeCitizenshipIDText").val())}),$(".SGSpectatorModeRadio").click(function(){"true"===$(this).val()?$.jStorage.set("SGSpectatorMode",!0):$.jStorage.set("SGSpectatorMode",!1)}),$(".SGMotivationModeRadio").click(function(){"true"===$(this).val()?$.jStorage.set("SGMotivationMode",!0):$.jStorage.set("SGMotivationMode",!1)}),$("#SGDemoralizatorTimerSpectatorSubmit").click(function(){$.jStorage.set("SGDemoralizatorTimerSpectator",$("#SGDemoralizatorTimerSpectatorText").val())}),$("#SGDemoralizatorFakeUserIDCountSubmit").click(function(){$.jStorage.set("SGDemoralizatorFakeUserIDCount",$("#SGDemoralizatorFakeUserIDCountText").val())}),$("#SGDemoralizatorFakeCitizenshipIDSubmit").click(function(){$.jStorage.set("SGDemoralizatorFakeCitizenshipID",$("#SGDemoralizatorFakeCitizenshipIDText").val())}),$(".SGDemoralizatorModeRadio").click(function(){"true"===$(this).val()?$.jStorage.set("SGDemoralizatorMode",!0):$.jStorage.set("SGDemoralizatorMode",!1)}),$('<p style="clear: both"></p><br>').appendTo(wrapperSettings)}if(localUrl.indexOf(URLShadowGovernment,0)>=0){var wrapperSG=$("#userMenu + script + div");wrapperSG.attr("id","WrapperMainConfig"),wrapperSG.empty(),$('<center><h1>Shadow Government Blank</h1></center><p style="clear: both"></p><br>').appendTo(wrapperSG)}if(localUrl.indexOf(URLBattle,0)>=0){var stringCSS=".fightsprite.critical1,.fightsprite.critical0,.fightsprite.critical2,.fightsprite.critical3,.fightsprite.normal1,.fightsprite.normal0,.fightsprite.normal2,.fightsprite.normal3,.fightsprite.miss,.fightsprite.toofast {\n display:none;\n}\n\n";if(stringCSS+=".fightsprite.critical1 + br,.fightsprite.critical0 + br,.fightsprite.critical2 + br,.fightsprite.critical3 + br,.fightsprite.normal1 + br,.fightsprite.normal0 + br,.fightsprite.normal2 + br,.fightsprite.normal3 + br,.fightsprite.miss + br,.fightsprite.toofast + br {\n display:none;\n}\n\n",style=document.createElement("style"),style.type="text/css",style.textContent=stringCSS,document.body.appendChild(style),style=void 0,window.picoModal=function(){return!0},$("#battleHeaderImage").remove(),$("#mainFight").css({"margin-top":"0px","margin-bottom":".4em"}),$("#mainFight .fightFont").removeClass("fightFont").addClass("fightFontSG"),$("#mainFight .fightFontSG").css({"text-shadow":"0 0 2px black"}),$("#battleStats").show(),$("#battleStats").append('<div class="foundation-style small-10 columns SpectatorsBattleStatsElements"><div class="foundation-style small-5 columns"><b>Total defenders online:</b><i id="totaldefenders" style="display: inline;">0</i> <a style="font-size: 11px; display: none;" href="" id="defendersLink">Show details</a> <a style="font-size: 11px;" href="" id="defendersLinkHide">Hide details</a> <br><div align="center" id="defendersMenu" style="font-size: 11px; text-align: center; padding: 1em; margin: auto; display: block;">No one <br> </div></div><div class="foundation-style small-5 columns"><b>Total attackers online:</b><i id="totalattackers" style="display: inline;">0</i> <a style="font-size: 11px; display: none;" href="" id="attackersLink">Show details</a> <a style="font-size: 11px; display: inline;" href="" id="attackersLinkHide">Hide details</a> <br><div align="center" id="attackersMenu" style="font-size: 11px; text-align: center; padding: 1em; margin: auto; display: block;">No one <br> </div></div>'),$("#battleStats").append('<div class="foundation-style small-10 columns SpectatorsBattleStatsElements"><b>Total spectators online:</b><i id="totalspectators" style="display: inline;">0</i> <a style="font-size: 11px; display: none;" href="" id="spectatorsLink">Show details</a> <a style="font-size: 11px;" href="" id="spectatorsLinkHide">Hide details</a> <br><div align="center" id="spectatorsMenu" style="font-size: 11px; text-align: center; padding: 1em; margin: auto; display: block;">No one <br> </div>  </div>'),$("#spectatorsLink").click(function(){return $("#spectatorsLink").fadeOut("fast",function(){$("#spectatorsLinkHide").fadeIn("fast"),$("#spectatorsMenu").fadeIn("fast")}),!1}),$("#spectatorsLinkHide").click(function(){return $("#spectatorsLinkHide").fadeOut("fast",function(){$("#spectatorsLink").fadeIn("fast"),$("#spectatorsMenu").fadeOut("fast")}),!1}),$("#attackersLink").click(function(){return $("#attackersLink").fadeOut("fast",function(){$("#attackersLinkHide").fadeIn("fast"),$("#attackersMenu").fadeIn("fast")}),!1}),$("#attackersLinkHide").click(function(){return $("#attackersLinkHide").fadeOut("fast",function(){$("#attackersLink").fadeIn("fast"),$("#attackersMenu").fadeOut("fast")}),!1}),$("#defendersLink").click(function(){return $("#defendersLink").fadeOut("fast",function(){$("#defendersLinkHide").fadeIn("fast"),$("#defendersMenu").fadeIn("fast")}),!1}),$("#defendersLinkHide").click(function(){return $("#defendersLinkHide").fadeOut("fast",function(){$("#defendersLink").fadeIn("fast"),$("#defendersMenu").fadeOut("fast")}),!1}),$("#battleSelectable:first + #battleSelectable div.small-10:first").remove(),$('<div id="wrapperBattleStatsButtons" class="foundation-style small-10 columns" style="margin-bottom:.4em;"></div>').insertBefore($("#battleSelectable:first + #battleSelectable div.small-4:first")),$('<div id="showTop3BattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Show Top 3 </div>').appendTo($("#wrapperBattleStatsButtons")),$('<div id="showTop10BattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Show Top 10 </div>').appendTo($("#wrapperBattleStatsButtons")),$('<div id="showRecentActionsBattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Recent Actions </div>').appendTo($("#wrapperBattleStatsButtons")),$('<div id="showSpectatorsBattleStats" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Spectators </div>').appendTo($("#wrapperBattleStatsButtons")),$("#wrapperBattleStatsButtons + div.small-4, #wrapperBattleStatsButtons + div.small-4 + div.small-2, #wrapperBattleStatsButtons + div.small-4 + div.small-2 + div.small-4").addClass("Top3BattleStatsElements"),$("#battleStats > div.small-10:first").addClass("Top10BattleStatsElements"),$(".Top10BattleStatsElements + div.small-10").addClass("RecentActionsBattleStatsElements"),$(".Top3BattleStatsElements").css("display",$.jStorage.get("SGTop3BattleStatsElements","none")),$("#showTop3BattleStats").click(function(){$(".Top3BattleStatsElements").toggle("fast",function(){$.jStorage.set("SGTop3BattleStatsElements",$(".Top3BattleStatsElements").css("display"))})}),$(".Top10BattleStatsElements").css("display",$.jStorage.get("SGTop10BattleStatsElements","none")),$("#showTop10BattleStats").click(function(){$(".Top10BattleStatsElements").toggle("fast",function(){$.jStorage.set("SGTop10BattleStatsElements",$(".Top10BattleStatsElements").css("display"))})}),$(".RecentActionsBattleStatsElements").css("display",$.jStorage.get("SGRecentActionsBattleStatsElements","none")),$("#showRecentActionsBattleStats").click(function(){$(".RecentActionsBattleStatsElements").toggle("fast",function(){$.jStorage.set("SGRecentActionsBattleStatsElements",$(".RecentActionsBattleStatsElements").css("display"))})}),$(".SpectatorsBattleStatsElements").css("display",$.jStorage.get("SGSpectatorsBattleStatsElements","none")),$("#showSpectatorsBattleStats").click(function(){$(".SpectatorsBattleStatsElements").toggle("fast",function(){$.jStorage.set("SGSpectatorsBattleStatsElements",$(".SpectatorsBattleStatsElements").css("display"))})}),$("#fightStatus").show().css({width:"initial"}).removeClass("testDivblue").addClass("fightContainer"),$("#fightResponse").hide().addClass("foundation-style small-10 columns"),$("#fightResponse > div").addClass("testDivblue"),$('<div id="wrapperStatusActionButtons" class="foundation-style small-10 columns" style="margin-bottom:.4em;"></div>').insertBefore($("#fightResponse")),$('<div id="SGShowStatusAction" style="padding-bottom:.4em;padding-top:.4em;margin:.4em .4em 0 .4em;" class="foundation-style button"> Show Status Action </div>').appendTo($("#wrapperStatusActionButtons")),$("#fightResponse").css("display",$.jStorage.get("SGShowStatusActionButton","none")),$("#SGShowStatusAction").click(function(){$("#fightResponse").toggle("fast",function(){$.jStorage.set("SGShowStatusActionButton",$("#fightResponse").css("display"))})}),$.jStorage.get("SGSpectatorMode",!0)){var SGTimerSpectator=$.jStorage.get("SGTimerSpectator",7e3),intervalID=window.setInterval(sendUpdateRequestSpectator,SGTimerSpectator);continueThread=!1}if($.jStorage.get("SGDemoralizatorMode",!1)){var SGDemoralizatorFakeUserIDCount=$.jStorage.get("SGDemoralizatorFakeUserIDCount",10),SGDemoralizatorFakeCitizenshipID=$.jStorage.get("SGDemoralizatorFakeCitizenshipID",2),SGDemoralizatorTimerSpectator=$.jStorage.get("SGDemoralizatorTimerSpectator",1e4);window.setInterval(FakeSpectators,SGDemoralizatorTimerSpectator)}}if(localUrl.indexOf(URLMotivation,0)>=0&&$.jStorage.get("SGMotivationMode",!0)){var CurrentDay=/\d+/gim.exec($("#userMenu div div.panel.callout b:eq(2)").html()),CurrentDay=parseInt(CurrentDay[0]),tmpMotivateCountToday={day:CurrentDay,count:0},MotivateCountToday=JSON.parse($.jStorage.get("SGMotivateCountToday",JSON.stringify(tmpMotivateCountToday)));MotivateCountToday.day!=tmpMotivateCountToday.day&&(MotivateCountToday=tmpMotivateCountToday,$.jStorage.set("SGMotivateCountToday",JSON.stringify(MotivateCountToday))),$(".dataTable ul.button.foundation-center.foundation-style-group li a.foundation-style.button.small.help i.icon-cupcake").parent().parent().toggle(),$('<span>Today motivate count: <b id="countMotivationToday">0</b><span>').insertAfter("#newCitizenStatsForm"),$("#countMotivationToday").html(MotivateCountToday.count),$("table.dataTable tr").each(function(){if($(this).children("td").children("i.icon-uniF478").length>0){var t=$(this).children("td:first").children(".profileLink").attr("href").replace("profile.html?id=","");1==$(this).children("td:eq(4)").children("i.icon-uniF478").length&&($(this).children("td:eq(4)").empty(),$(this).children("td:eq(4)").append('<i id="motivate-weapons-'+t+'" style="cursor: pointer; color: #000; font-size: 1.25em; text-shadow: 0 0 0" class="motivate-element motivate-weapons icon-tank" value="'+t+'"></i>')),1==$(this).children("td:eq(5)").children("i.icon-uniF478").length&&($(this).children("td:eq(5)").empty(),$(this).children("td:eq(5)").append('<i id="motivate-breads-'+t+'" style="cursor: pointer; color: #000; font-size: 1.25em; text-shadow: 0 0 0" class="motivate-element motivate-breads icon-bread" value="'+t+'"></i>')),1==$(this).children("td:eq(6)").children("i.icon-uniF478").length&&($(this).children("td:eq(6)").empty(),$(this).children("td:eq(6)").append('<i id="motivate-gifts-'+t+'" style="cursor: pointer; color: #000; font-size: 1.25em; text-shadow: 0 0 0" class="motivate-element motivate-gifts icon-gift" value="'+t+'"></i>'))}return!0}),$(".motivate-element").click(function(){var t=0;$(this).hasClass("motivate-weapons")?t=1:$(this).hasClass("motivate-breads")?t=2:$(this).hasClass("motivate-gifts")&&(t=3);var e=($(this).parent(),$(this).attr("value")),a="type="+t+"&id="+e;$.ajax({type:"POST",url:"motivateCitizen.html?id="+e,data:a,dataType:"json",error:motivateResponse})}),$(".motivate-element").hover(function(){$(this).css("color","#999")},function(){$(this).css("color","#000")})}}