﻿/****************************************************************************************
    KB Expando documentation
*****************************************************************************************
Example of a KB expando:

<a href="javascript:" class="kbexpandolink">Add description of the link here</a>
<div class="kbexpandoContent">Add Content of the expando here</div>

You can add any additional styling to it or wrap in a div to apply the blueLink styleguide style:

<div class="blueLink">//it can be any other class of your choice if you want a different look. See a developer for custom styling
    <a href="javascript:" class="kbexpandolink">Add description of the link here</a>
    <div class="kbexpandoContent">Add Content of the expando here</div>
</div>

it is possible to nest an expando within another, here is an example:

<div class="blueLink">
    <a href="javascript:" class="kbexpandolink">Add description of the link here</a>
    <div class="kbexpandoContent">
        Add Content of the expando here
        <a href="javascript:" class="kbexpandolink">here</a>
        <div class="kbexpandoContent">
            content of the inner expando here
        </div>
    </div>
</div>

PS: You can nest indefinitely     */

$(".kbexpandolink").click(function(){
            var next = $(this).next(".kbexpandoContent div");
            next.slideToggle("fast");
            if($(this).hasClass("open"))
            {
                $(this).removeClass("open");
            }
            else
                $(this).addClass("open");
        });