title: Detect if image is dark/light and addClass (dark/light) to parent
body: <p>On this Fiddle, the functions does the job perfectly, but I need to tweak the junction slightly.</p>
  
  <ul>
  <li>the click even needs to be a addClass (dark/light)(true of false) to the parent div.</li>
  <li>If dark addClass Bright.</li>
  <li>If light image addClass dark.</li>
  </ul>
  
  <p>Is there a way to make this function doing what I need?</p>
  
  <pre><code>getImageBrightness(this.src,function(brightness) {
              document.getElementsByTagName('pre')[0].innerHTML = "Brightness: "+brightness;
          });
  </code></pre>
  
  <p>jsfiddle.net/s7Wx2/</p>