<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY amp   "&#38;">
<!ENTITY copy   "&#169;">
<!ENTITY gt   "&#62;">
<!ENTITY hellip "&#8230;">
<!ENTITY laquo  "&#171;">
<!ENTITY lsaquo   "&#8249;">
<!ENTITY lsquo   "&#8216;">
<!ENTITY lt   "&#60;">
<!ENTITY nbsp   "&#160;">
<!ENTITY quot   "&#34;">
<!ENTITY raquo  "&#187;">
<!ENTITY rsaquo   "&#8250;">
<!ENTITY rsquo   "&#8217;">
]>
<!-- 
Implementations Skeletor v3 - 5/10/2014

HOME PAGE 
A complex page type.

Contributors: Your Name Here
Last Updated: Enter Date Here
-->
<xsl:stylesheet version="3.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:ou="http://omniupdate.com/XSL/Variables"
    xmlns:fn="http://omniupdate.com/XSL/Functions"
    xmlns:ouc="http://omniupdate.com/XSL/Variables"
    exclude-result-prefixes="ou xsl xs fn ouc">
			
	<xsl:import href="common.xsl"/>
			
	<xsl:template name="template-headcode"/>
	
	<xsl:template name="page-content"> 
		<xsl:copy-of select="ou:get-edit-button(ouc:div[@label='LDP-Home'])"/>
		<div class="home-slider cc">
			<xsl:apply-templates select="ouc:div[@label='LDP-Home']/gallery" >
				<xsl:with-param name="gallery-type">foun-home</xsl:with-param>
			</xsl:apply-templates>
		</div>
		<div class="home-con vv">
			<div class="container">
				<div class="main-btns">
					<xsl:call-template name="btns-home"/>
				</div>
				<div class="menu-line">
					<xsl:call-template name="tabs-home"/>
				</div>
				<div class="text-con">
					<div class="info">
						<xsl:apply-templates select="ouc:div[@label='con-text']" />
					</div>
					<div class="pic">
						<img src="{ou:pcf-param('intro-image')}" alt="{ou:pcf-param('intro-alt')}" />
					</div>
				</div>
				<div class="blue-con">
					<xsl:apply-templates select="ouc:div[@label='slogan-region']" />
				</div>
			
				<div class="con-slider2">
					<xsl:if test="$ouc:action ='edt'">
						<div style="position:absolute;z-index:9">
							<xsl:copy-of select="ou:get-edit-button(ouc:div[@label='slider-region'])"/>
						</div>
					</xsl:if>
					<xsl:apply-templates select="ouc:div[@label='slider-region']/*" />
					<a class="bt-link" href="{ou:pcf-param('submit-link')}"> <xsl:value-of select="ou:pcf-param('submit-text')"/></a>
				</div>
				<div class="block-3 type-2">
					<xsl:call-template name="blockhome-images"/>
				</div>
			</div>
		</div>
	</xsl:template>
	<xsl:template name="btns-home">
		<xsl:for-each select="1 to count(descendant::parameter[contains(@name, 'image-btn')])">
			<xsl:variable name="pos" select="position()"/>
			<a class="btn-{$pos}" href="{ou:pcf-param(concat('link-btn',$pos))}">
				<div class="ico">
					<img src="{ou:pcf-param(concat('image-btn',$pos))}" alt="{ou:pcf-param(concat('alt-btn',$pos))}"/>
				</div>
				<div class="holder">
					<span class="line1"><xsl:value-of select="ou:pcf-param(concat('title-btn',$pos))"/></span>
					<span class="line2"><xsl:value-of select="ou:pcf-param(concat('desc-btn',$pos))"/></span>
				</div>
			</a>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="tabs-home">
		<a href="#" class="trigger-more"><span class="ico"><i class="fa fa-bars"></i></span>Show</a>
		<a href="#" class="trigger-less"><span class="ico"><i class="fa fa-times"></i></span>Hide</a>
		<ul>
			<xsl:variable name="root" select="/document"/>
			<xsl:for-each select="1 to count(descendant::parameter[contains(@name, 'display-tab')])">
				<xsl:variable name="pos" select="position()"/>
				<xsl:if test="$root//parameter[@name=concat('display-tab', $pos)]/option[@selected='true']">
					<li>
						<a href="{ou:pcf-param(concat('href-tab',$pos))}"><xsl:value-of select="ou:pcf-param(concat('title-tab',$pos))"/></a>
					</li>
				</xsl:if>
			</xsl:for-each>
		</ul>
	</xsl:template>
	<xsl:template name="blockhome-images">
		<section>
			<h6>List</h6>
			<xsl:for-each select="1 to count(descendant::parameter[contains(@name, 'image-block')])">
				<xsl:variable name="pos" select="position()"/>
				<article class="col-md-4">
					<div class="inner">
						<a href="{ou:pcf-param(concat('link-block',$pos))}"/>
						<img src="{ou:pcf-param(concat('image-block',$pos))}" alt="{ou:pcf-param(concat('alt-block',$pos))}"/>
						<div class="info height2">
							<h3><xsl:value-of select="ou:pcf-param(concat('title-block',$pos))"/></h3>
							<p><xsl:value-of select="ou:pcf-param(concat('desc-block',$pos))"/></p>
						</div>
					</div>
				</article>
			</xsl:for-each>
		</section>
	</xsl:template>

		
</xsl:stylesheet>
