toggle works only once

toggle works only once

hello, I am new with jquery. I tried to crate a toggle for change the display of the html from bright to dark when the user want to watcha video. I am doing it by clicking on an image which change when the lights are on and off. It works fine without jquery but later I wanted to add an fade effect show I change the code using jquery but the problem is that works only once (load the age with lights on, click=lights off, click again=lights on, click again=nothing). Can anyone tell me what wring?

here is the code which has the problem:
  1. $(document).ready(function(){
  2.       var shadow = document.getElementById("shadow");
  3.       $("#toggle").click(function () {
  4.              if (shadow.style.display != "block")
  5.                   $(shadow).fadeTo("slow",0.9);
  6.             else
  7.                   $(shadow).fadeTo("slow",0);
  8.        });
  9. });
shadow is the id of an empty div which gets dark.
toggle is the id of the imahe which I am using as toggle.

thanks for any help in advance.