<?php

defined('_JEXEC') or die;

/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();

?>

<!doctype html>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->

<head>

<jdoc:include type="head" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template;?>/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/css/<?php echo $this->params->get('templateStyles'); ?>.css" type="text/css" />
<?php $stil = $_GET['style'];
if (isset($stil) && $stil != "1") { ?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/css/style<?php echo $stil; ?>.css" type="text/css" /> <?php } else { echo ""; } ?>

<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/suckerfish.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/css3-mediaqueries.js"></script>	

<!-- Parameters -->
<?php require("admin/params.php"); ?>

<!--Google Analytics Tracking Code --> 		
<?php if($analyticsCode) {echo '<script type="text/javascript">'; echo $analyticsCode; echo '</script>';}?>

</head>

<body>
	<div id="container"><a name="bktop"></a>

<div class="container" id="advertwrap">
	<div class="row">
		<?php if ($this->countModules('advert')) { ?><!--advert starts here-->
     		<div id="advert" class="twelvecol">
     			<jdoc:include type="modules" name="advert" style="xhtml" />
     		</div>
		<?php } ?><!--advert ends here --> 
	</div>
</div>

<?php if($this->countModules('topnav1') || $this->countModules('topnav2') || $showdate) : ?>
<div class="container" id="topnavwrap">
	<div class="row">
			<?php
				if ($this->countModules('topnav1') && $this->countModules('topnav2')) $topnav=1;
				if ($this->countModules('topnav2') && $showdate) $topnav=2;
				if ($this->countModules('topnav1') && $showdate) $topnav=3;
				if ($this->countModules('topnav1') && $this->countModules('topnav2') && $showdate) $topnav=4;
			?>

			<?php if($this->countModules('topnav1') || $this->countModules('topnav2') || $showdate) : ?>

		<div id="topnav" class="clearfix"><!--topnav starts here-->	

			<?php if (($showdate) !=0) : ?><!--showdate starts here-->
				<div id="showdate" class="<?php if ( $topnav == 2 ):echo ('fourcol'); elseif ( $topnav == 3 ):echo ('fourcol'); elseif ( $topnav == 4 ):echo ('fourcol'); else: echo ('twelvecol'); endif; ?> ">
     				<?php echo date('l, jS \of F Y'); ?>
				</div>
			<?php endif; ?><!--showdate ends here-->
			<?php if ($this->countModules('topnav1')): ?><!--topnav1 starts here-->
     			<div id="topnav1" class=" <?php if ( $topnav == 1 ):echo ('eightcol'); elseif ( $topnav == 3 ):echo ('eightcol last'); elseif ( $topnav == 4 ):echo ('fourcol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="topnav1" style="xhtml" />
     			</div>
			<?php endif; ?><!--topnav1 ends here-->
            <?php if ($this->countModules('topnav2')): ?><!--topnav2 starts here-->
				<div id="topnav2" class=" <?php if ( $topnav == 1 ):echo ('fourcol last'); elseif ( $topnav == 2 ):echo ('eightcol last'); elseif ( $topnav == 4 ):echo ('fourcol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="topnav2" style="xhtml" />
				</div> 
			<?php endif; ?><!--topnav2 ends here-->

		</div><!--topnav ends here-->

			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<div class="container">
	<div class="row">			
     	<div id="navbar" class="clearfix">
     		<a class="nav-mobile" href="#nav-mobile"><?php echo htmlspecialchars($mobileNavText);?></a>
     	</div>
	</div>
</div>

<div class="container">
	<div class="row">
		<div id="header" class="twelvecol"><!--header starts here-->	
				<div id="logo" class="threecol"><!--logo starts here-->				
					<?php if (($showDefaultLogo) !=0) : ?>				
						<a class="defaultLogo" href="<?php echo $this->baseurl; ?>/"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo/<?php echo htmlspecialchars($defaultLogo);?>" style="border:0;" alt="" /></a>
					<?php endif;?>
					<?php if (($showMediaLogo) !=0) : ?>				
						<a class="mediaLogo" href="<?php echo $this->baseurl; ?>/"><img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($mediaLogo);?>" style="border:0;" alt="" /></a>
					<?php endif;?>
					<?php if (($showTextLogo) !=0) : ?>				
						<a class="textLogo" href="<?php echo $this->baseurl; ?>/"><?php echo htmlspecialchars($textLogo);?></a>
					<?php endif;?>
					<?php if (($showSlogan) !=0) : ?>				
						<div class="slogan"><?php echo htmlspecialchars($slogan);?></div>
					<?php endif;?>
				</div><!--logo ends here --> 

			<?php if ($this->countModules('nav')) { ?><!--nav starts here-->
	     		<div id="nav" class="ninecol last">
	     			<jdoc:include type="modules" name="nav" style="xhtml" />
	     		</div>
			<?php } ?><!--nav ends here --> 
		</div><!--header ends here --> 
	</div>
</div>

<div class="container">
	<div class="row">
		<?php if ($this->countModules('topnav1-mobile')) { ?><!--topnav1-mobile starts here-->
     		<div id="topnav1-mobile" class="twelvecol">
     			<jdoc:include type="modules" name="topnav1-mobile" style="xhtml" />
     		</div>
		<?php } ?><!--topnav1-mobile ends here --> 
	</div>
</div>

<div class="container">
	<div class="row">
		<?php if ($this->countModules('topnav2-mobile')) { ?><!--topnav2-mobile starts here-->
     		<div id="topnav2-mobile" class="twelvecol">
     			<jdoc:include type="modules" name="topnav2-mobile" style="xhtml" />
     		</div>
		<?php } ?><!--topnav2-mobile ends here --> 
	</div>
</div>

<div class="container" id="introwrap">
	<div class="row">
		<?php if ($this->countModules('intro')) { ?><!--intro starts here-->
     		<div id="intro" class="twelvecol">
     			<jdoc:include type="modules" name="intro" style="xhtml" />
     		</div>
		<?php } ?><!--intro ends here --> 
	</div>
</div>

<?php if($this->countModules('slide1') || $this->countModules('slide2')) : ?>
<div class="container" id="slidewrap">
	<div class="row">
			<?php if ($this->countModules('slide1') && $this->countModules('slide2')) $slide=1; ?>
			<?php if($this->countModules('slide1') || $this->countModules('slide2')) : ?>

		<div id="slide" class="clearfix"><!--slide starts here-->
			
			<?php if ($this->countModules('slide1')): ?><!--slide1 starts here-->
     			<div id="slide1" class=" <?php if ( $slide == 1 ):echo ('eightcol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="slide1" style="xhtml" />
     			</div> <!--slide1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('slide2')): ?><!--slide2 starts here-->
				<div id="slide2" class=" <?php if ( $slide == 1 ):echo ('fourcol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="slide2" style="xhtml" />
				</div> <!--slide2 ends here-->
			<?php endif; ?>

		</div><!--slide ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<div class="container">
	<div class="row">
		<?php if ($this->countModules('breadcrumbs')) { ?><!--breadcrumbs starts here-->
     		<div id="breadcrumbs" class="twelvecol">
     			<jdoc:include type="modules" name="breadcrumbs" style="xhtml" />
     		</div>
		<?php } ?><!--breadcrumbs ends here --> 
	</div>
</div>

<?php if($this->countModules('promo1') || $this->countModules('promo2') || $this->countModules('promo3') || $this->countModules('promo4')) : ?>
<div class="container" id="promowrap">
	<div class="row">
			<?php
				if ($this->countModules('promo1') && $this->countModules('promo2') || $this->countModules('promo1') && $this->countModules('promo3') || $this->countModules('promo1') && $this->countModules('promo4') || $this->countModules('promo2') && $this->countModules('promo1') || $this->countModules('promo2') && $this->countModules('promo3') || $this->countModules('promo2') && $this->countModules('promo4') || $this->countModules('promo3') && $this->countModules('promo1') || $this->countModules('promo3') && $this->countModules('promo2') || $this->countModules('promo3') && $this->countModules('promo4') || $this->countModules('promo4') && $this->countModules('promo1') || $this->countModules('promo4') && $this->countModules('promo2') || $this->countModules('promo4') && $this->countModules('promo3') ) $promo=1;				
				if ($this->countModules('promo1') && $this->countModules('promo2') && $this->countModules('promo3') || $this->countModules('promo1') && $this->countModules('promo2') && $this->countModules('promo4') || $this->countModules('promo1') && $this->countModules('promo3') && $this->countModules('promo4') || $this->countModules('promo2') && $this->countModules('promo3') && $this->countModules('promo4')) $promo=2;

				if ($this->countModules('promo1') && $this->countModules('promo2') && $this->countModules('promo3') && $this->countModules('promo4')) $promo=3;
			?>

			<?php if($this->countModules('promo1') || $this->countModules('promo2') || $this->countModules('promo3') || $this->countModules('promo4')) : ?>

		<div id="promo" class="clearfix"><!--promo starts here-->			
			<?php if ($this->countModules('promo1')): ?><!--promo1 starts here-->
     			<div id="promo1" class=" <?php if ( $promo == 1 ):echo ('sixcol'); elseif ( $promo == 2 ):echo ('fourcol'); elseif ( $promo == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="promo1" style="xhtml" />
     			</div> <!--promo1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('promo2')): ?><!--promo2 starts here-->
				<div id="promo2" class=" <?php if ( $promo == 1 && $this->countModules('promo3') || $promo == 1 && $this->countModules('promo4') ):echo ('sixcol'); elseif ( $promo == 1): echo ('sixcol last'); elseif ( $promo == 2 ):echo ('fourcol'); elseif ( $promo == 3 ):echo ('threecol');else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="promo2" style="xhtml" />
				</div> <!--promo2 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('promo3')): ?><!--promo3 starts here-->
				<div id="promo3" class=" <?php if ( $promo == 1 && $this->countModules('promo4')):echo ('sixcol'); elseif ( $promo == 1):echo ('sixcol last'); elseif ( $promo == 2 && $this->countModules('promo4')):echo ('fourcol'); elseif ($promo == 2): echo ('fourcol last'); elseif ( $promo == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="promo3" style="xhtml" />
				</div> <!--promo3 ends here-->
			<?php endif; ?>
			<?php if ($this->countModules('promo4')): ?><!--promo4 starts here-->
				<div id="promo4" class=" <?php if ( $promo == 1 ):echo ('sixcol last'); elseif ( $promo == 2 ):echo ('fourcol last'); elseif ( $promo == 3 ):echo ('threecol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="promo4" style="xhtml" />
				</div> <!--promo4 ends here-->
			<?php endif; ?>
		</div><!--promo ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<?php if($this->countModules('showcase1') || $this->countModules('showcase2') || $this->countModules('showcase3') || $this->countModules('showcase4')) : ?>
<div class="container" id="showcasewrap">
	<div class="row">
			<?php
				if ($this->countModules('showcase1') && $this->countModules('showcase2') || $this->countModules('showcase1') && $this->countModules('showcase3') || $this->countModules('showcase1') && $this->countModules('showcase4') || $this->countModules('showcase2') && $this->countModules('showcase1') || $this->countModules('showcase2') && $this->countModules('showcase3') || $this->countModules('showcase2') && $this->countModules('showcase4') || $this->countModules('showcase3') && $this->countModules('showcase1') || $this->countModules('showcase3') && $this->countModules('showcase2') || $this->countModules('showcase3') && $this->countModules('showcase4') || $this->countModules('showcase4') && $this->countModules('showcase1') || $this->countModules('showcase4') && $this->countModules('showcase2') || $this->countModules('showcase4') && $this->countModules('showcase3') ) $showcase=1;				
				if ($this->countModules('showcase1') && $this->countModules('showcase2') && $this->countModules('showcase3') || $this->countModules('showcase1') && $this->countModules('showcase2') && $this->countModules('showcase4') || $this->countModules('showcase1') && $this->countModules('showcase3') && $this->countModules('showcase4') || $this->countModules('showcase2') && $this->countModules('showcase3') && $this->countModules('showcase4')) $showcase=2;

				if ($this->countModules('showcase1') && $this->countModules('showcase2') && $this->countModules('showcase3') && $this->countModules('showcase4')) $showcase=3;
			?>

			<?php if($this->countModules('showcase1') || $this->countModules('showcase2') || $this->countModules('showcase3') || $this->countModules('showcase4')) : ?>

		<div id="showcase" class="clearfix"><!--showcase starts here-->			
			<?php if ($this->countModules('showcase1')): ?><!--showcase1 starts here-->
     			<div id="showcase1" class=" <?php if ( $showcase == 1 ):echo ('sixcol'); elseif ( $showcase == 2 ):echo ('fourcol'); elseif ( $showcase == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="showcase1" style="xhtml" />
     			</div> <!--showcase1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('showcase2')): ?><!--showcase2 starts here-->
				<div id="showcase2" class=" <?php if ( $showcase == 1 && $this->countModules('showcase3') || $showcase == 1 && $this->countModules('showcase4') ):echo ('sixcol'); elseif ( $showcase == 1): echo ('sixcol last'); elseif ( $showcase == 2 ):echo ('fourcol'); elseif ( $showcase == 3 ):echo ('threecol');else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="showcase2" style="xhtml" />
				</div> <!--showcase2 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('showcase3')): ?><!--showcase3 starts here-->
				<div id="showcase3" class=" <?php if ( $showcase == 1 && $this->countModules('showcase4')):echo ('sixcol'); elseif ( $showcase == 1):echo ('sixcol last'); elseif ( $showcase == 2 && $this->countModules('showcase4')):echo ('fourcol'); elseif ($showcase == 2): echo ('fourcol last'); elseif ( $showcase == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="showcase3" style="xhtml" />
				</div> <!--showcase3 ends here-->
			<?php endif; ?>
			<?php if ($this->countModules('showcase4')): ?><!--showcase4 starts here-->
				<div id="showcase4" class=" <?php if ( $showcase == 1 ):echo ('sixcol last'); elseif ( $showcase == 2 ):echo ('fourcol last'); elseif ( $showcase == 3 ):echo ('threecol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="showcase4" style="xhtml" />
				</div> <!--showcase4 ends here-->
			<?php endif; ?>
		</div><!--showcase ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<?php if($this->countModules('top1') || $this->countModules('top2') || $this->countModules('top3') || $this->countModules('top4')) : ?>
<div class="container" id="topwrap">
	<div class="row">
			<?php
				if ($this->countModules('top1') && $this->countModules('top2') || $this->countModules('top1') && $this->countModules('top3') || $this->countModules('top1') && $this->countModules('top4') || $this->countModules('top2') && $this->countModules('top1') || $this->countModules('top2') && $this->countModules('top3') || $this->countModules('top2') && $this->countModules('top4') || $this->countModules('top3') && $this->countModules('top1') || $this->countModules('top3') && $this->countModules('top2') || $this->countModules('top3') && $this->countModules('top4') || $this->countModules('top4') && $this->countModules('top1') || $this->countModules('top4') && $this->countModules('top2') || $this->countModules('top4') && $this->countModules('top3') ) $top=1;				
				if ($this->countModules('top1') && $this->countModules('top2') && $this->countModules('top3') || $this->countModules('top1') && $this->countModules('top2') && $this->countModules('top4') || $this->countModules('top1') && $this->countModules('top3') && $this->countModules('top4') || $this->countModules('top2') && $this->countModules('top3') && $this->countModules('top4')) $top=2;

				if ($this->countModules('top1') && $this->countModules('top2') && $this->countModules('top3') && $this->countModules('top4')) $top=3;
			?>

			<?php if($this->countModules('top1') || $this->countModules('top2') || $this->countModules('top3') || $this->countModules('top4')) : ?>

		<div id="top" class="twelvecol clearfix"><!--top starts here-->			
			<?php if ($this->countModules('top1')): ?><!--top1 starts here-->
     			<div id="top1" class=" <?php if ( $top == 1 ):echo ('sixcol'); elseif ( $top == 2 ):echo ('fourcol'); elseif ( $top == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="top1" style="xhtml" />
     			</div> <!--top1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('top2')): ?><!--top2 starts here-->
				<div id="top2" class=" <?php if ( $top == 1 && $this->countModules('top3') || $top == 1 && $this->countModules('top4') ):echo ('sixcol'); elseif ( $top == 1): echo ('sixcol last'); elseif ( $top == 2 ):echo ('fourcol'); elseif ( $top == 3 ):echo ('threecol');else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="top2" style="xhtml" />
				</div> <!--top2 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('top3')): ?><!--top3 starts here-->
				<div id="top3" class=" <?php if ( $top == 1 && $this->countModules('top4')):echo ('sixcol'); elseif ( $top == 1):echo ('sixcol last'); elseif ( $top == 2 && $this->countModules('top4')):echo ('fourcol'); elseif ($top == 2): echo ('fourcol last'); elseif ( $top == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="top3" style="xhtml" />
				</div> <!--top3 ends here-->
			<?php endif; ?>
			<?php if ($this->countModules('top4')): ?><!--top4 starts here-->
				<div id="top4" class=" <?php if ( $top == 1 ):echo ('sixcol last'); elseif ( $top == 2 ):echo ('fourcol last'); elseif ( $top == 3 ):echo ('threecol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="top4" style="xhtml" />
				</div> <!--top4 ends here-->
			<?php endif; ?>
		</div><!--top ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<?php if($this->countModules('maintop1') || $this->countModules('maintop2') || $this->countModules('maintop3')) : ?>
<div class="container" id="maintopwrap">
	<div class="row">
			<?php
				if ($this->countModules('maintop1') && $this->countModules('maintop2')) $maintop=1;
				if ($this->countModules('maintop2') && $this->countModules('maintop3')) $maintop=2;
				if ($this->countModules('maintop1') && $this->countModules('maintop3')) $maintop=3;
				if ($this->countModules('maintop1') && $this->countModules('maintop2') && $this->countModules('maintop3')) $maintop=4;
			?>

			<?php if($this->countModules('maintop1') || $this->countModules('maintop2') || $this->countModules('maintop3')) : ?>

		<div id="maintop" class="clearfix"><!--maintop1 starts here-->			
			<?php if ($this->countModules('maintop1')): ?><!--maintop1 starts here-->
     			<div id="maintop1" class=" <?php if ( $maintop == 1 ):echo ('threecol'); elseif ( $maintop == 3 ):echo ('threecol'); elseif ( $maintop == 4 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="maintop1" style="xhtml" />
     			</div> <!--maintop1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('maintop2')): ?><!--maintop2 starts here-->
				<div id="maintop2" class=" <?php if ( $maintop == 1 ):echo ('ninecol last'); elseif ( $maintop == 2 ):echo ('ninecol'); elseif ( $maintop == 4 ):echo ('sixcol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="maintop2" style="xhtml" />
				</div> <!--maintop2 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('maintop3')): ?><!--maintop3 starts here-->
				<div id="maintop3" class=" <?php if ( $maintop == 2 ):echo ('threecol last'); elseif ( $maintop == 3 ):echo ('ninecol last'); elseif ( $maintop == 4 ):echo ('threecol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="maintop3" style="xhtml" />
				</div> <!--maintop3 ends here-->
			 <?php endif; ?>
		</div><!--maintop ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<div class="container">
	<div class="row">
		<div id="message" class="twelvecol"><!--message starts here-->
			<jdoc:include type="message" />
		</div><!--message ends here-->
	</div>
</div>

<div class="container" id="mainwrap">
	<div class="row">			
		<div id="main" class="clearfix"><!--main starts here-->
			
		<?php if ($this->countModules('sidebar1') && $this->countModules('sidebar2')): ?>
				<div id="sidebar1" class=" threecol"><!--sidebar1 starts here-->
     				<jdoc:include type="modules" name="sidebar1" style="xhtml" />
     			</div> <!--sidebar1 ends here-->
				<div id="maincontent" class="sixcol"><!--maincontent starts here-->
					<jdoc:include type="component" />  
				</div><!--maincontent ends here-->
				<div id="sidebar2" class=" threecol last"><!--sidebar2 starts here-->
     				<jdoc:include type="modules" name="sidebar2" style="xhtml" />
     			</div> <!--sidebar2 ends here-->
			<?php elseif ( $this->countModules('sidebar1')) : ?>
				<div id="sidebar1" class=" threecol"><!--sidebar1 starts here-->
     				<jdoc:include type="modules" name="sidebar1" style="xhtml" />
     			</div> <!--sidebar1 ends here-->	
				<div id="maincontent" class="ninecol last"><!--maincontent starts here-->
					<jdoc:include type="component" />  
				</div><!--maincontent ends here-->
			<?php elseif ( $this->countModules('sidebar2')): ?>
				<div id="maincontent" class="ninecol"><!--maincontent starts here-->
					<jdoc:include type="component" />  
				</div><!--maincontent ends here-->
				<div id="sidebar2" class=" threecol last"><!--sidebar2 starts here-->
     				<jdoc:include type="modules" name="sidebar2" style="xhtml" />
     			</div> <!--sidebar2 ends here-->			
			<?php else : ?>
				<div id="maincontent" class="twelvecol"><!--maincontent starts here-->
					<jdoc:include type="component" />
				</div><!--maincontent ends here-->
		<?php endif; ?>

		</div><!--main ends here-->
	</div>
</div>

<?php if($this->countModules('mainbottom1') || $this->countModules('mainbottom2') || $this->countModules('mainbottom3')) : ?>
<div class="container" id="mainbottomwrap">
	<div class="row">
			<?php
				if ($this->countModules('mainbottom1') && $this->countModules('mainbottom2')) $mainbottom=1;
				if ($this->countModules('mainbottom2') && $this->countModules('mainbottom3')) $mainbottom=2;
				if ($this->countModules('mainbottom1') && $this->countModules('mainbottom3')) $mainbottom=3;
				if ($this->countModules('mainbottom1') && $this->countModules('mainbottom2') && $this->countModules('mainbottom3')) $mainbottom=4;
			?>

			<?php if($this->countModules('mainbottom1') || $this->countModules('mainbottom2') || $this->countModules('mainbottom3')) : ?>

		<div id="mainbottom" class="clearfix"><!--mainbottom starts here-->			
			<?php if ($this->countModules('mainbottom1')): ?><!--mainbottom1 starts here-->
     			<div id="mainbottom1" class=" <?php if ( $mainbottom == 1 ):echo ('threecol'); elseif ( $mainbottom == 3 ):echo ('threecol'); elseif ( $mainbottom == 4 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="mainbottom1" style="xhtml" />
     			</div> <!--mainbottom1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('mainbottom2')): ?><!--mainbottom2 starts here-->
				<div id="mainbottom2" class=" <?php if ( $mainbottom == 1 ):echo ('ninecol last'); elseif ( $mainbottom == 2 ):echo ('ninecol'); elseif ( $mainbottom == 4 ):echo ('sixcol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="mainbottom2" style="xhtml" />
				</div> <!--mainbottom2 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('mainbottom3')): ?><!--mainbottom3 starts here-->
				<div id="mainbottom3" class=" <?php if ( $mainbottom == 2 ):echo ('threecol last'); elseif ( $mainbottom == 3 ):echo ('ninecol last'); elseif ( $mainbottom == 4 ):echo ('threecol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="mainbottom3" style="xhtml" />
				</div> <!--mainbottom3 ends here-->
			 <?php endif; ?>
		</div><!--mainbottom ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<?php if($this->countModules('bottom1') || $this->countModules('bottom2') || $this->countModules('bottom3') || $this->countModules('bottom4')) : ?>
<div class="container" id="bottomwrap">
	<div class="row">
			<?php
				if ($this->countModules('bottom1') && $this->countModules('bottom2') || $this->countModules('bottom1') && $this->countModules('bottom3') || $this->countModules('bottom1') && $this->countModules('bottom4') || $this->countModules('bottom2') && $this->countModules('bottom1') || $this->countModules('bottom2') && $this->countModules('bottom3') || $this->countModules('bottom2') && $this->countModules('bottom4') || $this->countModules('bottom3') && $this->countModules('bottom1') || $this->countModules('bottom3') && $this->countModules('bottom2') || $this->countModules('bottom3') && $this->countModules('bottom4') || $this->countModules('bottom4') && $this->countModules('bottom1') || $this->countModules('bottom4') && $this->countModules('bottom2') || $this->countModules('bottom4') && $this->countModules('bottom3') ) $bottom=1;				
				if ($this->countModules('bottom1') && $this->countModules('bottom2') && $this->countModules('bottom3') || $this->countModules('bottom1') && $this->countModules('bottom2') && $this->countModules('bottom4') || $this->countModules('bottom1') && $this->countModules('bottom3') && $this->countModules('bottom4') || $this->countModules('bottom2') && $this->countModules('bottom3') && $this->countModules('bottom4')) $bottom=2;

				if ($this->countModules('bottom1') && $this->countModules('bottom2') && $this->countModules('bottom3') && $this->countModules('bottom4')) $bottom=3;
			?>

			<?php if($this->countModules('bottom1') || $this->countModules('bottom2') || $this->countModules('bottom3') || $this->countModules('bottom4')) : ?>

		<div id="bottom" class="clearfix"><!--bottom starts here-->			
			<?php if ($this->countModules('bottom1')): ?><!--bottom1 starts here-->
     			<div id="bottom1" class=" <?php if ( $bottom == 1 ):echo ('sixcol'); elseif ( $bottom == 2 ):echo ('fourcol'); elseif ( $bottom == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="bottom1" style="xhtml" />
     			</div> <!--bottom1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('bottom2')): ?><!--bottom2 starts here-->
				<div id="bottom2" class=" <?php if ( $bottom == 1 && $this->countModules('bottom3') || $bottom == 1 && $this->countModules('bottom4') ):echo ('sixcol'); elseif ( $bottom == 1): echo ('sixcol last'); elseif ( $bottom == 2 ):echo ('fourcol'); elseif ( $bottom == 3 ):echo ('threecol');else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="bottom2" style="xhtml" />
				</div> <!--bottom2 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('bottom3')): ?><!--bottom3 starts here-->
				<div id="bottom3" class=" <?php if ( $bottom == 1 && $this->countModules('bottom4')):echo ('sixcol'); elseif ( $bottom == 1):echo ('sixcol last'); elseif ( $bottom == 2 && $this->countModules('bottom4')):echo ('fourcol'); elseif ($bottom == 2): echo ('fourcol last'); elseif ( $bottom == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="bottom3" style="xhtml" />
				</div> <!--bottom3 ends here-->
			<?php endif; ?>
			<?php if ($this->countModules('bottom4')): ?><!--bottom4 starts here-->
				<div id="bottom4" class=" <?php if ( $bottom == 1 ):echo ('sixcol last'); elseif ( $bottom == 2 ):echo ('fourcol last'); elseif ( $bottom == 3 ):echo ('threecol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="bottom4" style="xhtml" />
				</div> <!--bottom4 ends here-->
			<?php endif; ?>
		</div><!--bottom ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<?php if($this->countModules('footer1') || $this->countModules('footer2') || $this->countModules('footer3') || $this->countModules('footer4')) : ?>
<div class="container" id="footerwrap">
	<div class="row">
			<?php
				if ($this->countModules('footer1') && $this->countModules('footer2') || $this->countModules('footer1') && $this->countModules('footer3') || $this->countModules('footer1') && $this->countModules('footer4') || $this->countModules('footer2') && $this->countModules('footer1') || $this->countModules('footer2') && $this->countModules('footer3') || $this->countModules('footer2') && $this->countModules('footer4') || $this->countModules('footer3') && $this->countModules('footer1') || $this->countModules('footer3') && $this->countModules('footer2') || $this->countModules('footer3') && $this->countModules('footer4') || $this->countModules('footer4') && $this->countModules('footer1') || $this->countModules('footer4') && $this->countModules('footer2') || $this->countModules('footer4') && $this->countModules('footer3') ) $footer=1;	
				if ($this->countModules('footer1') && $this->countModules('footer2') && $this->countModules('footer3') || $this->countModules('footer1') && $this->countModules('footer2') && $this->countModules('footer4') || $this->countModules('footer1') && $this->countModules('footer3') && $this->countModules('footer4') || $this->countModules('footer2') && $this->countModules('footer3') && $this->countModules('footer4')) $footer=2;
				if ($this->countModules('footer1') && $this->countModules('footer2') && $this->countModules('footer3') && $this->countModules('footer4')) $footer=3;
			?>

			<?php if($this->countModules('footer1') || $this->countModules('footer2') || $this->countModules('footer3') || $this->countModules('footer4')) : ?>

		<div id="footer" class="clearfix"><!--footer starts here-->			
			<?php if ($this->countModules('footer1')): ?><!--footer1 starts here-->
     			<div id="footer1" class=" <?php if ( $footer == 1 ):echo ('sixcol'); elseif ( $footer == 2 ):echo ('fourcol'); elseif ( $footer == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="footer1" style="xhtml" />
     			</div> <!--footer1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('footer2')): ?><!--footer2 starts here-->
				<div id="footer2" class=" <?php if ( $footer == 1 && $this->countModules('footer3') || $footer == 1 && $this->countModules('footer4') ):echo ('sixcol'); elseif ( $footer == 1): echo ('sixcol last'); elseif ( $footer == 2 ):echo ('fourcol'); elseif ( $footer == 3 ):echo ('threecol');else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="footer2" style="xhtml" />
				</div> <!--footer2 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('footer3')): ?><!--footer3 starts here-->
				<div id="footer3" class=" <?php if ( $footer == 1 && $this->countModules('footer4')):echo ('sixcol'); elseif ( $footer == 1):echo ('sixcol last'); elseif ( $footer == 2 && $this->countModules('footer4')):echo ('fourcol'); elseif ($footer == 2): echo ('fourcol last'); elseif ( $footer == 3 ):echo ('threecol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="footer3" style="xhtml" />
				</div> <!--footer3 ends here-->
			<?php endif; ?>
			<?php if ($this->countModules('footer4')): ?><!--footer4 starts here-->
				<div id="footer4" class=" <?php if ( $footer == 1 ):echo ('sixcol last'); elseif ( $footer == 2 ):echo ('fourcol last'); elseif ( $footer == 3 ):echo ('threecol last'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="footer4" style="xhtml" />
				</div> <!--footer4 ends here-->
			<?php endif; ?>
		</div><!--footer ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<div class="container"><a name="nav-mobile"></a>
	<div class="row">
		<div id="backtotop-mobile" class="onecol last">
            <a href="#bktop" title="BACK TO TOP"><img src="templates/<?php echo $this->template?>/images/backtotop.png" style="border:0;" alt="TOP" /></a>
        </div><!--backtotop ends here-->
		<?php if ($this->countModules('nav-mobile')) { ?><!--nav-mobile starts here-->
     		<div id="nav-mobile" class="twelvecol">
     			<jdoc:include type="modules" name="nav-mobile" style="xhtml" />
     		</div>
		<?php } ?><!--nav-mobile ends here --> 
	</div>
</div>

<?php if($this->countModules('copyright1') || $this->countModules('copyright2') || $backtotop) : ?>
<div class="container" id="copyrightwrap">
	<div class="row">
			<?php 
				if ($this->countModules('copyright1') && $this->countModules('copyright2')) $copyright=1; 
				if ($this->countModules('copyright2') && $backtotop) $copyright=2;
				if ($this->countModules('copyright1') && $backtotop) $copyright=3;
				if ($this->countModules('copyright1') && $this->countModules('copyright2') && $backtotop) $copyright=4;
			?>
			<?php if($this->countModules('copyright1') || $this->countModules('copyright2') || $backtotop) : ?>

		<div id="copyright" class="clearfix"><!--copyright starts here-->
			
			<?php if ($this->countModules('copyright1')): ?><!--copyright1 starts here-->
     			<div id="copyright1" class=" <?php if ( $copyright == 1 ):echo ('sixcol'); elseif ( $copyright == 3 ):echo ('elevencol'); elseif ( $copyright == 4 ):echo ('sixcol'); else: echo ('twelvecol'); endif; ?> ">
     				<jdoc:include type="modules" name="copyright1" style="xhtml" />
     			</div> <!--copyright1 ends here-->
			<?php endif; ?>
            <?php if ($this->countModules('copyright2')): ?><!--copyright2 starts here-->
				<div id="copyright2" class=" <?php if ( $copyright == 1 ):echo ('sixcol last'); elseif ( $copyright == 2 ):echo ('elevencol'); elseif ( $copyright == 4 ):echo ('fivecol'); else: echo ('twelvecol'); endif; ?> ">
					<jdoc:include type="modules" name="copyright2" style="xhtml" />
				</div> <!--copyright2 ends here-->
			<?php endif; ?>
			<?php if (($backtotop) !=0) : ?><!--backtotop starts here-->
				<div id="backtotop" class=" <?php if ( $copyright == 2 ):echo ('onecol last'); elseif ( $copyright == 3 ):echo ('onecol last'); elseif ( $copyright == 4 ):echo ('onecol last'); else: echo ('twelvecol'); endif; ?> ">          
					<a href="#bktop" title="BACK TO TOP"><img src="templates/<?php echo $this->template?>/images/backtotop.png" style="border:0;" alt="TOP" /></a>
                </div><!--backtotop ends here-->
			<?php endif; ?><!--backtotop ends here-->
			
			<p id="download">Template download from: <a href="http://www.jwp24.com" title="The Best Templates for Joomla!" target="_blank">Free Joomla 3 Templates</a></p>

		</div><!--copyright ends here-->
			<?php endif; ?>
	</div>
</div>
<?php endif; ?>

<div class="container">
	<div class="row">
		<?php if ($this->countModules('debug')) { ?><!--debug starts here-->
     		<div id="debug" class="twelvecol ">
     			<jdoc:include type="modules" name="debug" style="xhtml" />
     		</div>
		<?php } ?><!--debug ends here --> 
	</div>
</div>

<div class="container">
	<?php if ($this->countModules('styles')) { ?><!--styles starts here-->
     	<div id="styles">
     		<jdoc:include type="modules" name="styles" style="xhtml" />
     	</div>
	<?php } ?><!--styles ends here --> 
</div>

<div class="container" id="styleswrap">
	<div class="row">
		<?php if ($this->countModules('styles-mobile')) { ?><!--styles-mobile starts here-->
     		<div id="styles-mobile">
     			<jdoc:include type="modules" name="styles-mobile" style="xhtml" />
     		</div>
		<?php } ?><!--styles-mobile ends here --> 
	</div>
</div>

</div><!--container id ends here -->

<!--[if lte IE 6]><script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/ie6/warning.js"></script><script>window.onload=function(){e("<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/ie6/")}</script><![endif]-->
</body>
</html>
