$(document).ready(function() {
   $('a[href="#IntroVideo"]').live("click", function(event) {
      event.preventDefault();
      
      if ($(this).hasClass("NotesWebVideoWelcome")) {
         $.HDYoutube.popupModalYoutube({
            id       : "NotesWebVideoWelcome",
            iframe   : '<iframe width="640" height="390" src="http://www.youtube.com/embed/S9cfiwDTj7Y?rel=0&hd=1&autoplay=1" frameborder="0" allowfullscreen></iframe>'
         });
      }
      
      else if ($(this).hasClass("NotesIphoneVideoWelcome")) {
         $.HDYoutube.popupModalYoutube({
            id       : "NotesIphoneVideoWelcome",
            iframe   : '<iframe width="640" height="510" src="http://www.youtube.com/embed/R3YIpan3L54?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>'
         });
      }
      
      else if ($(this).hasClass("HomesWebVideoOverview")) {
         $.HDYoutube.popupModalYoutube({
            id       : "HomesWebVideoOverview",
            iframe   : '<iframe width="640" height="390" src="http://www.youtube.com/embed/YBPQgAlXRpU?rel=0&hd=1&autoplay=1" frameborder="0" allowfullscreen></iframe>'
         });
      }
      
      else if ($(this).hasClass("HomesIphoneVideoOverview")) {
         $.HDYoutube.popupModalYoutube({
            id       : "HomesIphoneVideoOverview",
            iframe   : '<iframe width="640" height="510" src="http://www.youtube.com/embed/UcyW1hW694c?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>'
         });
      }
      
      else if ($(this).hasClass("BballIphoneVideoWelcome")) {
         $.HDYoutube.popupModalYoutube({
            id       : "BballIphoneVideoWelcome",
            iframe   : '<iframe width="640" height="510" src="http://www.youtube.com/embed/1gCSepMJWGQ?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>'
         });
      }
   });
});

