function init() {
  //Should only run in IE9
  if (ie9_in_standards_mode) {    
  
    var videos = document.querySelectorAll( 'div.video' ),
    videosLength = videos.length;
  
    for( var i=0; i < videosLength; i++ ) {
      var root = videos[i];
      video = root.querySelector( 'video' ),
      play = document.createElement( 'button' ),
      play.className = 'video-button video-play';
      play.innerText = play.title = 'Play';
      play.onclick = function() {
        if( video.paused ) {
          video.play();
          root.className += ' video-on';
          play.className += ' video-play-on';
          play.innerText = play.title = 'Pause';
          play.className = play.className.replace ( ' video-play-on', ' video-play-off' );
        } else {
          video.pause();
          play.className = play.className.replace( ' video-play-on', ' video-play-off' );
        }
      }
      root.appendChild( play );
    }
  }
}

function isIE9Std() {
  var a;
  try{var b=arguments.caller.length;a=0;}catch(e){a=1;}
  return((document.all&&a)==1);
}

var ie9_in_standards_mode = isIE9Std();
window.onload = init;
