{*
 **********************************************************
 * Developed by: Team Theme Metro
 * Website: http://www.thememetro.com
 **********************************************************
*}

<!-- templates/croster/core/layouts/footers/layout-left.tpl -->
{if $templatefile eq "pagebuilder" or $templatefile eq "homepage"}{else}
					</div><!-- /.main-content -->
					{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren()) && $templatefile !== 'clientregister' || $templatefile == "affiliates"}
						<div class="col-xl-3 d-none d-xl-block">
							<div class="sidebar sidebar-primary{if $themesettings.clientarea.sidebars == "1"} default{/if}">
								{include file="$template/includes/sidebar.tpl" sidebar=$primarySidebar}
								{include file="$template/core/includes/sidebar-primary-custom.tpl" sidebar=$primarySidebar}
							</div>
							{if !$inShoppingCart && $secondarySidebar->hasChildren()}
								<div class="d-none d-lg-block sidebar sidebar-secondary{if $themesettings.clientarea.sidebars == "1"} default{/if}">
									{include file="$template/core/includes/sidebar-secondary-custom.tpl"}
									{include file="$template/includes/sidebar.tpl" sidebar=$secondarySidebar}
									{include file="$template/core/includes/sidebar-promo.tpl" sidebar=$secondarySidebar}
								</div>
							{/if}
						</div>
					{/if}
					{if !$inShoppingCart && $secondarySidebar->hasChildren()}
						{if $templatefile !== 'clientregister'}
						<div class="d-xl-none col-xl-3 mt-4 sidebar sidebar-secondary{if $themesettings.clientarea.sidebars == "1"} default{/if}">
							{include file="$template/core/includes/sidebar-secondary-custom.tpl"}
							{include file="$template/includes/sidebar.tpl" sidebar=$secondarySidebar}
							{include file="$template/core/includes/sidebar-promo.tpl" sidebar=$secondarySidebar}
						</div>
						{/if}
					{/if}
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
</section>
{/if}

<!--Footer-->
{include file="$template/core/includes/global-footer.tpl"}
<!--End Footer-->

<script>	
	{if $loggedin}
		{if $pagetitle eq $LANG.clientareatitle && ($smarty.get.action eq "changepw" || $smarty.get.action eq "contacts" || $smarty.get.action eq "emails" || $smarty.get.action eq "security" || $smarty.get.action eq "details" || $smarty.get.action eq "security") or $templatefile == "clientareahome"}
			$('#Secondary_Navbar-Account').addClass('open');
		{/if}
	{/if}
	
	{if $loggedin}
		{if $templatefile eq "configureproductdomain" || $templatefile eq "configureproduct" || $templatefile eq "viewcart" || $templatefile eq "checkout" || $templatefile eq "complete" || $templatefile eq "products" || $filename eq "cart" & $smarty.get.gid eq "addons" || $pagetitle eq $LANG.clientareatitle && ($smarty.get.action eq "products" || $smarty.get.action eq "productdetails" || $smarty.get.action eq "services" || $smarty.get.action eq "cancel" || $smarty.get.action eq "domains" || $smarty.get.action eq "domaindetails" || $templatefile eq "clientareahome")}
			$('#Primary_Navbar-Services').addClass('open');
		{/if}
	{/if}		
	{if $condlinks.domainreg || $condlinks.domaintrans}
		{if $templatefile eq "configuredomains" || $filename eq "cart" & $smarty.get.domain eq "register" || $filename eq "cart" & $smarty.get.domain eq "transfer" || $filename eq "cart" & $smarty.get.gid eq "renewals" || $pagetitle eq $LANG.clientareatitle && ($smarty.get.action eq "domains" || $smarty.get.action eq "domaindetails" || $smarty.get.action eq "domainaddons" || $smarty.get.action eq "domaincontacts" || $smarty.get.action eq "domainregisterns" || $smarty.get.action eq "domaingetepp")}		
			$('#Primary_Navbar-Domains').addClass('open');
		{/if}
	{/if}		
	{if $loggedin}
		{if $pagetitle eq $LANG.clientareatitle && ($smarty.get.action eq "invoices" || $smarty.get.action eq "addfunds" || $smarty.get.action eq "masspay" || $smarty.get.action eq "creditcard" || $smarty.get.action eq "quotes")}
			$('#Primary_Navbar-Billing').addClass('open');
		{/if}
		{if $templatefile eq "viewinvoice" || $templatefile eq "viewquote" || $filename eq "affiliates"}
			$('#Primary_Navbar-Billing').addClass('open');
		{/if}
	{/if}		
	{if $templatefile eq "downloads" || $templatefile eq "downloadscat" || $templatefile eq "downloaddenied" || $templatefile eq "announcements" || $templatefile eq "viewannouncement" || $templatefile eq "knowledgebase" || $templatefile eq "knowledgebasearticle" || $templatefile eq "knowledgebasecat" || $filename eq "submitticket" || $filename eq "supporttickets" || $filename eq "viewticket" || $filename eq "knowledgebase" || $filename eq "downloads" || $filename eq "serverstatus"}
		$('#Primary_Navbar-Support').addClass('open');
	{/if}		
	{if $condlinks.affiliates}
		{if $filename eq "affiliates"}
			$('#Primary_Navbar-Affiliates a').addClass('active');
		{/if}		
	{/if}		
	{if $loggedin}		
		{if $templatefile eq "managessl" || $skipMainBodyContainer}
			$('#Primary_Navbar-Website_Security').addClass('open');
		{/if}		
	{/if}
		
	{if $pagebuilder || $templatefile eq "managessl" || $skipMainBodyContainer}
		$('#Primary_Navbar-Services').addClass('open');
	{/if}
			
	{if $templatefile eq "homepage"}
		$('#Primary_Navbar-Services').addClass('open');	
	{/if}		
			

	{if $filename eq "affiliates"}
		$('#Primary_Navbar-Affiliates a').addClass('active');
	{/if}
		
	{if !$loggedin}
		{if $templatefile eq "announcements" || $templatefile eq "viewannouncement"}
			$('#Primary_Navbar-Announcements a').addClass('active');
		{/if}
		{if $templatefile eq "serverstatus"}
			$('#Primary_Navbar-Network_Status a').addClass('active');
		{/if}			
		{if $templatefile eq "knowledgebase" || $templatefile eq "knowledgebasearticle" || $templatefile eq "knowledgebasecat"}
			$('#Primary_Navbar-Knowledgebase a').addClass('active');
		{/if}
		{if $templatefile eq "contact"}
			$('#Primary_Navbar-Contact_Us a').addClass('active');
		{/if}
		{if $filename eq "submitticket"}
			$('#Primary_Navbar-Contact_Us a').addClass('active');
		{/if}
		{if $filename eq "cart" || $skipMainBodyContainer}
			$('#Primary_Navbar-Store').addClass('open');
		{/if}						
	{/if}	
</script>