<div class="box hot_block catalog">
    <div class="h3 fint text-center"><?php echo tc('Best listings') ?></div>
    <div class="box-content">

        <div class="tab_header">
            <ul class="nav nav-tabs" id="hot_tabs_link">
                <?php
                $i = 0;
                foreach ($tabsData as $id => $data) {
                    if ($i == 0) {
                        echo '<li class="active"><a href="#Tab' . $id . '" class="slow"><span>' . $data['name'] . '</span></a></li>';
                    } else {
                        echo '<li><a href="#Tab' . $id . '" class="slow"><span>' . $data['name'] . '</span></a></li>';
                    }
                    $i++;
                }

                ?>
            </ul>
        </div>

        <div class="hot_block_content tab-content">
            <?php
            $i = 0;
            $p = 1;
            ?>
            <?php foreach ($tabsData as $key => $data) { ?>
                <div class="tab-pane row fade <?= ($i == 0) ? 'active in' : '' ?>" id="Tab<?php echo $key ?>">
                    <?php
                    $findIds = $countImagesArr = array();
                    foreach ($data['ads'] as $item) {
                        $findIds[] = $item->id;
                    }
                    $i++;
                    foreach ($data['ads'] as $item) {
                        Yii::app()->controller->renderPartial('/modules/apartments/views/widgetApartments_list_block_item', array('item' => $item));
                    }
                    ?>
                </div>
            <?php } ?>
            <div class="clear"></div>
        </div>

    </div>
</div>
