DeletedUser
Guest
měla jsem v záloze i jiné téma, ale nechtěla jsem rušit u zrcadla
To já jedu bez antiviráku .. Sem tam projedu proti Mlawerům, ale nějak jsem se od toho odprostil .. Ono nelozím na žédné čínské po.r.no stránky a chodím jen na ty stejné, co mám ověřené a stahuju z placené stránky, kterou určitě znáš cz.. ale nebudu uvádět celou ..
$( function() { //pxcoordinations
var positionCount=0;
//counter for RP
var researchPoints=0;
//index of research in its table - from left to right
var indexOfResearch;
//temporary variable for saving coods of part of bckg
var tmp;
for(i=0;i<=40;i++){
$('.researches:eq('+i+' )').css({background: "url('https://wiki.sk.grepolis.com/images/a/a4/Researches_50x50_.png') -"+positionCount+"px -"+positionCount+"px"});
positionCount+=100;
}
$('.researches').click(function(){
if ($(this).attr("data-state")=="disabled"){
index=$(".researches").index(this);
tmp=50+index*100;
$(this).css({background: "url('https://wiki.sk.grepolis.com/images/a/a4/Researches_50x50_.png') -"+tmp+"px -"+tmp+"px"});
$(this).attr("data-state","enabled");
researchPoints=researchPoints+parseInt(($(this).attr("data-value")));
$('#count').html(researchPoints);
}else{
index=$(".researches").index(this);
tmp=index*100;
$(this).css({background: "url('https://wiki.sk.grepolis.com/images/a/a4/Researches_50x50_.png') -"+tmp+"px -"+tmp+"px"});
$(this).attr("data-state","disabled");
researchPoints=researchPoints-parseInt(($(this).attr("data-value")));
$('#count').html(researchPoints);
}
if(researchPoints>156){
$('#count').css({'color':'red', 'font-weight':'bold'});
}else{
$('#count').css({color:'#fc6', 'font-weight':'normal'});
}
});
$('#btn-restart').click(function(){
for(i=0;i<=40;i++){
if($('.researches:eq('+i+' )').attr("data-state")=="enabled"){
tmp=i*100;
$('.researches:eq('+i+' )').css({background: "url('https://wiki.sk.grepolis.com/images/a/a4/Researches_50x50_.png') -"+tmp+"px -"+tmp+"px"});
$('.researches:eq('+i+' )').attr("data-state","disabled");
researchPoints=0;
$('#count').css({color:'#fc6', 'font-weight':'normal'});
$('#count').html(researchPoints);
}
}
});
});