<!doctype html>
<html class="no-js" lang="{$site->language}">
<head>
	<meta charset="{$site->charset}">
	<script type="text/javascript">var ua = navigator.userAgent; var meta = document.createElement('meta');if((ua.toLowerCase().indexOf("android") > -1 && ua.toLowerCase().indexOf("mobile")) || ((ua.match(/iPhone/i)) || (ua.match(/iPod/i)))){ meta.name = 'viewport';	meta.content = 'target-densitydpi=device-dpi, width=480'; }var m = document.getElementsByTagName('meta')[0]; m.parentNode.insertBefore(meta,m);</script>
	<title>{title}</title>
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<link rel="pingback" href="{$site->pingbackUrl}">

	{if $themeOptions->fonts->fancyFont->type == 'google'}
	<link href="http://fonts.googleapis.com/css?family={$themeOptions->fonts->fancyFont->font}" rel="stylesheet" type="text/css">
	{/if}

	<link id="ait-style" rel="stylesheet" type="text/css" media="all" href="{less}">
	{head}
	
	{if $post}
	<!-- facebook open graph -->
	<meta property="og:description" content="{$post->excerpt}" />
	<meta property="og:image" content="{$post->thumbnailSrc}" />
	{/if}
	  
  	<script src="http://maps.google.com/maps/api/js?v=3.2&amp;sensor=false"></script>

</head>
<body class="{bodyClasses $bodyClasses, ait-impression}" data-themeurl="{$themeUrl}">
<div class="mainpage">
	<!-- HEADER -->
        {if !empty($post)}
        {ifset $post->options('slider')->overrideGlobal}
            <div id="header" class="clearfix aa"  style="height: auto; background: {!$post->options('slider')->headerBgColor} url('{$post->options('slider')->headerBg}') {$post->options('slider')->headerBgRepeat} {$post->options('slider')->headerBgX} {$post->options('slider')->headerBgY};">
            {else}
            <div id="header" class="clearfix"  style="height: auto; background: {!$themeOptions->header->headerBgColor} url('{$themeOptions->header->headerBg}') {$themeOptions->header->headerBgRepeat} {$themeOptions->header->headerBgX} {$themeOptions->header->headerBgY};">
        {/ifset}
        {else}
        <div id="header" class="clearfix"  style="height: auto; background: {!$themeOptions->header->headerBgColor} url('{$themeOptions->header->headerBg}') {$themeOptions->header->headerBgRepeat} {$themeOptions->header->headerBgX} {$themeOptions->header->headerBgY};">
        {/if}
		<div class="header-inner clearfix">
			<div class="logo left">
				{if !empty($themeOptions->general->logo_img)}
				<a href="{$homeUrl}">
					<img src="{linkTo $themeOptions->general->logo_img}" alt="logo" />
				</a>
				{else}
				<a href="{$homeUrl}">
					<span>{$themeOptions->general->logo_text}</span>
				</a>
				{/if}
			</div>

			{if $themeOptions->socialIcons->displayIcons}
				{ifset $themeOptions->socialIcons->icons}
				<ul id="social-links" class="right clearfix">
					{foreach $themeOptions->socialIcons->icons as $icon}
					<li><a href="{if !empty($icon->link)}{$icon->link}{else}#{/if}"><img src="{$icon->iconUrl}" height="38" width="38" alt="{$icon->title}" title="{$icon->title}"></a></li>
					{/foreach}
				</ul>
				{/ifset}
			{/if}

			<p class="left info">{!$themeOptions->general->tagline}</p>

			<!-- WPML plugin required -->
			{if function_exists(icl_get_languages)}
			{if icl_get_languages('skip_missing=0')}
			<div class="flags">
				{foreach icl_get_languages('skip_missing=0') as $lang}
					<a href="{$lang['url']}" class="{if $lang['active'] == 1}active{/if}"><img src="{$lang['country_flag_url']}" alt="{$lang['translated_name']}" /></a>
				{/foreach}
			</div>
			{/if}
			{/if}
		</div>
		<div id="mainmenu-dropdown-duration" style="display: none;">{$themeOptions->general->mainmenu_dropdown_time}</div>
		<div id="mainmenu-dropdown-easing" style="display: none;">{$themeOptions->general->mainmenu_dropdown_animation}</div>
		{menu 'theme_location' => 'primary-menu', 'fallback_cb' => 'default_menu', 'container' => 'nav', 'container_class' => 'mainmenu', 'menu_class' => 'menu' }

	</div>
	{if !empty($post)}
	{block slider}
	<div class="slider-holder">
	  {include snippet-custom-home-slider.php,
			options => $themeOptions->header,
			slides => $site->create('slider-creator', $themeOptions->header->sliderType),
			nameGlob => $nameGlob,
			descGlob => $descGlob
		}
		{include snippet-custom-home-slider.php,
			options => $themeOptions->header,
			slides => $site->create('slider-creator', $themeOptions->header->sliderType2),
			nameGlob2 => $nameGlob2,
			descGlob2 => $descGlob2
		}
		{include snippet-custom-home-slider.php,
			options => $themeOptions->header,
			slides => $site->create('slider-creator', $themeOptions->header->sliderType3),
			nameGlob3 => $nameGlob3,
			descGlob3 => $descGlob3
		}
		{include snippet-custom-home-slider.php,
			options => $themeOptions->header,
			slides => $site->create('slider-creator', $themeOptions->header->sliderType4),
			nameGlob4 => $nameGlob4,
			descGlob4 => $descGlob4
		}
	</div>
	{/block}


	{/if}
	<div class="separator">
		<div class="slide-pattern-down"></div>
		<div class="hider"></div>
	</div>
	{define sectionA}
		{include #content}
	{/define}

	{define sectionB}
		{include snippet-custom-testimonials.php, show => $themeOptions->globals->showTestimonials, options => $themeOptions->testimonials}
	{/define}

	{if !isset($sectionsOrder)} {var $sectionsOrder = $themeOptions->globals->sectionsOrder} {/if}

	{foreach $sectionsOrder as $section}
		{include #$section}
	{/foreach}
	<!-- FOOTER -->
	{if is_object($post) && isset($post->options('footer')->disableFooterWidgetArea) }
	{else}
		<div class="widgets clear clearfix">
			<div class="widgets-inner clearfix">
				{dynamicSidebar footer-widgets-area}
			</div>
		</div>
	{/if}
	<div id="footer">
		<div class="footer-inner clearfix">
			<div class="left">
				{doShortcode $themeOptions->general->footer_text}
			</div>
			<div class="right clearfix">
			   {menu 'theme_location' => 'footer-menu','fallback_cb' => 'default_footer_menu', 'container' => 'nav', 'container_class' => 'footer-menu', 'menu_class' => 'menu clear', 'depth' => 1 }
			</div>
		</div>
	</div><!-- end of footer -->
</div><!-- end of mainpage -->

{ifset $themeOptions->general->displayThemebox}
	{include "$themeboxDir/ThemeBoxTemplate.php"}
{/ifset}

{if $themeOptions->fonts->fancyFont->type == 'cufon' or $themeOptions->general->displayThemebox}
	{cufon
		fonts,
		fancyFont,
		"$themeUrl/design/js/libs/cufon.js",
		THEME_FONTS_URL . "/{$themeOptions->fonts->fancyFont->file}",
		$themeOptions->fonts->fancyFont->font,
		$themeOptions->general->displayThemebox
	}
{/if}

{footer}

<script type="text/javascript">
{if isset($themeOptions->general->ga_code) && ($themeOptions->general->ga_code!="")}
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', {$themeOptions->general->ga_code}]);
	_gaq.push(['_trackPageview']);

	(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	})();
{/if}
	(function() {
		$('#sti-menu').iconmenu();
	});
</script>
<script type="text/javascript" src="{$themeJsUrl}/libs/cluster.js"></script>
</body>
</html>
