<?php
defined('_JEXEC') or die('Restricted access');
echo '<?xml version="1.0" encoding="utf-8"?'.'>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
	<?php 
	
	JHTML::_('behavior.mootools');
	$app                = JFactory::getApplication();
	$templateparams     = $app->getTemplate(true)->params;
	$editor=false;
	if(JRequest::getVar('option','')=='com_content'&&JRequest::getVar('layout','')=='edit')$editor=true;
	if(JRequest::getVar('option','')=='com_weblinks'&&JRequest::getVar('layout','')=='edit')$editor=true;
	?>
	<jdoc:include type="head" />
	<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/menu.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/css/custom_elements.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/css/editor.css" type="text/css" />
	<!--[if IE]>
	<link href="templates/<?php echo $this->template ?>/css/ieonly.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/javascript/ietextshadowfix.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/javascript/ieheightfix.js"></script>
<![endif]-->
<!--[if lte IE 6]>
	<link href="templates/<?php echo $this->
template ?>/css/ie6fix.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/javascript/pngfix.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/javascript/fixthis.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/javascript/menu-fix.js"></script>

<![endif]-->
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/javascript/utility.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/javascript/custom_elements.js"></script>
	
	
</head>

	<body class="braincode-grunge">
		
		<div class="external">
		
			<div class="internal">
		
				<div class="internal-top">
					
					<?php if($templateparams->get('show-logo',1)) : ?>
							
							<div class="braincode-logo">
								<a href="index.php" class="logo"></a>
							</div>
							
					<?php endif; ?>
					
					<?php if($this->countModules('user3')) : ?>
					
							<div class="top_right">
								
								<jdoc:include type="modules" name="user3" />
						
							</div>
					
					<?php endif; ?>
				
				</div>
				
				<div class="background">
					
				  <div class="wrapper">
						<?php if($this->countModules('mainmenu')||$this->countModules('slideshow')||$templateparams->get('enable-slideshow',1)||$templateparams->get('enable-single',0)||$this->countModules('breadcrumb')||$templateparams->get('enable-search',1)) : ?>
						<div class="main-box">	
						
						  <div class="main-box-floating">	
							
								<?php if($this->countModules('mainmenu')) : ?>
									
									<div class="main-menu <?php echo ($templateparams->get('show-logo',1))? '' : 'main-menu-large' ?>">
	
										<jdoc:include type="modules" name="mainmenu" style="" />
															
									</div>
	
								<?php endif; ?>
								
								<?php if($this->countModules('slideshow')||$templateparams->get('enable-slideshow',1)||$templateparams->get('enable-single',0)) : ?>
									
									<div class="slideshow">
	
										
										
										<?php 
										if($templateparams->get('enable-single',0)) : 
										require_once(JPATH_SITE.DS.'templates'.DS.$this->template.DS.'slideshow'.DS.'slideshow.php');
											
												echo braincodeSmoothGallery::createSlideshow($templateparams->get('slide',''),'','');
										
										elseif($templateparams->get('enable-slideshow',1)) : 
											
											require_once(JPATH_SITE.DS.'templates'.DS.$this->template.DS.'slideshow'.DS.'slideshow.php');
											
												echo braincodeSmoothGallery::createSlideshow($templateparams->get('slides',''),$templateparams->get('slideshow-width','890'),$templateparams->get('slideshow-height','267'),$templateparams->get('slideshow-speed','5'));
										else: ?>
										
										<jdoc:include type="modules" name="slideshow" style="" />
										
										
										<?php endif; ?>
										
															
									</div>
	
								<?php endif; ?>
								
								<?php if($this->countModules('breadcrumb')||$templateparams->get('enable-search',1)) : ?>
									
									<div class="sub-header">
									
										<?php if($this->countModules('breadcrumb')) : ?>
										
										<div class="sub-header-left">
										
											<jdoc:include type="modules" name="breadcrumb" style="" />
										
										</div>	
										
										<?php endif;?>
										<?php if($templateparams->get('enable-search',1)) : ?>
										<div class="sub-header-right">
											<form action="index.php"  method="post" class="search">
											
												<div class="mod_search_searchword_container"><input name="searchword" id="mod_search_searchword" maxlength="20" class="inputbox" type="text"/></div>
											
												<input type="submit" class="submit" value="<?php echo JText::_('CERCA') ?>" />
											
												<input type="hidden" name="option" value="com_search" />
											
												<input type="hidden" name="task"   value="search" />
											
											</form>
										</div>
										<?php endif; ?>
									
									</div>
												                        
								<?php endif; ?>
	
	
							</div>
							
						</div>	
						
						<?php endif;?>
						
						<div class="main-content">
												
							<?php if($this->countModules('left')) : ?>
							<div class="left-column">							
								
								<jdoc:include type="modules" name="left" style="module" />
							
							</div>
							<?php endif; ?>
							
							<div class="center-column" id="center<?php echo ($this->countModules('left'))? '-right' : '';echo ($this->countModules('right')&&!$editor)? '-left' : ''; ?>">								
								<jdoc:include type="message" />
								
								<?php if($this->countModules('user1')) : ?>
								
									<jdoc:include type="modules" name="user1" style="module_content" />
								
								<?php endif; ?>
								
								<jdoc:include type="component" />
								
								<?php if($this->countModules('user2')) : ?>
								
									<jdoc:include type="modules" name="user2" style="module_content" type="bottom_elements" />
								
								<?php endif; ?>
							
							</div>
							<?php if($this->countModules('right')&&!$editor) : ?>
							<div class="right-column">							
								<jdoc:include type="modules" name="right" style="module" />
							</div>
							<?php endif; ?>
						
						</div>

						<?php if($this->countModules('footer1 or footer2 or footer3 or footer4')) : ?>
							<div class="bottom-module">
								
								<?php if($this->countModules('footer1')) : ?>
								<div class="modul-bottom-container">
									<jdoc:include type="modules" name="footer1" style="footer" expand="<?php echo ($this->countModules('footer2'))? '0' : '1' ?>" />
								</div>
								<?php endif; ?>
								<?php if($this->countModules('footer2')) : ?>
								<div class="modul-bottom-container">
								
									<jdoc:include type="modules" name="footer2" style="footer" expand="<?php echo ($this->countModules('footer1'))? '0' : '1' ?>" />
								</div>
								<?php endif; ?>
								<?php if($this->countModules('footer3')) : ?>
								<div class="modul-bottom-container">
									<jdoc:include type="modules" name="footer3" style="footer" expand="<?php echo ($this->countModules('footer4'))? '0' : '1' ?>" <?php echo ($this->countModules('footer4'))? '0' : 'position="last-module"' ?>  />
								</div>
								<?php endif; ?>
								<?php if($this->countModules('footer4')) : ?>
								<div class="modul-bottom-container">
								
									<jdoc:include type="modules" name="footer4" style="footer" position="last-module" expand="<?php echo ($this->countModules('footer3'))? '0' : '1' ?>" />
								</div>
								<?php endif; ?>
								
							</div>	
						<?php endif; ?>
						
					
					</div>
					
				</div>
				
				<div class="footer-background"></div>
				<div class="bottom-site">
					<div class="bottom-site-left">
						<?php echo $templateparams->get('footertxt') ?>
					</div>
		
					<div class="bottom-site-right">
						
						<p><a href="http://www.braincode.it" target="_blank" title="Template Joomla, da PSD a Joomla">Template Joomla</a> Realizzato per <a href="http://www.joomla.it" title="joomla.it">www.joomla.it</a></p>
  						<p>Grafica e conversione in template Joomla <a href="http://www.braincode.it" title="Gli artigiani del codice" target="_blank">braincode</a> - <a href="http://www.braincode.it" target="_blank" title="Componenti Joomla, Sviluppo componenti Joomla, Creazione componenti Joomla">Sviluppo componenti Joomla</a> - <a href="http://www.braincode.it" target="_blank" title="Sviluppo siti web Joomla!, siti web con joomla">Siti web Joomla</a></p>
  			
					</div>
		
				</div>
			
			</div>
		
		</div>
		
			
	</body>


</html>
