function changeShopsList(id)
{
    var url = siteProtocol + '://' + siteHost + '/' + siteLanguage + '/shop/ajaxGetShopList';
    
    if(id > 0)
    {            
        $.get(url,
            {'cityId':id, 'structureId':structureId},
            function(data)
            {
                 loadShopsList(data);          
            }
        );
    }
}

function loadShopsList(data)
{
    $('#list').hide();
    $('#list').empty();
    $('#list').append(data);
    $('#list').show();
    
    initBlockHeight();
    findPopUps();
}

function initBlockHeight()
{
    var tmpMaxHeight = 0;
    $('#index #contacts-list dd').each(function(){
        var h = $(this).find('.contacts-info').height();
        if(tmpMaxHeight < h)
        {
            tmpMaxHeight = h;
        }
    });
    
    if(tmpMaxHeight > 0)
    {
        $("#index #contacts-list dd").css('height', tmpMaxHeight+"px");
    }
}

