Creating an Embed Youtube and Vimeo button
===

I am trying to create a button that when clicked will convert a vimeo url, or youtube url to a piece of code that has the video embedded and ready to go. I'm looking through the javascript and it's just blowing my mind. Sorry this is a bit noobish but can anyone help point me in the right direction?

Thanks!