title: Fancybox - add class to the title depending on div id
body: <p>I have css classes such as .blue, .red etc that define background colors. I want to add specific class to div containing class 'fancybox-title', depending on the id that belongs to the fancybox</p>
  
  <pre><code>&lt;div class="fancybox-skin"&gt;
      &lt;div class="fancybox-title fancybox-title-inside-wrap"&gt;Welcome&lt;/div&gt;  //here I want to add class, for example '.blue'...
      &lt;div class="fancybox-outer"&gt;
          &lt;div class="fancybox-inner"&gt;
              &lt;div style="display: block;" id="login-register-fancybox"&gt;&lt;/div&gt;  //depending on the ID from this line of code
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've had several attempts inside of:</p>
  
  <pre><code>$('.fancybox').fancybox({
      'beforeLoad': function(){
  
      }
  });
  </code></pre>
  
  <p>including trying to find elements by ID, switches etc, but scripts started to look to big and to messy while not giving me desired result. I believe there is much simpler way to accomplish that, just can't figure it out. Can anyone help?</p>