title: Embed youtube videos using oembed
body: <p>I want to use oembed to get the embed code from youtube links with jQuery:</p>
  
  <pre><code>var url = "http://www.youtube.com/watch?v=iwGFalTRHDA";
  url = encodeURIComponent(url);
  
  $.getJSON('http://youtube.com/oembed?url='+url+'&amp;format=json', function(data) {
  console.log(data);
  });
  </code></pre>
  
  <p>Well I don't get any data.</p>
  
  <p>Funny thing is, that if I browse to the url I get the right response:</p>
  
  <pre><code>http://www.youtube.com/oembed?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiwGFalTRHDA&amp;format=json` 
  </code></pre>
  
  <p>leads me to</p>
  
  <pre><code>{
  provider_url: "http://www.youtube.com/"
  title: "Trololo"
  html: "&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/iwGFalTRHDA?version=3"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/iwGFalTRHDA?version=3" type="application/x-shockwave-flash" width="425" height="344" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;"
  author_name: "KamoKatt"
  height: 344
  thumbnail_width: 480
  width: 425
  version: "1.0"
  author_url: "http://www.youtube.com/user/KamoKatt"
  provider_name: "YouTube"
  thumbnail_url: "http://i2.ytimg.com/vi/iwGFalTRHDA/hqdefault.jpg"
  type: "video"
  thumbnail_height: 360
  }
  </code></pre>
  
  <p>I also used the jquery oembed plugin, but the onError option is always thrown, also if the request was successful. </p>
  
  <p>I'm really looking forward for some ideas...</p>