﻿$(document).ready(function() {

    /* Adding a colortip to any tag with a glossary class: */
$(".glossary").colorTip({ color: 'aahae' });

});

/* Defined for internal links*/
$(document).ready(function() {
thickboxInt_init('a.thickboxInt, area.thickboxInt, input.thickboxInt'); //pass where to apply thickbox

});
//add thickbox to href & area elements that have a class of .thickboxInt for internal links
function thickboxInt_init(domChunk) {
    $(domChunk).click(function() {
        var id = 'confirmationDialogInt';
        var url = this.href || this.alt;
        ShowThickbox(url, id);
        return false;
    });
}

/* Defined for external links*/
$(document).ready(function() {
thickboxExt_init('a.thickboxExt, area.thickboxExt, input.thickboxExt, a.external'); //pass where to apply thickbox
});

//add thickbox to href & area elements that have a class of .thickboxExt
function thickboxExt_init(domChunk) {
    $(domChunk).click(function() {
        var id = 'confirmationDialogExt';
        var url = this.href || this.alt;
        ShowThickbox(url, id);
        return false;
    });
}

function OffRamp() {
    //do nothing, the lightbox will take over.   
}

function externalLinks() {
    if (!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for (var i = 0; i < anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") &&
           anchor.getAttribute("rel") == "external")
            anchor.target = "_blank";
    }
}

