title: Stop YouTube video when div is closed with jQuery
body: <p>So I have a pop over div that shows when going to the site with a YouTube video auto playing in there, the problem is, if the box is closed the audio of the video still remains, is there a way to get around this with jQuery? I don't know if there is a way to stop sound from a certain element?</p>
  
  <p>The code is below.</p>
  
  <p>CSS</p>
  
  <pre><code>.full_page_overlay1 {
      width: 100%;
      height: 100%;
      position: fixed;
      top: 0px;
      left: 0px;
      background: #626262;
      opacity: 0.9;
      z-index: 2147483646;
  }
  
  .cart_over1 {
      width: 1024px;
      position: fixed;
      float: left;
      border: 1px solid black;
      box-shadow: 1px 1px 10px black;
      background: white;
      z-index: 2147483647;
      border-radius: 10px;
  }
  
  #close_box1 {
      float: left;
      top: 0px;
      left: 0px;
      display: table-cell;
      vertical-align: middle;
      width: 40px;
      height: 40px;
      font-size: 40px;
      text-align: center;
      color: black;
      text-shadow: 1px 1px 3px black;
      font-weight: bolder;
      cursor: pointer;
      margin-bottom: 10px;
  }
  </code></pre>
  
  <p>HTML/PHP</p>
  
  <pre><code>&lt;?php
  
    if ($_COOKIE['video'] != 'watched') {
  
  $value = "watched";
  
  // send a simple cookie
  setcookie("video",$value,time() + (10 * 365 * 24 * 60 * 60));
  
  ?&gt;
  
     &lt;div class="full_page_overlay1"&gt;&lt;/div&gt;
  
    &lt;div class="container"&gt;
  
    &lt;div class="cart_over1"&gt;
  
        &lt;div id="close_box1"&gt;X&lt;/div&gt;
  
        &lt;iframe width="1024" height="600" src="//www.youtube.com/embed/zDnVDyVYiv8?autoplay=1" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  
    &lt;/div&gt;
        &lt;/div&gt;
        &lt;?php } ?&gt;
  </code></pre>
  
  <p>And the jQuery</p>
  
  <pre><code>$( document ).ready(function() {
      $("#close_box1").click(function(){
      $(".full_page_overlay1").fadeOut();
      $(".cart_over1").fadeOut();
  })
  });
  </code></pre>
  
  <p>Many thanks in advance for your help.</p>