// ========== SECURITY ADMINISTRATION AND WORKFLOW
// This code creates a Logout button for Security Admin and Workflow, removes the 
// topic toc and collapses all sections by default.

if (dev || exp || tst || prod || lhost){
    if (IsSecAdmin || IsADA || IsDGS || IsDocViewer || IsAuthoring ||  IsExpDocPortal || 
        IsExpEng || IsEZConfig || IsOAuth || IsOPPSA || IsOnPrem || IsWKHosted || IsWKIS || IsLocalhost) {
        $('.wh_search_textfield').parent().append('<a id="btnLogout" class="btn btn-primary" title="Logout" href="/Logout.ashx"><i class="fa fa-sign-out"></i> Logout</a>');
        $('.wh_publication_title').css('margin-right', '130px');
        }    
}
// Remove the topic TOC
var RemoveTocSA     = window.location.href.indexOf("SecurityAdministration") != -1;
var RemoveTocMort	= window.location.href.indexOf("Mortgage") != -1;
var RemoveTocC1	    = window.location.href.indexOf("C1Administration") != -1;
var RemoveTocAss	= window.location.href.indexOf("Assumptions") != -1;

if(RemoveTocSA || RemoveTocMort || RemoveTocC1 || RemoveTocAss) {
    $('#wh_topic_toc').remove();
}

// Collapse the sections by default
// Comment the following line of code to have sections expanded by default
if(window.location.href.indexOf("SecurityAdministration" || "Workflow") > -1) {
    CollapseSections();
    $( "section:gt( 0 )" ).CollapseSections();
}
