var AMPlayer=function(){function i(){n.addEventListener(amp.eventName.play,r.bind(this))}function r(){$("#recommendDiv").addClass("displayNone");$("#basicsDiv").addClass("displayNone");$("#basicsRecommendDiv").addClass("displayNone")}function u(){n.dispose()}function f(){return n.duration()}function e(){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 o(){return n.currentTime()}function s(t){return n.currentTime(t)}function h(t,i){n.addEventListener(t,i)}var n=null,t=function(t,r,u,f,e,o,s,h,c,l){h===!0?(r.poster="",n=amp(t,r)):(n=amp(t,r),r.autoplay===!0&&n.autoplay(!0),n.src([{src:u,type:f,protectionInfo:o,streamingFormats:s}],e));l==="1080p"&&n.addEventListener(amp.eventName.error,function(){n.src().indexOf("amsmediusw-ak.studios.ms")>-1&&(u=u.replace("https://amsmediusw-ak.studios.ms","https://amsmediuse-ak.studios.ms"),n=amp(t,r),n.src([{src:u,type:f,protectionInfo:o,streamingFormats:s}],e))});i()};return{render:t,end:u,getShareOptions:e,getCurrentTime:o,setCurrentTime:s,addEventListener:h,getTotalDuration:f}}(),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())})})