$(document).ready(function() {
    $('body').before('<div id="master-header">' +
                        '<img class="header-logo" ' +
                        '     src="/resources/img/Wolters-Kluwer-logo_white_trans.png" ' +
                              'width="230" align="left" ' +
                              'alt="Wolters Kluwer">' +
                      '</div>');
    $('body').after('<div id="id_footer">' +
                        '<div class=" footer-container text-center ">' +
                            '<div><img class="footer-logo" src="/resources/img/logos/Wolters-Kluwer-logo_blu.png" width="175" height="33" align="left" alt="Wolters Kluwer"></div>' +
                            '<div class="draft-notice">FOR INTERNAL USE ONLY</div>' +
                            '<div>' +
                                // '<script type="text/javascript" src="/resources/webhelp-includes/wkfs-resp_ftr.js"></script>' +
                            '</div>' +
                        '</div>' +
                    '</div>');

    // Remove elements
    var href = document.location.href;
    var lastPathSegment = href.substr(href.lastIndexOf('/') + 1);
    if(lastPathSegment == "index.html" || lastPathSegment == "/") {
        $("#main-header").remove();
        $("#main-content").first().remove();
    } else {
        $(".page-metadata").remove();
        $(".pageSection").remove();
    }
    $("#footer").remove();
    






    // if ($('div.pageSection > h2#attachments').length != 0) {
    //     alert("Attachments");
    // }
    // if($('.pageSection').children('#attachments').length > 0)
    // {
    //     $('.pageSection').hide();
    // }
    

    // $("#breadcrumb-section").insertBefore("#content");

});
