// run through all the links, looking for ones with a class
// of thickbox.  If found, transform the href by appending
// a query string: ?contentOnly=true
// $cmignore
$(document).ready(function() {
    $("a.thickbox[href*='?']").attr("href", function() {
        return $(this).attr("href") + "&contentOnly=true&KeepThis=true&TB_iframe=true";
    });
    $("a.thickbox[href!='?']").attr("href", function() {
        return $(this).attr("href") + "?contentOnly=true";
    });
    $("a.video").attr("href", function() {
        if ($(this).hasClass("thickbox")) {
            return $(this).attr("href") + "?contentOnly=true&video=true&KeepThis=true&TB_iframe=true&width=350&height=300";            
        }
    });
    
    // Since Collage cannot assign classes to links, let's add the
    // class to all links that have an img with src pointing at
    // view video
    $("a > img[src$='products/logos/video-icon.gif']").parent("a").addClass("thickbox").attr("href", function() {
        return $(this).attr("href") + "?contentOnly=true&video=true&KeepThis=true&TB_iframe=true&width=350&height=300";
    });
});
// $/cmignore
