// breadcrumbs.js

// Modify the text of the non-active breadcrumbs
// $('.wh_breadcrumb ol li').replaceWith("...");
// if (!('.wh_breadcrumb ol li').hasClass("active")){
//     replacewith
// }

listItems = $(".wh_breadcrumb").find("li").each(function(){
    if ((!$(this).hasClass("active")) && ($(this).text() != "Home")) {

        var title = $(this).find('a').text();
        var ShortTitle = "...";
        var MyHref = $(this).find("a").attr('href');
        console.log(MyHref);
        $(this).replaceWith('<li><div class="topicref"><div class="title">' + 
            '<a href="' + MyHref + '">' + 
            ShortTitle + '</a>' +
            '<div class="wh-tooltip">' + title + 
            '</div>' +
            '</div></div></li>');
    }
});


// $('.wh_breadcrumb li:not(:last-of-type) li.not('li:first')).replaceWith("...");