<div class="sm"><?php _e( 'Featured Members', 'ines') ?></div>
<div class="sl"></div>

<div class="belt">
<?php if ( bp_has_members('type=random&max=4') ) : ?>
<?php do_action( 'bp_before_directory_members_list' ) ?>
<?php while ( bp_members() ) : bp_the_member(); ?>

<div class="panel">
<a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar('type=full') ?></a>
<div class="lead">
<h4><a href="<?php bp_member_permalink() ?>"><?php bp_member_name() ?></a></h4>
</div>
</div>

<?php do_action( 'bp_directory_members_item' ) ?>
<?php endwhile; ?>
<?php do_action( 'bp_after_directory_members_list' ) ?>
<?php bp_member_hidden_fields() ?>
<?php else: ?>

<div class="panel">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon/8.png" alt="no members" />
<div class="lead"><?php _e( "Sorry, no members were found.", 'buddypress' ) ?></div>
</div>

<?php endif; ?>
</div>

<div class="postspace"></div>
<div class="sl"></div>

<div class="sm"><?php _e( 'Featured Groups', 'ines') ?></div>
<div class="sl"></div>

<div class="belt">
<?php if ( bp_has_groups('type=random&max=4') ) : ?>
<?php while ( bp_groups() ) : bp_the_group(); ?>

<div class="panel">
<a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=full' ) ?></a>
<div class="lead"><h4><a href="<?php bp_group_permalink() ?>"><?php bp_group_name() ?></a></h4></div>
</div>

<?php endwhile; ?>
<?php else: ?>

<div class="panel">

<img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon/8.png" alt="no members" />
<div class="lead"><?php _e( "Sorry, no groups were found.", 'buddypress' ) ?></div>
</div>

<?php endif; ?>

</div>