YouTube iFrame Z-Index Issue

To solve issue of YouTube video appearing over other page elements add the following script:

/* setYouTubeWMode
* ===============
* Appends YouTube URL with 'wmode=opaque' to enforce player z-index.
* Source: https://css-tricks.com/snippets/jquery/better-broken-image-handling/
*/
function setYouTubeWMode() {
$('iframe').each(function(){
var url = $(this).attr("src");
var char = "?";
if(url.indexOf("?") != -1){
var char = "&";
}
$(this).attr("src",url+char+"wmode=opaque");
});
}

Source:
YouTube Shortcode Handler
Add wmode to fix youtube iframe zindex