I needed to load a block using AJAX request on catalog/category page. There is no problem to pass the category ID of the current category, but how can i load category`s design?

During my research app/core/Mage/Catalog files I found a simple solution:

$category = Mage::getModel('catalog/category')->load($categoryId);
if ($category->getId() && $category->getCustomDesign()) {
    Mage::getModel('catalog/design')
        ->applyDesign($category, Mage_Catalog_Model_Design::APPLY_FOR_CATEGORY);
}

The main purpose of model catalog/design is to apply category`s or product`s design to current design. If you want to apply product`s design, you must use Mage_Catalog_Model_Design::APPLY_FOR_PRODUCT as the second parameter and Mage_Catalog_Model_Product object as the first one. For example:

$product = Mage::getModel('catalog/product')->load($productId);
if ($product->getId() && $product->getCustomDesign()) {
    Mage::getModel('catalog/design')
        ->applyDesign($product, Mage_Catalog_Model_Design::APPLY_FOR_PRODUCT);
}

I hope this will help somebody.