<layout version="0.1.0">
    <default>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
            <action method="addBodyClass"><class helper="argento_luxury/getStickyHeaderClass" /></action>
        </reference>
        <reference name="head">
            <action method="addJs"><script>tm/lib/webfontloader.js</script><params>defer</params></action>
            <action method="addItem"><type>skin_js</type><name>js/theme.js</name></action>
            <action method="addItem"><type>skin_css</type><name>css/icons.css</name></action>
            <action method="addItem"><type>skin_css</type><name>css/typography.css</name></action>
            <action method="addItem"><type>skin_css</type><name>css/theme.css</name></action>
            <!-- do not move argento.head to default.xml. It adds here so custom.css load after theme css -->
            <block type="argento/html_head" name="argento.head" template="argento/html/head.phtml"/>
        </reference>

        <reference name="left">
            <action method="append"><name>catalog.compare.sidebar</name></action>
            <action method="append"><name>right.reports.product.viewed</name></action>
        </reference>

        <reference name="right">
            <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
            <action method="unsetChild"><name>right.reports.product.viewed</name></action>
        </reference>

        <!-- <remove name="currency"/> --> <!-- can't remove because layered navigation is linked after it -->
        <remove name="left.newsletter"/>
        <remove name="footer.newsletter"/>
        <remove name="cart_sidebar"/>
        <remove name="sale.reorder.sidebar"/>
    </default>

    <catalog_category_default>
        <reference name="root">
            <action method="addBodyClass"><class helper="argento/hasCategoryImage" /></action>
        </reference>
    </catalog_category_default>

    <catalog_category_layered>
        <reference name="root">
            <action method="addBodyClass"><class helper="argento/hasCategoryImage" /></action>
        </reference>
    </catalog_category_layered>

    <catalog_product_view>
        <update handle="page_one_column"/>
    </catalog_product_view>

    <contacts_index_index>
        <update handle="page_one_column"/>
    </contacts_index_index>

    <customer_account>
        <reference name="left">
            <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
        </reference>
    </customer_account>

    <review_product_list>
        <update handle="page_one_column"/>
    </review_product_list>

    <review_product_view>
        <update handle="page_one_column"/>
    </review_product_view>

    <tag_list_index>
        <update handle="page_one_column"/>
    </tag_list_index>

    <!-- modules -->
    <askit_core>
        <update handle="page_one_column"/>
    </askit_core>

    <catalog_product_view>
        <reference name="head">
            <action method="addItem"><type>skin_js</type><name>js/product.js</name></action>
        </reference>
        <reference name="alert.urls">
            <action method="unsetChild">
                <name>email_to_friend</name>
            </action>
            <action method="unsetChild">
                <name>facebook_like_button</name>
            </action>
        </reference>
        <reference name="product.info.other">
            <action method="insert">
                <blockName>facebook_like_button</blockName>
            </action>
            <action method="insert">
                <blockName>email_to_friend</blockName>
                <siblingName>facebook_like_button</siblingName>
                <after>1</after>
            </action>
            <action method="insert">
                <blockName>product.info.tabs</blockName>
                <siblingName>-</siblingName>
                <after>0</after>
            </action>
        </reference>
        <reference name="product.info">
            <action method="unsetChild"><name>additional</name></action>
            <action method="unsetChild"><name>product_additional_data</name></action>
            <action method="unsetChild"><name>upsell_products</name></action>
        </reference>
        <reference name="product.info.additional">
            <action method="unsetChild"><name>product.info.tabs</name></action>
            <action method="insert">
                <blockName>product.info.upsell</blockName>
            </action>
        </reference>
        <reference name="product.info.tabs">
            <action method="setInitiallyCollapsed"><value>1</value></action>
        </reference>
        <reference name="before_footer_start">
            <block type="cms/block" name="additional_tabs" before="-">
                <action method="setBlockId"><id>product_page_additional_tabs</id></action>
            </block>
            <block type="core/template" name="before_footer_start_2" after="additional_tabs">
                <action method="setTemplate">
                    <template>page/html/before_footer_start.phtml</template>
                </action>
                <action method="setCssClass"><class>part-2</class></action>
                <action method="insert">
                    <blockName>product.info.additional</blockName>
                </action>
            </block>
        </reference>
    </catalog_product_view>

    <tm_ajaxpro_catalog_product_view>
        <reference name="product.info">
            <action method="unsetChild"><name>other</name></action>
        </reference>
        <reference name="product.info.options.wrapper.bottom">
            <action method="unsetChild"><name>review_summary</name></action>
            <action method="unsetChild"><name>product.info.addto</name></action>
        </reference>
    </tm_ajaxpro_catalog_product_view>

    <PRODUCT_TYPE_simple>
        <!-- show rating stars near price -->
        <reference name="alert.urls">
            <action method="unsetChild">
                <name>review_summary</name>
            </action>
        </reference>
        <reference name="product.info.simple.extra">
            <action method="insert">
                <blockName>review_summary</blockName>
            </action>
        </reference>
        <reference name="product.info">
            <action method="unsetChild">
                <name>addto</name>
            </action>
        </reference>
        <!-- move addto buttons near add to cart -->
        <reference name="product.info.extra_buttons">
            <action method="insert">
                <blockName>product.info.addto</blockName>
            </action>
        </reference>
    </PRODUCT_TYPE_simple>

    <PRODUCT_TYPE_configurable>
        <!-- show rating stars near price -->
        <reference name="alert.urls">
            <action method="unsetChild">
                <name>review_summary</name>
            </action>
        </reference>
        <reference name="product.info.options.wrapper.bottom">
            <action method="insert">
                <blockName>review_summary</blockName>
            </action>
        </reference>
        <!-- move addto buttons near add to cart - works for review_product_list -->
        <reference name="product.info.extra_buttons">
            <action method="insert">
                <blockName>product.info.addto</blockName>
            </action>
        </reference>
    </PRODUCT_TYPE_configurable>

    <PRODUCT_TYPE_bundle>
        <!-- show rating stars near price -->
        <reference name="alert.urls">
            <action method="unsetChild">
                <name>review_summary</name>
            </action>
        </reference>
        <reference name="product.info.options.wrapper.bottom">
            <action method="insert">
                <blockName>review_summary</blockName>
            </action>
        </reference>
    </PRODUCT_TYPE_bundle>

    <PRODUCT_TYPE_grouped>
        <reference name="product.info">
            <action method="unsetChild">
                <name>addto</name>
            </action>
        </reference>
        <reference name="product.info.extra_buttons">
            <action method="insert">
                <blockName>product.info.addto</blockName>
            </action>
        </reference>
    </PRODUCT_TYPE_grouped>

    <PRODUCT_TYPE_downloadable>
        <reference name="alert.urls">
            <action method="unsetChild">
                <name>review_summary</name>
            </action>
        </reference>
        <reference name="product.info.options.wrapper.bottom">
            <action method="insert">
                <blockName>review_summary</blockName>
            </action>
        </reference>
    </PRODUCT_TYPE_downloadable>

    <PRODUCT_TYPE_virtual>
        <reference name="alert.urls">
            <action method="unsetChild">
                <name>review_summary</name>
            </action>
        </reference>
        <reference name="product.info.virtual.extra">
            <action method="insert">
                <blockName>review_summary</blockName>
            </action>
        </reference>
        <reference name="product.info">
            <action method="unsetChild">
                <name>addto</name>
            </action>
        </reference>
        <!-- move addto buttons near add to cart -->
        <reference name="product.info.extra_buttons">
            <action method="insert">
                <blockName>product.info.addto</blockName>
            </action>
        </reference>
    </PRODUCT_TYPE_virtual>

    <review_product_list>
        <reference name="product.info">
            <action method="unsetChild">
                <name>addto</name>
            </action>
        </reference>
    </review_product_list>

    <checkout_cart_index>
        <reference name="checkout.cart.crosssell">
            <action method="setImgSize"><img_size>180</img_size></action>
        </reference>
    </checkout_cart_index>

    <tm_testimonials_index_new>
        <reference name="left">
            <action method="unsetChild">
                <name>right.reports.product.viewed</name>
            </action>
        </reference>
    </tm_testimonials_index_new>

    <default>
        <reference name="navigationpro.top">
            <action method="setConstraintEl"><constraint_el><![CDATA[$$('.header')[0]]]></constraint_el></action>
        </reference>
        <reference name="top.search">
            <action method="setFolded"><folded>1</folded></action>
        </reference>
    </default>

    <cms_index_index>
        <reference name="header">
            <action method="setShowHomeLogo"><show_home_logo>1</show_home_logo></action>
        </reference>
    </cms_index_index>
</layout>
