$(document).ready(function () {
  $(window).on('resize', loadVideo);
  loadVideo();
});

function loadVideo() {
  var videoWidth = 1280;
  var videoHeight = 720;
  var  video = $(".video video").attr("srcdesk");
  
  $(".video video").html('');

  if ($(window).width() < 600) {
    videoWidth = 600;
    videoHeight = 600;
    video = $(".video video").attr("srcmob");
  }

  $(".video video").attr("width", videoWidth).attr("height", videoHeight).append('<source src="' + video + '" type="video/mp4" >');
}
