Index: hovertip.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hovertip/hovertip.js,v
retrieving revision 1.1
diff -u -u -F^f -r1.1 hovertip.js
--- hovertip.js	15 Jan 2007 02:29:58 -0000	1.1
+++ hovertip.js	20 Feb 2007 14:59:34 -0000
@@ -9,9 +9,9 @@
  *  Requires jQuery.js.  <http://jquery.com>, 
  *  which may be distributed under a different licence.
  *  
- *  $Date: 2007/01/15 02:29:58 $
+ *  $Date: 2006-09-15 12:49:19 -0700 (Fri, 15 Sep 2006) $
  *  $Rev: $
- *  $Id: hovertip.js,v 1.1 2007/01/15 02:29:58 yogadex Exp $
+ *  $Id:$
  *  
  *  This plugin helps you create tooltips.  It supports:
  *  
@@ -153,7 +153,12 @@ function hovertipMouseXY(e) {
  * <span>target term</span><span class="hovertip">tooltip text</span>
  */
 targetSelectByPrevious = function(el, config) {
-  return $(el.previousSibling);
+  sibling = el.previousSibling;
+  // If the previous sibling is not an element, keep looking
+  while (sibling && sibling.nodeType != 1)
+    sibling = sibling.previousSibling;
+    
+  return $(sibling);
 }
 
 /**
@@ -423,6 +428,19 @@ function hovertipInit() {
                                        hovertipPrepare,
                                        hovertipTargetPrepare);
   }, 0);
+
+  /**
+   * To enable this style of markup (id on target):
+   * <span>target</span>...
+   * <div class="hovertip">blah blah</div>
+   */
+  window.setTimeout(function() {
+    $(hovertipSelect).hovertipActivate(hovertipConfig,
+                                       targetSelectByPrevious,
+                                       hovertipPrepare,
+                                       hovertipTargetPrepare);
+  }, 0);
+
   
   /**
    * This next section enables this style of markup:
