{*		
		Impressive Themes
		http://www.impressivethemes.net
		-------------------------------
		
		Theme Functions for Control Theme by Impressive Themes
		------------------------------------------------------
		
		We would advise customers not to make any changes to the 
		file below. Configurable theme options can be found in the 
		file theme-options.tpl.
		
		Should you require any further help or assistance, please 
		contact customer support via our online support desk at:
		
		http://www.impressivethemes.net/support/contact
		
*}
{* 
	1. 	if itPrimarySidebar = enabled or if itSecondarySidebar = enabled, 
		work out whether or not there is a primary and/or secondary sidebar to display, 
		and whether or not the sidebar layout is needed
	-----------------------------------------------------------------------------------	
*}
		{if $itPrimarySidebar eq "enabled" || $itSecondarySidebar eq "enabled"}
{*		
		1.1 is there a primary sidebar to display?
		------------------------------------------
*}
			{if $itPrimarySidebar eq "enabled"}
				{if $primarySidebar->hasChildren()}
					{assign var=itShowSidebarPrimary value="yes" scope="global"}
				{/if}
			{/if}
{*		
		1.2 is there a secondary sidebar to display?
		--------------------------------------------
*}
			{if $itSecondarySidebar eq "enabled"}
				{if $secondarySidebar->hasChildren()}
					{assign var=itShowSidebarSecondary value="yes" scope="global"}
				{/if}
			{/if}
{*		
		1.3 should the sidebar layout be shown?
		---------------------------------------
*}
			{if !$inShoppingCart and ($itShowSidebarPrimary eq "yes" || $itShowSidebarSecondary eq "yes")}
				{assign var=itShowSidebarLayout value="yes" scope="global"}
			{/if}
		{/if}
{*		
		1.4 disable sidebar display for certain pages
		---------------------------------------------
*}	
		{if $templatefile eq "masspay"}
			{assign var=itShowSidebarLayout value="no" scope="global"}
		{/if}
{* 
	2. For specified pages, show featured-content section above main-body section 
	-----------------------------------------------------------------------------
*}
{* 
		2.1.	clientareahome.tpl  
		--------------------------
*}
		{if $templatefile eq "clientareahome"}
			{assign var=itFeaturedContent value="yes" scope="global"}
		{/if}
{* 
	3. Work out if the left side bar / main nav should be shown or not
	------------------------------------------------------
*}
{* 
		3.1.	should the left side bar / main nav be shown?
		-----------------------------------------------------
*}
		{if $loggedin}
			{assign var=itShowMainNav value="yes" scope="global"}
		{else}
			{if $itGuestNavDisplay eq "disabled"}
				{assign var=itShowMainNav value="no" scope="global"}
			{else}
				{assign var=itShowMainNav value="yes" scope="global"}
			{/if}
		{/if}
{*
		3.2.	how should the left side bar / main nav be displayed (full or mini)?
		----------------------------------------------------------------------------
*}
		{if $itShowMainNav eq "yes"}			
			{if $itMainNavDefaultState eq "mini"}
				{assign var=itMainNavState value="mini" scope="global"}
			{/if}
			{if $itMainNavSaveState neq "disabled"}
				{if $smarty.cookies.sidebarstate eq 'sidebar-mini'}
					{assign var=itMainNavState value="mini" scope="global"}	
				{elseif $smarty.cookies.sidebarstate eq 'sidebar-full'}
					{assign var=itMainNavState value="full" scope="global"}	
				{/if}
			{/if}
			{if $itMainNavAutoMiniCart eq "enabled"}
				{if $inShoppingCart}
					{assign var=itMainNavState value="mini" scope="global"}
				{/if}
			{/if}				
		{/if}
{* 
	4. Set RTL text direction, if appropriate
	-----------------------------------------
*}
	{if $itTextDirection eq "rtl"}
		{assign var=itTextDirectionRTL value="enabled" scope="global"}
	{elseif $itTextDirection eq "auto"}
		{if $LANG.locale eq "ar_AR" or $LANG.locale eq "he_IL" or $LANG.locale eq "fa_IR"} 
			{assign var=itTextDirectionRTL value="enabled" scope="global"}
		{else}
			{assign var=itTextDirectionRTL value="disabled" scope="global"}
		{/if}
	{else}
		{assign var=itTextDirectionRTL value="disabled" scope="global"}
	{/if}
{* 
	5. Content wrapper for addons / custom modules
	----------------------------------------------
*}
{* 
		5.1.	should the content wrapper be shown?
		-----------------------------------------------------
*}
		{if $smarty.get.modop eq "custom" && $modulename neq "licensing"}
			{assign var=itShowContentWrapper value="yes" scope="global"}
		{elseif $filename eq "index" and $smarty.get.m}
			{assign var=itShowContentWrapper value="yes" scope="global"}
		{elseif $templatefile eq "listavailabledomains" or $templatefile eq "listalldomains" or $templatefile eq "domainorder" or $templatefile eq "domaincategorysearch" or $templatefile eq "bulksearch"}
			{assign var=itShowContentWrapper value="yes" scope="global"}
		{else}
			{assign var=itShowContentWrapper value="no" scope="global"}
		{/if}
{*
	End of Theme Functions File
	---------------------------
*}