title: How to code a custom button that will show youtube iframe, seek to start of video & then play
body: <p>I'm currently making a movie site that has a main splash screen with a "play trailer button".</p>
  
  <p>When the play trailer button is pressed I would like the iframe to be shown &amp; the video to  to be played.  </p>
  
  <p>I also need a close button that will pause the video, return to the beginning of the video and then hide the div.</p>
  
  <pre><code>&lt;!--hidden by default--&gt;
  &lt;iframe class="player"&gt;player goes here&lt;/iframe&gt;
  
  &lt;!--shows 'player' and initiates start--&gt;
  &lt;div id="play_button"&gt;Play&lt;/div&gt;
  
  &lt;!--stops the video, returns to the start and hides the 'player'--&gt;
  &lt;div id="close_button"&gt;Close&lt;/div&gt;
  </code></pre>
  
  <p>I can easily manipulate the css for the video itself however I'm having difficulty using the youtube api.</p>
  
  <p>Any help would be appreciated :)</p>