/*
 *   Find all the links with class 'thickbox-nodebody'
 *   and change their href attribute into 'thickbox/node/x' links
 *   so they'll open in a thickbox
 */

if (Drupal.jsEnabled) {
  $(document).ready(function() {
    $('a.thickbox-nodebody').each(function() {
      // jpoesen 23/10/2008
      // we switched to url aliases, so we can no longer filter nid from path (/node/123)
      // but need to filter nid from link id attrib which is in the form of xyz_nid (and xyz is of no importance)
      
      //var nid = getNidInPath(this.href);
      attrib_id = $(this).attr('id').split("_");
      var nid = attrib_id[1];

      this.href = vepass_product_url.nodebody + '/' + nid;
    });
    tb_init('a.thickbox-nodebody');
  });
}