Function to show a content

Function to show a content

hi, i've a function that when i click on a link a div shows up, and it works nice, but when i click on the div itself the div closes up, and other "bug" is, that if i have 2 or more divs if i click on one link and click on other link the div's stays visible, how can i solve this?

jQuery.fn.DivMenu = function(opcoes){
   /**
    * Valores de defeito.
    **/
   var variaveis = { 
      'display'     : 'none',
      'position'    : 'absolute',
      'background'  : '#fff',
       'border'      : '1px solid #cecece',
       'font-family' : 'Verdana, Arial, Helvetica, sans-serif',
      'font-size'   : '11px; padding: 5px; z-index: 999999'
   }; 
   var opcoes = $.extend({}, variaveis, opcoes);
   /**   end   **/

   /**
    *
    **/
   return this.each(function(){
      /**
       * Declarar variaveis.
       **/
      var element = this;
      var offset = $(element).offset();
      var left = offset.left;
      var top = offset.top;
      var currentId = $(this).attr('id');
      var divDados = currentId + '-dados';
      /**   end   **/
   
      /**
       *
       **/
      $(element).click(function(){ $('#' + divDados).hide(); $(this).next().show(); return false; });
      $(document.body).click(function(){ $('#' + divDados).hide(); });
      /**   end   **/
   
      /**
       *
       **/
      $('#' + divDados).css({
         'left'        : left + 'px',
         'top'         : top + 15 + 'px',
         'display'     : opcoes['display'],
         'position'    : opcoes['position'],
         'background'  : opcoes['background'],
         'border'      : opcoes['border'],
         'font-family' : opcoes['font-family'],
         'font-size'   : opcoes['font_size']
      });
      /**   end   **/
   });
   /**   end   **/
};


Btw, this is my first function, so i am a very big big noob hehe
And english is not my primary language, so if you don't understand anything just let me know, i will try to explain better