' ); } } function createYtPlayer( ytVideoId ) { resetIframeToDiv(); ytPlayer = new YT.Player('video-youtube-86998-0', { height: origVideoH, width: origVideoW, rel: 0, modestbranding: 1, autoplay: 0, videoId: ytVideoId, events: { 'onReady': onPlayerReady } }); } function loadYtApi( ytVideoId ) { var tag = document.createElement('script'); tag.src = "http://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); window.onYouTubeIframeAPIReady = function() { createYtPlayer( ytVideoId ); }; } var startVideo = function( ytVideoId ) { // loadVideoById doesn't work properly on iOS //if ( ytPlayer ) { // ytPlayer.loadVideoById( ytVideoId ); //} //else if ( window.YT && window.YT.Player ) { if ( window.YT && window.YT.P…