var AMPlayer=function(){function r(){n.addEventListener(amp.eventName.play,u.bind(this));$("video").attr("disablePictureInPicture","true")}function u(){$("#recommendDiv").addClass("displayNone");$("#basicsDiv").addClass("displayNone");$("#basicsRecommendDiv").addClass("displayNone");$("video").attr("disablePictureInPicture","true");$(".amp-controlbaricons-left").attr("style","padding: 2px 0px 0px 2px;");$(".amp-controlbaricons-right").attr("style","padding-right: 2px;");$(".vjs-play-control").focus()}function f(){n.dispose()}function e(){return n.duration()}function o(){var n=new Amp.Plugin.Share.ShareOptions;return n.socialShare.shareIcons.push(Amp.Plugin.Share.SocialShareIcon.getPredefinedShareIcon(0)),n.socialShare.shareIcons.push(Amp.Plugin.Share.SocialShareIcon.getPredefinedShareIcon(1)),n.socialShare.shareIcons.push(Amp.Plugin.Share.SocialShareIcon.getPredefinedShareIcon(2)),n.socialShare.shareIcons.push(Amp.Plugin.Share.SocialShareIcon.getPredefinedShareIcon(3)),n}function s(){return n.currentTime()}function h(t){return n.currentTime(t)}function c(t,i){n.addEventListener(t,i)}var n=null,t=function(t,u,f,e,o,s,h,c,l,a){c===!0?(u.poster="",n=amp(t,u)):(n=amp(t,u),u.autoplay===!0&&n.autoplay(!0),n.src([{src:f,type:e,protectionInfo:s,streamingFormats:h}],o),u.mute===!0&&typeof amp!="undefined"&&amp!=null&&amp.players.azuremediaplayer.muted(!0));a==="1080p"&&n.addEventListener(amp.eventName.error,i);r()},i=function(){n.src().indexOf("amsmedius.event.microsoft.com")>-1&&(source=source.replace("https://amsmedius.event.microsoft.com","https://amsmediusw-ak.studios.ms"),n=amp(id,myOptions),n.src([{src:source,type:type_of_video,protectionInfo:protectionInfo,streamingFormats:streamingFormats}],captions));n.src().indexOf("amsmediusw-ak.studios.ms")>-1&&(source=source.replace("https://amsmediusw-ak.studios.ms","https://amsmediuse-ak.studios.ms"),n=amp(id,myOptions),n.src([{src:source,type:type_of_video,protectionInfo:protectionInfo,streamingFormats:streamingFormats}],captions));n.src().indexOf("https://amsmediuse-ak.studios.ms")>-1&&(source=source.replace("https://amsmediuse-ak.studios.ms","https://vznmsmedius.event.microsoft.com"),n=amp(id,myOptions),n.src([{src:source,type:type_of_video,protectionInfo:protectionInfo,streamingFormats:streamingFormats}],captions))};return{render:t,end:f,getShareOptions:o,getCurrentTime:s,setCurrentTime:h,addEventListener:c,getTotalDuration:e}}(),UIItems=function(){function i(){n();t()}function n(){$(document).on("shown.bs.dropdown",function(n){var t=$(n.target);setTimeout(function(){t.find(".dropdown-menu li:first-child a").focus()},10)})}function t(){$(document).on("hidden.bs.dropdown",function(n){var t=$(n.target);t.find(".dropdown-toggle").focus()})}function r(){$(".modal-open").click(function(){$(".modal-body").append("<video id='VideoTagForModal' class='azuremediaplayer amp-default-skin modal_video'><\/video>");var n=$(this).data("id");AMPlayer.render("VideoTagForModal",{autoplay:!0,controls:!0,nativeControlsForTouch:!1},n,!0)})}function u(){$("#VideoModal").on("hidden.bs.modal",function(){AMPlayer.end()})}function f(){var n=100,i="...",t="Show more >",r="Show less";$(".more").each(function(){var r=$(this).html();if(r.length>n){var u=r.substr(0,n),f=r.substr(n,r.length-n),e=u+'<span class="moreellipses">'+i+'&nbsp;<\/span><span class="morecontent"><span>'+f+'<\/span>&nbsp;&nbsp;<a href="" class="morelink show-more-link">'+t+"<\/a><\/span>";$(this).html(e)}});$(".morelink").click(function(){return $(this).hasClass("less")?($(this).removeClass("less"),$(this).html(t)):($(this).addClass("less"),$(this).html(r)),$(this).parent().prev().toggle(),$(this).prev().toggle(),!1})}return{opendd:n,closedd:t,openPopup:r,closePopup:u,EllipsesText:f,init:i}}(),displayStatsInView=function(){function n(n){for(var c=Object.keys(n).length,u=["Property","Value"],t=document.createElement("table"),f=t.insertRow(-1),e,o,r,h,s,i=0;i<u.length;i++)e=document.createElement("th"),e.innerHTML=u[i],f.appendChild(e);for(o in n)for(f=t.insertRow(-1),r=0;r<u.length;r++)h=f.insertCell(-1),h.innerHTML=r===0?o:n[o];s=document.getElementById("showStatsData");s.innerHTML="";t.className="table-striped table-hover table-bordered";s.appendChild(t)}return{CreateTableFromJSON:n}}();$(document).on("click","a.dropdown-toggle",function(){var n=$(this).parent().closest("li").attr("class");n.indexOf("open")>=0?$(this).attr("aria-expanded","false"):$(this).attr("aria-expanded","true")});$(document).ready(function(){$(".dropdown-menu").keydown(function(n){n.which==27&&$(this).prev().attr("aria-expanded","false")});$(document).on("keydown",".dropdown-menu:focusable:first",function(n){n.which==9&&n.shiftKey&&$(this).parents(".dropdown").removeClass("open")});$(document).on("keydown",".dropdown-menu:focusable:last",function(n){n.which==9&&$(this).parents(".dropdown").removeClass("open")});$(".dropdown-toggle").keydown(function(n){n.which==32&&($(this).parents().find("li.dropdown").each(function(n,t){var i=$(t).attr("class");i.indexOf("open")>0&&$(t).removeClass("open")}),$(this).parent().addClass("open"))});$("#editCss").keydown(function(){(event.which==13||event.which==32)&&($("#editCss").trigger("click"),$(this).addClass("last-focussed"))});$(document).on("click",".close,.saveChangesButton",function(){$(".last-focussed").focus();$(".last-focussed").removeClass("last-focussed")});$("#editModal").keydown(function(n){n.which==27&&setTimeout(function(){$("#editCss").focus();n.preventDefault();n.stopPropagation()},500)});$("#save").keydown(function(n){n.which==9&&($("#modalcloseId").focus(),n.preventDefault());n.which==9&&n.shiftKey&&($("#editText").focus(),n.preventDefault())});$("#modalcloseId").keydown(function(n){n.which==9&&n.shiftKey&&($("#save").focus(),n.preventDefault())})})