I have tried different approaches to get this to work. I know I have to wrap the function but can not get it to work. The function is running in a .js file.
http://jsfiddle.net/hookedonweb/yq8Hz/
function showLabel(labelName) {
var labelImgs = jQuery(".content .packaging .labels img");
var focusImg = jQuery("#label_" + labelName);
if (labelImgs.length > 0 && focusImg.length > 0) {
labelImgs.each(function() { jQuery(this).removeClass("active"); });
focusImg.addClass("active");
}
}