<?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 Skeleton - 05/12/2016

INTERIOR PAGE 
A simple 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="template-footcode"/>

    <xsl:template name="page-content">

        <xsl:call-template name="feature"/>

        <div class="body clearfix">
            <xsl:if test="$ou:athletics = 'true' and not($sidebar = 'true')">
                <xsl:attribute name="class">body dark width clearfix</xsl:attribute>
            </xsl:if>
            <xsl:if test="$ou:athletics = 'true' and ($sidebar = 'true')">
                <xsl:attribute name="class">body dark clearfix</xsl:attribute>
            </xsl:if>
            <xsl:if test="not($ou:athletics = 'true') and not($sidebar = 'true')">
                <xsl:attribute name="class">body width clearfix wb</xsl:attribute>
            </xsl:if>


            <div class="container">
                <xsl:call-template name="maincontent"/>
                <xsl:if test="$sidebar = 'true'">
                    <xsl:call-template name="sidebar"/>
                </xsl:if>
            </div>
        </div>
        <xsl:if test="$fullwidth_select = 'true'">
            <xsl:call-template name="fullwidth-content"/>
            <xsl:if test="$ou:action != 'pub'">
                <div style="margin-bottom: 18px;"/>
            </xsl:if>
        </xsl:if>
    </xsl:template>

    <xsl:template name="feature">
        <xsl:choose>
            <xsl:when test="$feature_select = 'image'">
                <div class="features" style="background-image: url({$feature});"/>
            </xsl:when>
            <xsl:when test="$feature_select = 'feature'">
                <div class="features">
                    <xsl:apply-templates select="ouc:div[@label='feature']"/>
                </div>
            </xsl:when>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="maincontent">
        <div class="main-content" style="min-height: 62px;">
            <!-- see breadcrumbs xsl -->
            <!--<ol class="breadcrumb">
            <xsl:call-template name="breadcrumb">
                <xsl:with-param name="path" select="$ou:dirname"/>
            </xsl:call-template>
        </ol>
        <div class="font-size">
            <a class="minus" href="#"/>
            <span class="ico">
                <img src="/_resources/images/ico_let_size.png" alt=""/>
            </span>
            <a class="plus" href="#"/>
        </div>-->
            <div class="con-module">

                <div class="title">
                    <xsl:attribute name="style">
                        <xsl:choose>
                            <xsl:when test="$title_placement = 'left'">text-align:left;</xsl:when>
                            <xsl:when test="$title_placement = 'right'">text-align:right;</xsl:when>
                            <xsl:when test="$title_placement = 'center'">text-align:center;</xsl:when>
                        </xsl:choose>
                    </xsl:attribute>
                    <h1>
                        <xsl:value-of select="$heading"/>
                    </h1>
                </div>

                <div class="hoder cards-view">
                    <section class="filter-bar">
                        <h6>Areas of Study</h6>
                        <article>
                            <a class="cards-view-trigger sp active" href="#">
                                <img src="/_resources/images/ico_filter3.png" alt=""/>
                            </a>
                            <h6>1</h6>
                        </article>
                        <article>
                            <a class="line-view-trigger" href="#">
                                <img src="/_resources/images/ico_filter2.png" alt=""/>
                            </a>
                            <h6>2</h6>
                        </article>
						<article><h6>T</h6><a class="campus-trigger " href="/academics/associate-degrees/index.html"><span>Two-Year Degrees</span></a></article>
						<article><h6>T</h6><a class="campus-trigger " href="/academics/bachelor-degrees/index.html"><span>Four-Year Degrees</span></a></article>
                    </section>

                    <div>
                        <xsl:copy-of select="ou:get-edit-button(area-of-study/ouc:div[@label='area-study'])"/>
                    </div>
                    <div class="programs">
                        <xsl:apply-templates select="area-of-study"/>
                    </div>
                </div>
            </div>
            <xsl:apply-templates select="ouc:div[@label='maincontent']" />
        </div>
    </xsl:template>

    <xsl:template name="fullwidth-content">
        <xsl:apply-templates select="ouc:div[@label='fullwidth-content']"/>
    </xsl:template>

    <xsl:template name="sidebar">
        <aside id="sidebar">
            <div class="side-title">
                <h3>
                    <xsl:value-of select="$sidebar-title"/>
                </h3>
            </div>

            <script src="https://code.jquery.com/jquery-1.11.3.min.js"/>

            <script>
            $(function() {
                $.ajax({
                    type: "GET",
                    dataType: "html",
                    url: "/_resources/scripts/get-nav.ashx",
                    data: "navfile=<xsl:value-of select="$nav-start"/>",
                    success:function(data){
                     $("#getnav").html(data);  
                     $(".widget-menu .plus .nn").click(function() {
                         $(this).parent().toggleClass("current0")
                         $(this).next().next().slideToggle(300)
                         mobileCheck();
                         return false
                         });
                     }
                    });
            });
            
        </script>

            <div class="widget widget-menu" id="getnav"/>

            <xsl:apply-templates select="ouc:div[@label='sidebar-content']"/>

        </aside>
        <!-- / sidebar -->
    </xsl:template>

    <xsl:template match="table[@class='ou-area-of-study']" mode="cols">

        <xsl:variable name="pos" select="position()"/>
        <article class="col-md-6">
            <div class="pic">
                <img src="{tbody/tr/td[@class='image']/img/@src}" alt=""/>
            </div>
            <div class="more-trigger">
                <xsl:value-of select="tbody/tr/td[@class='title']"/>
            </div>
            <div class="more-con">
                <xsl:apply-templates select="tbody/tr/td[@class='content']/node()" mode="cols"/>
            </div>
        </article>

    </xsl:template>

    <xsl:template match="table[@class='ou-area-of-study']" mode="lines">

        <xsl:variable name="pos" select="position()"/>
        <article>
            <h4>
                <xsl:value-of select="tbody/tr/td[@class='title']"/>
            </h4>
            <xsl:apply-templates select="tbody/tr/td[@class='content']/node()" mode="lines"/>
        </article>

    </xsl:template>

    <xsl:template match="area-of-study">
        <section class="cols">
            <h6>programs</h6>
            <xsl:if test="not($ou:action = 'pub')">
                <div/>
            </xsl:if>
            <xsl:apply-templates select="ouc:div[@label='area-study']/node()" mode="cols"/>
        </section>

        <section class="lines">
            <h6>lines</h6>
            <xsl:apply-templates select="ouc:div[@label='area-study']/node()" mode="lines"/>
        </section>
    </xsl:template>

    <xsl:template match="table[@class='ou-area-of-study-content']" mode="cols">
        <xsl:for-each select="tbody/tr">
            <h4>
                <xsl:value-of select="td[@class='title']"/>
            </h4>
            <div class="lines-hold">
                <xsl:apply-templates select="td[@class='content']"/>
            </div>
            <div class="divider sp"/>
        </xsl:for-each>
    </xsl:template>

    <xsl:template match="table[@class='ou-area-of-study-content']" mode="lines">
        <div class="lines-hold">
            <xsl:for-each select="tbody/tr">
                <xsl:apply-templates select="td[@class='content']"/>
            </xsl:for-each>
        </div>
    </xsl:template>

    <xsl:template match="p[@class='ou-line-style']">
        <div class="line">
            <p>
                <xsl:apply-templates/>
            </p>
            <xsl:variable name="sibling" select="following-sibling::element()[1]"/>
            <xsl:if test="count($sibling//li) != 0">
                <!--<xsl:apply-templates select="./$sibling"/>-->
                <ul class="list block-style">
                    <xsl:for-each select="$sibling/descendant::li">
                        <li>
                            <xsl:apply-templates select="node()"/>
                        </li>
                    </xsl:for-each>
                </ul>
            </xsl:if>
        </div>
     
    </xsl:template>

    <xsl:template match="span[@class='ou-line-style']">
        <div class="line">
            <xsl:apply-templates/>
        </div>
     
    </xsl:template>

   <!-- <xsl:template match="ul">
        <!-\-<div class="line">
            <p>
                <xsl:apply-templates select="descendant::li[1]/node()"/>
            </p>
          
        </div>-\->
        <!-\-<ul class="list block-style">
            <xsl:for-each select="descendant::li">
                <li>
                    <xsl:apply-templates select="node()"/>
                </li>
            </xsl:for-each>
        </ul>-\->
    </xsl:template>-->



    <xsl:template match="div[@class='divider sp']" mode="lines"/>



</xsl:stylesheet>
