Help with custom jQuery function

Help with custom jQuery function

I've been trying to modify an existing tooltip script to activate on click instead of mouse over, that way the user can click on any links and such inside of the tooltip. I call it a click box.

The code itself works it's just that when i try to put it in a jQuery function, it no longer works.

Maybe you could help
  1. jQuery.fn.clickBox = function(place) {
           var originalTitle;
           var tooltipOn;
          
           $("#"+place).bind({
                  click: function(event){
                            alert("asd");
                            if(tooltipOn == true){
                                  tooltipOn = false;
                                  $("#"+place).attr("title", originalTitle);
                              $("#"+place).next("#tooltip").remove();
                            } else {
                                  tooltipOn = true;
                              $("#"+place).after('<div id="tooltip" class="tooltip"></div>');
                              originalTitle = $("#"+place).attr("title");
                              var title = new Array();
                              var title = originalTitle.split("~");
                              $("#"+place).next("#tooltip").css({
                                      position: "absolute",
                                      left: event.pageX + 20,
                                      top: event.pageY + 10,
                                      opacity: 0.90
                              }).html("<a href='#' class='closeButton' id='closeButton'>X</a><br /><h3>"+title[0]+"</h3>"+title[1]).fadeIn(200);       
                             $("#"+place).attr("title", "");
                          }
                  }          
            });
            $('#closeButton').live('click', function() {
                  tooltipOn = false;
                    $("#"+place).attr("title", originalTitle);
                  $("#"+place).next("#tooltip").remove();
            });
           
            $('#tooltip').live('mouseleave', function() {
                  timer = setTimeout(function(){
                      $("#"+place).attr("title", originalTitle);
                      $("#"+place).next("#tooltip").fadeOut("fast");
                       tooltipOn = false;
                   }, 500);
            });
            $('#tooltip').live('mouseenter', function() {
                clearTimeout(timer);
            });
    }














































This is how I call it:
  1. $().clickBox("place");
    $().clickBox("place2");

This is the html:
  1. <a href="#" id="place" title="Hello~Blah!">Lori</a> ipsum doris <a href="#" id="place2" title="Hello~More Stuff!">
    situm</a>