// Video playback
function playVideo(vid_url,id){
   $(function() {
       flowplayer(id+"_player", {src: 'https://www.matcharesident.com/js/flowplayer/flowplayer.commercial-3.2.7.swf', wmode: 'transparent'}, {
       key: '#@ef43f38ea468d8424e4',
       onLoad: function() {
         this.setVolume(100);
       },
       plugins: { 
         // disable autoloading of the controlbar plugin 
         controls: null 
      }, 
       clip: {
         autoPlay: false,
         autoBuffering: true
       },
       playlist: [
         {url: vid_url}
       ]
       });
   });
   /**
  var ua = navigator.userAgent;
  if (
     (ua.indexOf('iPhone') != -1) || 
     (ua.indexOf('iPod') != -1) || 
     (ua.indexOf('iPad') != -1) ||
     ((ua.indexOf('AppleWebKit') != -1) && (ua.indexOf('Mobile') != -1)) || 
     ((ua.indexOf('AppleWebKit') != -1) && (ua.indexOf('webOS') != -1))
     ) {
    document.getElementById('video_html5').style.display = '';
  } else {
    document.getElementById('video_flash').style.display = '';
  }
  **/
}
// New Window OPener
function openProgramSite(url){
   
   var isConfirmed=confirm('Warning: The information displayed on the residency program\'s website maybe outdated! Match A Resident\'s database is updated by direct residency program input and through phone/email verification to assure its accuracy.)');
   if(isConfirmed){
    window.open(url=url);
   }
}

