Не удается получить равенство двух переменных при их сравнении if( sran == ravno)
Сравниваются значения переменных.Помогите найти ошибку
var sran = data.steamid.toString();
if($("div").is(".item_user_steam")){
//
if( sran == ravno){
var item = '<div style="background: transparent url("images/'+testbg+'.png") no-repeat scroll -18px -14px / cover ;" class="south" >';
item += '<img class="item" data-title="'+data.itemname+'" src="http://steamcommunity-a.akamaihd.net/economy/image/'+ data.image +'/50fx50f" alt="" title="" /><div class="price_main">'+data.cost+''+currency+'</div>';
item += '</div>';
$parent.find('.items:first').append(item);
var ravno = data.steamid;
}else{
var ravno = data.steamid.toString();
var block = '<div class="short item_user_steam">';
block += '<div class="top_main"><div class="avatar"><img src="'+data.ava+'" alt="" title="" /></div>';
block += '<div class="avatar_left"><ul>\
<li>'+data.user+'</li>\
<li>'+ravno+'</li>\
<li>'+sran+'</li>\
<li>внес <span id="tb_count_steam">'+getWordNormal(data.itemcounter,'вещь','вещи','вещей')+'</span></li>\
<li>на сумму <span id="total_item_price">'+data.money+' </span> <span>руб</span></li>\
<li class="bilet1"><b>Билеты от #'+ddk+' до #'+ntk+'</b> <li>\
<li class="main_percent"> <div class="percent">'+data.chance.toFixed(1)+'%</div></li>\
</ul></div></div>';
block += '<div class="items " >';
block += '<div style="background: transparent url("images/'+testbg+'.png") no-repeat scroll -18px -14px / cover ;" class="south" original-title="Название предмета">';
block += '<img class="item" data-title="'+data.itemname+'" src="http://steamcommunity-a.akamaihd.net/economy/image/'+ data.image +'/50fx50f" alt="" title="" /><div class="price_main" >'+data.cost+''+currency+'</div>';
block += '<div style="clear"></div></div>';
block += '</div>';
$parent.find('.item_user_steam:first').before(block);
}
}
else {
var ravno = data.steamid.toString();
var block = '<div class="short item_user_steam">';
block += '<div class="top_main"><div class="avatar"><img src="'+data.ava+'" alt="" title="" /></div>';
block += '<div class="avatar_left"><ul>\
<li>'+data.user+data.steamid+'</li>\
<li>внес <span id="tb_count_steam">'+getWordNormal(data.itemcounter,'вещь','вещи','вещей')+'</span></li>\
<li>на сумму <span id="total_item_price">'+data.money+data.steamid+' </span> <span>руб</span></li>\
<li class="bilet1"><b>Билеты от #'+ddk+' до #'+ntk+'</b> <li>\
<li class="main_percent"> <div class="percent">'+data.chance.toFixed(1)+'%</div></li>\
</ul></div></div>';
block += '<div class="items" >';
block += '<div style="background: transparent url("images/'+testbg+'.png") no-repeat scroll -18px -14px / cover ;" class="south" original-title="Название предмета">';
block += '<img class="item" data-title="'+data.itemname+'" src="http://steamcommunity-a.akamaihd.net/economy/image/'+ data.image +'/50fx50f" alt="" title="" /><div class="price_main" >'+data.cost+''+currency+'</div>';
block += '<div style="clear"></div></div>';
block += '</div>';
$parent.append(block);
};