title: onReady not being called
body: <pre><code>    var player = null;
  
  function LoadYouTubeIframeAPI() {
    var scriptElement = document.createElement("script");
    scriptElement.src = "http://www.youtube.com/iframe_api";
    var firstScriptElement = document.getElementsByTagName("script")[0];
    firstScriptElement.parentNode.insertBefore(scriptElement, firstScriptElement);
  }
  
  function onYouTubeIframeAPIReady() {
    var playerParams = {
      playerVars: {
        "enablejsapi": 1,
        "origin": document.domain,
        "rel": 0
      },
      events: {
        "onReady": onPlayerReady,
        "onError": onPlayerError,
        "onStateChange": onPlayerStateChange
      }
    };
    player = new YT.Player("player", playerParams);
  }
  
  function onPlayerReady(event) {
    alert("ready")
  }
  
  function onPlayerError(event) {}
  
  function onPlayerStateChange(event) {}
  </code></pre>
  
  <p>Here's my full code.</p>
  
  <pre><code>function onPlayerReady(event) {
      alert("ready")
  }
  </code></pre>
  
  <p>Is never getting fired for some reason. Can anyone help with this? I just can't get it to work for hours.. Google is not helping me at all.</p>