{if $page == 'index' OR $page == 'product' OR $page == 'cart' OR $smarty.get.page_action == 'login' OR $smarty.get.page_action == 'order_info'}{assign var="show_index_boxes" value="false"}{/if}

<!--[if lt IE 9]><script type="text/javascript" src="{$smarty.const._SRV_WEB_TEMPLATES}{$smarty.const._STORE_TEMPLATE}/components/Respond/dest/respond.min.js"></script><![endif]-->

<div id="site-wrap" class="{$page}-wrap{if $page != 'index'} subpage-wrap{/if}{if $smarty.get.page_action} {$smarty.get.page_action}-action-wrap{/if}">
    {if !isset($smarty.get.viewport) || $smarty.get.viewport != 'modal'}

        {block name=index_jsDisabledWarning}
        <noscript>
            <div class="container">
                <div class="alert alert-danger text-center">
                    <p><i class="fa fa-3x fa-exclamation-triangle"></i></p>
                    {txt key=TEXT_JS_DISABLED_WARNING}
                </div>
            </div>
        </noscript>
        {/block}

        {block name=index_include_headerMain}
            {include file="includes/partials/header/header_main.html" type="tpl_include"}
        {/block}

        {block name=index_breadcrumb}
            {if $page != 'index' && $page != '404' && $page != 'checkout'}
                <div class="breadcrumb-container">
                    <div class="container">
                        {include file="xtCore/pages/navigation/breadcrumb.html" type="tpl_include"}
                    </div>
                </div>
            {/if}
        {/block}

		{hook key=pre_content_container}

		{if !isset($disable_content_container)}
        <div id="container" class="container">
            {hook key=container_top}

            {if $page == 'index'}
                {box name=teaser sliderid=1}
            {/if}

            <div id="content" class="row">
                <div class="col primary{if $show_index_boxes == 'true'} col-sm-8 col-sm-push-4 col-md-9 col-md-push-3{else} col-sm-12{/if}">
                    {if $page == 'index'}
                        {page name=xt_startpage_products type=user tpl_type='product_listing' tpl='product_listing_slider.html'}
                    {/if}
                    {$content}
                </div>
                {if $show_index_boxes == 'true'}
                    <div class="col secondary col-sm-4 col-sm-pull-8 col-md-3 col-md-pull-9">
                        {hook key=index_boxes_top}
                        {box_cache name=categories_recursive position=sidebar cache_id=sidebar}
                        {box name=xt_blog box_type=featured_messages limit=5}
                        {hook key=index_boxes_middle}
                        <div class="sidebar-products">
                            {hook key=sidebar_products_top}
                            {box name=xt_last_viewed_products type=user}
                            {box name=xt_bestseller_products type=user}
                            {box name=xt_special_products type=user order_by='p.products_id'}
                            {box name=xt_new_products type=user order_by='p.last_modified DESC'}
                            {box name=xt_upcoming_products type=user order_by='p.date_available'}
                            {hook key=sidebar_products_bottom}
                        </div>
                        {hook key=index_boxes_bottom}
                    </div>
                {/if}
            </div>
            {hook key=container_bottom}
        </div>
		{/if}

        {hook key=after_content_container}

        {block name=index_include_footerMain}
            {include file="includes/partials/footer/footer_main.html" type="tpl_include"}
        {/block}

        {block name=index_loginModal}
        <div id="loginModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="false">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            <span aria-hidden="true">&times;</span>
                            <span class="sr-only">Close</span>
                        </button>
                        <p class="h3 modal-title">{txt key=TEXT_LOGIN}</p>
                    </div>
                    <div class="modal-body">
                        {box name=loginbox}
                    </div>
                </div>
            </div>
        </div>
        {/block}

        {block name=index_backToTop}
        <a id="back-to-top" class="hidden hidden-xs" href="{$smarty.server.REQUEST_URI}#top">
            <i class="fa fa-3x fa-arrow-circle-o-up"></i>
            <span class="sr-only">Back to Top</span>
        </a>
        {/block}

    {else}
        {$content}
    {/if}
</div>
<div class="clearfix"></div>