function stopBackgroundVideo() {
$('video').prop('loop', false);
$(document).ready(stopBackgroundVideo);
$(window).load(stopBackgroundVideo);
stopBackgroundVideo();
setTimeout(function(){
jQuery('video.x-mejs.has-stack-styles').on('ended', function() {
jQuery(this), [^^0^^].pause();
});
}, 5000);
}