Performance and integration

I've used your solution and changed some aspects regarding the performance and the integration. Herewith you could use it like in this [wiki articel](http://www.magentocommerce.com/wiki/5_-_modules_and_development/navigation/add_dropdown_list_of_manufactures_or_another_attribute) respectively in the usual way, as this also applies for the labels. Also, the extension is hereby limited to the catalog and thus better separated from other areas of Magento. For its usage in different templates see the following snippets:

```
/* @var $this Mage_Catalog_Block_Product_View */
$_product = $this->getProduct();
$_attribute = $_product->getResource()->getAttribute('color');

$_color = $_product->getColor();
$_image = $_attribute->getSource()->getOptionImage($_color);
$_thumbnail = $_attribute->getSource()->getOptionThumbnail($_color);
```

```
/* @var $this Mage_Catalog_Block_Product_View */
$_product = $this->getProduct();
$_attribute = $_product->getResource()->getAttribute('color');
$_options = $_attribute->getSource()->getAllOptions(false);

foreach ($_options as $_option) {
    echo $_option['image'];
    echo $_option['thumbnail'];
}
```

```
/* @var $this Mage_Catalog_Block_Layer_Filter */
foreach ($this->getItems() as $_item) {
    echo $_item->getImage();
    echo $_item->getThumbnail();
}
```

```
/* @var $this Mage_Catalog_Block_Product_View_Type_Configurable */
$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());

foreach ($_attributes as $_attribute) {
    $_options = $_attribute->getProductAttribute()->getSource()->getAllOptions(false);
    foreach ($_options as $_option) {
        echo $_option['image'];
        echo $_option['thumbnail'];
    }
}
```