A tabbed UI for child entries
I would go for two loops to make it easier to maintain sanity later on:

&lt;!-- Tabs --&gt;
{% set entries = craft.entries.section('country').level(3) %}
&lt;ul class="tabs"&gt;
   {% for entry in entries %}   
   &lt;li class="{% if loop.first %}active{% endif %}" rel="{{ loop.index }}"&gt;{{entry.pageTitle}}&lt;/li&gt;
   {% endif %}
&lt;/ul&gt;


&lt;!-- Tab_container --&gt;
&lt;div class="tab_container"&gt;
   {% for entry in entries %}  
   &lt;h3 class="{% if loop.first %}d_active{% endif %} tab_drawer_heading" rel="{{ loop.index }}"&gt;{{entry.pageTitle}}&lt;/h3&gt;
   &lt;div id="{{ loop.index }}" class="tab_content"&gt;
      {{entry.pageTitle}}
   &lt;/div&gt;
   {% endfor %}
&lt;/div&gt;