<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="head">    
            <!-- <action method="addJs" >
                <script>magentothem/ma.jq.slide.js</script>
            </action> -->
            <!-- <action method="addJs">
                <script>magentothem/ajax_cart_super.js</script>
            </action> -->
            <action method ="addJs">
              <script>magentothem/fancybox/jquery.fancybox.js</script>    
            </action>
           <!-- <action method ="addCss"><stylesheet>magentothem/fancybox/jquery.fancybox.css</stylesheet></action> -->
           <!-- <action method ="addCss"><stylesheet>magentothem/ajaxcartsuper/ajax_cart_super.css</stylesheet></action> -->
        </reference>
        <reference name ="header">
             <block type="checkout/cart_sidebar" as ="top_cart_mini" name="cart_sidebar_mini" template="magentothem/ajaxcartsuper/checkout/cart/topcart.phtml" before="-">
                <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
                <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
                    <label>Shopping Cart Sidebar Extra Actions</label>
                </block>
            </block>
        </reference>
        <reference name ="before_body_end">
            <block type="ajaxcartsuper/ajaxcartconfig" name="ajaxcartconfig" template="magentothem/ajaxcartsuper/ajaxcartconfig.phtml" />
        </reference>
      </default>
    <ajaxcartsuper_index_index>
        <reference name="content">
            <block type="ajaxcartsuper/ajaxcartsuper" name="ajaxcartsuper" template="magentothem/ajaxcartsuper/ajaxcartsuper.phtml" />
        </reference>
    </ajaxcartsuper_index_index>
   <!-- <catalog_product_view>
        <reference name="product.info">
            <action method="setTemplate">               
                <template>magentothem/ajaxcartsuper/catalog/product/view.phtml</template>
            </action>
        </reference>
    </catalog_product_view>
    
    <catalog_category_layered>
        <reference name="product_list">
            <action method="setTemplate">               
                <template>magentothem/ajaxcartsuper/catalog/product/list.phtml</template>
            </action>
        </reference>
    </catalog_category_layered>
    <catalog_category_default>
        <reference name="product_list">
            <action method="setTemplate">               
                <template>magentothem/ajaxcartsuper/catalog/product/list.phtml</template>
            </action>
        </reference>
    </catalog_category_default>-->
    <!--  <catalogsearch_result_index>
        <reference name="head">
            <action method="addJs">
                <script>magentothem/fancybox/jquery.fancybox.js</script>
            </action>
            <action method="addCss">
                <stylesheet>magentothem/fancybox/jquery.fancybox.css</stylesheet>
            </action>		
        </reference>
      <reference name = "search_result_list">
            <action method="setTemplate">               
                <template>magentothem/ajaxcartsuper/catalog/product/list.phtml</template>
            </action>
        </reference>
    </catalogsearch_result_index>-->
    <!--
Product quickview
-->

    <ajaxcartsuper_index_productview translate="label">
        <label>Catalog Product View (Any)</label>
        <!-- Mage_Catalog -->
        <reference name="root">
            <action method="setTemplate">
                <template>page/popup.phtml</template>
            </action>
        </reference>    
        <reference name="head">
            <action method="addJs">
                <script>varien/product.js</script>
            </action>
        </reference>
        <reference name="content">
            
            <block type="catalog/product_view" name="product.info" template="magentothem/ajaxcartsuper/ajaxcartsuper.phtml">
                <!--
                <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/summary.phtml</template></action>
                <action method="addReviewSummaryTemplate"><type>short</type><template>review/helper/summary_short.phtml</template></action>
                <action method="addReviewSummaryTemplate"><type>...</type><template>...</template></action>
                -->
                <block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml"/>
                <block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
                    <label>Alert Urls</label>
                </block>

                <action method="setTierPriceTemplate">
                    <template>catalog/product/view/tierprices.phtml</template>
                </action>

                <block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
                    <action method="setColumnCount">
                        <columns>4</columns>
                    </action>
                    <action method="setItemLimit">
                        <type>upsell</type>
                        <limit>4</limit>
                    </action>
                </block>

                <block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" />
                <block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
                    <action method="addToParentGroup">
                        <group>detailed_info</group>
                    </action>
                </block>
                <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
                    <action method="addToParentGroup">
                        <group>detailed_info</group>
                    </action>
                </block>
                <block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
                <block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>

                <block type="core/text_list" name="product.info.extrahint" as="extrahint" translate="label">
                    <label>Product View Extra Hint</label>
                </block>

                <block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
                    <label>Info Column Options Wrapper</label>
                    <block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
                    <block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
                        <action method="addOptionRenderer">
                            <type>text</type>
                            <block>catalog/product_view_options_type_text</block>
                            <template>catalog/product/view/options/type/text.phtml</template>
                        </action>
                        <action method="addOptionRenderer">
                            <type>file</type>
                            <block>catalog/product_view_options_type_file</block>
                            <template>catalog/product/view/options/type/file.phtml</template>
                        </action>
                        <action method="addOptionRenderer">
                            <type>select</type>
                            <block>catalog/product_view_options_type_select</block>
                            <template>catalog/product/view/options/type/select.phtml</template>
                        </action>
                        <action method="addOptionRenderer">
                            <type>date</type>
                            <block>catalog/product_view_options_type_date</block>
                            <template>catalog/product/view/options/type/date.phtml</template>
                        </action>
                    </block>
                    <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
                </block>
                <block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
                    <label>Bottom Block Options Wrapper</label>
                    <action method="insert">
                        <block>product.tierprices</block>
                    </action>
                    <block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
                    <action method="append">
                        <block>product.info.addtocart</block>
                    </action>
                    <action method="append">
                        <block>product.info.addto</block>
                    </action>
                </block>

                <block type="core/template_facade" name="product.info.container1" as="container1">
                    <action method="setDataByKey">
                        <key>alias_in_layout</key>
                        <value>container1</value>
                    </action>
                    <action method="setDataByKeyFromRegistry">
                        <key>options_container</key>
                        <key_in_registry>product</key_in_registry>
                    </action>
                    <action method="append">
                        <block>product.info.options.wrapper</block>
                    </action>
                    <action method="append">
                        <block>product.info.options.wrapper.bottom</block>
                    </action>
                </block>
                <block type="core/template_facade" name="product.info.container2" as="container2">
                    <action method="setDataByKey">
                        <key>alias_in_layout</key>
                        <value>container2</value>
                    </action>
                    <action method="setDataByKeyFromRegistry">
                        <key>options_container</key>
                        <key_in_registry>product</key_in_registry>
                    </action>
                    <action method="append">
                        <block>product.info.options.wrapper</block>
                    </action>
                    <action method="append">
                        <block>product.info.options.wrapper.bottom</block>
                    </action>
                </block>
                <action method="unsetCallChild">
                    <child>container1</child>
                    <call>ifEquals</call>
                    <if>0</if>
                    <key>alias_in_layout</key>
                    <key>options_container</key>
                </action>
                <action method="unsetCallChild">
                    <child>container2</child>
                    <call>ifEquals</call>
                    <if>0</if>
                    <key>alias_in_layout</key>
                    <key>options_container</key>
                </action>
            </block>
        </reference>
    </ajaxcartsuper_index_productview>
    <!--<checkout_cart_index>
        <reference name = "checkout.cart">
            <action method="setTemplate">               
                <template>magentothem/ajaxcartsuper/checkout/cart.phtml</template>
            </action>
        </reference>
    </checkout_cart_index>-->
    <ajaxcartsuper_index_cartdelete>

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>

        <reference name="content">
            <remove name="head"/>
            <remove name="footer"/>
            <remove name="left"/>
            <remove name="right"/>
            <remove name="before_body_end"/>

             <block type="ajaxcartsuper/cartdelete" name="ajaxcartsuper_checkout" template="magentothem/ajaxcartsuper/ajaxcart.phtml">
                <block type="checkout/cart_sidebar" name="cart_sidebar_ajax" as="cart_sidebar_ajax" template="checkout/cart/sidebar.phtml">
                    <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
                    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
                    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
                </block>
                
                <block type="checkout/cart" name="cart_content_ajax">
                    <action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
                    <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
                    <action method="chooseTemplate"/>
                    <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
                    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
                    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>

                    <block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
                        <label>Payment Methods Before Checkout Button</label>
                        <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
                    </block>

                    <block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
                        <label>Shopping Cart Form Before</label>
                    </block>

                    <block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
                        <label>Payment Methods After Checkout Button</label>
                        <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
                        <block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
                    </block>

                    <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
                    <block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
                    <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>

                    <block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
                </block>


            </block>
        </reference>

    </ajaxcartsuper_index_cartdelete>
</layout> 