Category thumbnail image show in home page with name

Here get category thumbnail image in home page or any page with name. html is also used in this code. First get category level after use foreach loop print name, image etc. In last check if condition $count > 10 means total iamge 10. we can increase or decrease.

<div class="grid-container-spaced">
$_categories = Mage::getModel('catalog/category')->load(2)->getChildrenCategories();
   foreach ($_categories as $_category):
       if($_category->getName()=='Root Catalog' && $_category->getName()=='Default Category')
       $cat = Mage::getModel('catalog/category')->load($_category->getId());    ?>
           <div class="grid12-3 mobile-grid">
           echo '<a href="'.$cat->getUrl().'" title="'.$cat->getName().'"><img alt="'.$cat->getName().'" class="category-img" src="'.Mage::getBaseUrl('media').'catalog/category/'.$cat->getThumbnail().'"></a>';
           echo '<div class="category-name"><a title="'.$cat->getName().'" href="'.$cat->getUrl().'">'.$cat->getName()."</a></div>";
           echo '</div>';