title: Fancybox add stylesheet to parent page
body: <p>I have this code to add a stylesheet to a page in a fancybox iframe. Can I do the same to the parent page?</p>
  
  <p>I have tried this but it didn't work...</p>
  
  <p><code>window.parent.changeStyles(stylesheet)</code>;</p>
  
  <p>function changeStyles(styles) {
  $("", { 
                         rel: "stylesheet", 
                         type: "text/css", 
                         href: styles
                      }).appendTo("head"); 
                  };</p>
  
  <pre><code>            $('.change-styles').on('click',function(){                              
                  var stylesheet = $(this).attr('href');
                  changeStyles(stylesheet);
  
  
                  return false
              });
  </code></pre>