function toggleMute(el) {
    el.muted = !(el.muted);
  }
  
  window.onload = function() {
    document.getElementById("vid").onmouseover = function() {
      toggleMute(this);
    };
    document.getElementById("vid").onmouseout = function() {
      toggleMute(this)
    };
  }