<div class="contain_top">
<?php 
 $allCats = Mage::getModel('catalog/category')->getCollection()
                ->addAttributeToSelect('*')
                ->addAttributeToFilter('is_active','1')
                ->addAttributeToFilter('include_in_menu','1')
                ->addAttributeToFilter('parent_id',array('eq' => '2'))
                ->addAttributeToSort('position', 'asc');
?>

<?php if (count($allCats) > 0): 
$iCount =0;
?>

<?php foreach($allCats as $_category): 
$iCount +=1;
?>
	
	<div class="padding_box fleft<?php if($iCount==5)echo " box-last"?>"> 
        		<div class="box">
        			<a href="<?php echo Mage::getBaseUrl().$_category->getUrlPath()?>"><img src="<?php echo $_category->getImageUrl()?>" /></a>
                	<div class="box_text"><?php echo $_category->getName() ?></div>
            	</div>
           	  <div class="box_shadow"><img src="<?php echo  Mage::getDesign()->getSkinUrl() ?>images/box_shadow.png" /></div>
           </div>
	<?php if($iCount==5) break;?>
	<?php endforeach; ?>

	<?php endif; ?>

      <div class="clear"></div>
        </div>