// Modify any buttons to inject the appropriate markup.
$(document).ready(function() {
    $(".linkButton01").each(function() {
        var htmlText = $(this).html();
        $(this).html('<span>' + htmlText + '</span>');
    })

    $(".linkButton02").each(function() {
        var htmlText = $(this).html();
        $(this).html('<span>' + htmlText + '</span>');
    })

    $(".linkButton03").each(function() {
        var htmlText = $(this).html();
        $(this).html('<span>' + htmlText + '</span>');
    })
});

// Define the footer nav breaks.
$(document).ready(function() {
    $("#footer")
    .find("li:not(:last)")
        .after('<li class="spacer">|</li>')
    .end()
});

// Define the breadcrumb breaks.
$(document).ready(function() {
    $("#body .breadcrumbs")
    .find("li:not(:first):not(:last)")
        .after('<li>&gt;</li>')
    .end()
});

// Define the user profile nav breaks.
$(document).ready(function() {
    $("#header .userdetail ol")
    .find("li:not(:last)")
        .after('<li>-</li>')
    .end()
});

// Fix the default clicks (thanks MS).
$(document).ready(function() {
    var $btn = $(".default_click");
    if ($btn[0] && typeof ($btn[0].click) == 'undefined') {
        $btn[0].click = function() {
            var result = true;
            if ($btn[0].onclick) result = $btn[0].onclick();
            if (typeof (result) == 'undefined' || result) {
                eval($btn[0].getAttribute('href'));
            }
        }
    }
});

