<?php defined( '_JEXEC' ) or die( 'Restricted access' );
    $app = JFactory::getApplication();
	$doc = JFactory::getDocument();
	
	//JHtml::_('behavior.framework', true);
	
	$this->language = $doc->language;
	$this->direction = $doc->direction;
	$sitename = $app->getCfg('sitename');
	$doc->addStyleSheet('templates/'.$this->template.'/css/bootstrap.min.css');
	$doc->addStyleSheet('templates/'.$this->template.'/css/bootstrap-theme.min.css');
	$doc->addStyleSheet('templates/'.$this->template.'/css/font-awesome.min.css');
	$doc->addStyleSheet('templates/'.$this->template.'/css/custom.css');
	$doc->addScript('templates/'.$this->template.'/js/bootstrap.js');
	$user = JFactory::getUser();
	
	$option   = $app->input->getCmd('option', '');
    $view     = $app->input->getCmd('view', '');
    $layout   = $app->input->getCmd('layout', '');
    $task     = $app->input->getCmd('task', '');
    $itemid   = $app->input->getCmd('Itemid', '');

	//echo JFactory::getUser()->usertype;
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >

<head><meta http-equiv="Content-Type" content="text/html; charset=gb18030">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-117108720-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-117108720-1');
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TLZ33JK');</script>
<!-- End Google Tag Manager -->  
<jdoc:include type="head" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Hind:300,400,500,600,700" rel="stylesheet">   
<!-- js -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>	  
<!--[if lt IE 9]>
		 <script src="<?php echo $this->baseurl ?>/media/jui/js/html5.js"></script>	
		<![endif]-->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
 <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
 <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->		
<script type="text/javascript">
			var $ = jQuery.noConflict();
</script>
<meta name="google-site-verification" content="ayhLqYadnYDxiT-GMWS-_Y_Wis7A5WIxP9U13zWAXsg"/>

</head>
<body class="site <?php echo $option
	. ' view-' . $view
	. ($layout ? ' layout-' . $layout : ' no-layout')
	. ($task ? ' task-' . $task : ' no-task')
	. ($itemid ? ' itemid-' . $itemid : '');
?>" > 
  
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TLZ33JK"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<!---Top--->   
<div id="bar-top" class="container-fluid"> 
     <div class="container-fluid">
            <div class="row">
                  <div class="col-md-6 col-xs-12"><jdoc:include type="modules" name="location" style="none"/></div>
                  <div class="col-md-3 col-xs-12 col-md-pull-4"><jdoc:include type="modules" name="mail" style="none"/></div>
				  <div class="col-md-3 col-xs-12 hidden-xs pull-right"><jdoc:include type="modules" name="socialmedia" style="none"/></div>
            </div>
     </div>
</div>
 <!---Header--->   
<div id="bar-header" class="container-fluid"> 
    <div class="container-fluid">    
            
<!--main-menu-->  
	   
  	    <nav id="custom-bootstrap-menu" class="navbar">
   		<div class="container-fluid">
    	<!-- Brand and toggle get grouped for better mobile display -->
    	<div class="navbar-header">
        <jdoc:include type="modules" name="brand" style="none"/>
      	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        </button>
        
        </div>
           <?php if ($this->countModules('menu-1')) : ?>  
         <!-- Collect the nav links, forms, and other content for toggling -->
    	 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
         		
                <jdoc:include type="modules" name="menu-1" style="none" />
                <jdoc:include type="modules" name="search" style="none"/>
                
    	 </div>
  	     </div>
	    </nav>  
</div>
</div> 
<?php endif; ?>

 <!---slider--->
<?php if (JRequest::getVar('view') == 'featured'):?>
<div class="container-fluid">
      <div class="row">
      <div class="col-md-12">  
        	<jdoc:include type="modules" name="main-slide" style="none" />  
      </div>
      </div>  
</div>

  <!---center--->

<div class="container-fluid services-background" >
        <div class="container" id="services-1">
                   <div class="row">
                   <div class="col-md-10 col-md-offset-2">
                     <jdoc:include type="modules" name="title-1" style="none" />
                    </div>
                  </div>
        </div>  
        <div class="container-fluid">
                   <div class="row">
                   <div class="col-md-10">
                   <div class="col-md-10 col-md-offset-2">
                   <jdoc:include type="modules" name="boxes-1" style="none" />
                   </div>
                   </div> 
                   </div>

        </div>
</div>             

<div id="title-2" class="container">
           <div class="row">
           <div class="col-md-8 col-md-offset-3">
           <jdoc:include type="modules" name="title-2" style="none" />
           </div> 
           </div>
</div>
             
<div id="boxes-2" class="container">
           <div class="row">
           <div class="col-md-12">
           <jdoc:include type="modules" name="boxes-2" style="none" />
           </div>
           </div>
           <div class="row">
           <div class="col-md-4 col-md-offset-4">
           <br /><br />
           <p><a href="/inicio/profesionales" class="btn btn-primary btn-block">Más Información</a></p>
           </div>
           </div>
           
</div>
<div id="background-adv" class="container-fluid">             
<div id="advertising" class="container">
           <div class="row">
           <div class="col-md-12">
           <jdoc:include type="modules" name="advertising" style="none" />
           </div> 
           </div>
</div>
</div>             
<?php else: ?>
  
<div class="container">
      <div class="row">
      <div class="col-md-12">  
        	<jdoc:include type="modules" name="header-internal" style="none" />  
      </div>
      </div>  
</div>
<?php if ($this->countModules('image-internal')) : ?>
 <div class="container" id="page-internal">
      <div class="row">
      <div class="col-md-7">  
        	<jdoc:include type="modules" name="image-internal" style="none" />  
      </div>
        <div class="col-md-5">  
        	<jdoc:include type="modules" name="menu-internal" style="none" />  
      </div>
      </div>  
 </div>
 <?php endif; ?>    
  
          <div class="container-fluid">
              <div id="component" class="container-fluid">
              <div class="row">
               <div class="col-md-12 col-xs-12"> 
                    <jdoc:include type="message" />
                    <jdoc:include type="modules" name="breadcrumb" style="none" />
                    <jdoc:include type="component" />
              </div>  
              </div>
        </div>
        </div>
<?php endif; ?> 
   
    
    
<?php if ($this->countModules('location')) : ?>
  
<div class="container">
           <div class="row">
           <div class="col-md-11 col-md-offset-1">
           <jdoc:include type="modules" name="title-3" style="none" />
           </div> 
           </div>
</div>             
</div>   

<div class="container-fluid">
           <div class="row">
           <div class="col-md-12"> 
           <jdoc:include type="modules" name="map" style="none" />
           </div> 
           </div>           
</div>  
<?php endif; ?>     
<div  id="bar-footer-2" class="container-fluid">
          <div class="container-fluid">
                     <div class="row">
                     <div class="col-md-11 col-md-offset-1">   
          				<jdoc:include type="modules" name="footer-1" style="none" />
          			</div> 
          			</div>
          </div>   
</div>  
<!---Footer--->    
		<div id="bar-footer-3" class="container-fluid">
        <div class="container">
        	<div class="row">
              <div class="col-md-12 col-xs-12">
                <jdoc:include type="modules" name="copyright" style="none" />
                <p style="text-align:center;">
                 Última actualización: <?php echo date('d/m/Y'); ?>
                </p>
             </div>
        </div>
		</div>
        </div>
</body>
</html>   