function cosbitPop() {
  var attrs = $(this).rel.split(":");
  var sFeatures = attrs[1];
  window.open(this.href, attrs.length > 2 ? attrs[2] : String((new Date()).getTime()), sFeatures);
  return false;
}

function cosbitPopSetup() {
  $("a[@href][@rel]").each(function() {
    var r = this.rel;
    if (r.indexOf("_cosbitPop") == 0)
      $(this).click(cosbitPop);
    else if (r.indexOf("_") == 0)
      this.target = r;
  });
}

$(cosbitPopSetup);

