Problem with click in img in front a div

Problem with click in img in front a div

Hi friends!

I'm developing a website with a image gallery build manually by myself.

The problem is when I do a click in the img (class galeria) it's just faded, but, I created the event for just the click in two div's (id subGaleria and id overley), but not for the img (class galeria).

I appreciate a help of you.

I show the code of events and html below.

Thanks!

JQUERY:
  1.              //Quando houver um click no body
  2.             $("#overlay, div#galeria").click(function() {

  3.                 //Oculta a div com o overlay e com a galeria
  4.                 $("#overlay, div#galeria, div#galMiniFotos").fadeOut("low");

  5.                 //Permite a rolagem (scroll) na página
  6.                 $("html, body").css("overflow", "auto");
  7.                 
  8.             });

CSS:
  1. div#galeria{
  2.     position:absolute;
  3.     width: 100%;
  4.     height: 85%;
  5.     display:none;
  6.     top:5%;
  7.     z-index:101;
  8. }

  9. div#overlay{
  10.     background-color:#000;
  11.     opacity:0.8;
  12.     filter:alpha(opacity=80);
  13.     display:none;
  14.     position:fixed;
  15.     top:0px;
  16.     bottom:0px;
  17.     left:0px;
  18.     right:0px;
  19.     z-index:100;
  20. }

  21. img.galeria{
  22.     max-height: 100%;
  23.     max-width: 90%;
  24.     border:2px solid #000;
  25.     -moz-box-shadow: 0 2px 5px #333;
  26.     -webkit-box-shadow: 0 2px 5px #333;
  27.     z-index: 102;
  28. }

HTML:
  1. <div id="overlay"></div>
    <div id="galeria">
          <div id="subGaleria">
                <img class='galeria' src="pictures/1.png" />
          </div>
    </div>