===============================
// Function reference pages

$(window).load(function () {
    // Perform breadcrumb check in window load, since all the images in the breadcrumb
    // need to be loaded for correct width calculations.
    checkBreadcrumb();
    expandCollapsedContent();
});

$(document).ready(function () {
    //Perform JS code which has any user visible impact first.
    //Check image sizes. Do not scale animated images or any images with hotspots.
    $('#doc_center_content img:not(".animated-image, [usemap]"), #content_container2 img:not(".animated-image, [usemap]")').each(function () {
        checkImage($(this));
    });

    $('#doc_center_content img.animated-image, #content_container2 img.animated-image').each(function () {
        checkAnimatedImage($(this));
    });

    $('.expandAllLink').click(function(e) {
        e.stopPropagation();
        var link = $(this);
        if (link.data('allexpanded')) {
            doCollapse(link);
            link.data('allexpanded', false);
            link.html('expand all');
        } else {
            doExpand(link);
            link.data('allexpanded', true);
            link.html('collapse all');
        }
    });

    $("#content_container").delegate(".expand", "click", function(e) {
        e.stopPropagation();
        doToggle($(this));
        return false;
    });

    $('#expand_page').click(function () {
        var link = $(this).find('a');
        if (link.data('allexpanded')) {
            doCollapse($('.collapse'));
            link.data('allexpanded', false);
            link.html('expand all');
        } else {
            doExpand($('.collapse'));
            link.data('allexpanded', true);
            link.html('collapse all');
        }
    });

    var tocUrl = $(".toc_icon a:first").attr('href');
    $(".toc_icon:first").data({
        "tocUrl":tocUrl
    });
    $(".toc_icon a:first").remove();

    //Bind first click on toc_icon to fetch the toc contents.
    //Bind all subsequent clicks to toggle to the TOC.
    $(".toc_ic