
/* start ~/Content/scripts/video.js*/
WL.registerOnloadEvent(function(){VideoUtil.InitVideoModals();VideoUtil.ShowInitialVideo($("#InitialVideoUrl").val())});var VideoUtil={};VideoUtil.ShowVideo=function(b,a,c,d){if(b){var e=new Modal(b,"wlVideoModal "+d);e.PageViewTracked=false;e.OnReady=function(){window.AllowVideoTrack=true;if(a){a.call(this)}VideoUtil.AdjustVideoFrameHeight(this)};e.OnDismiss=function(){window.AllowVideoTrack=false;if(window.s&&s.__wlHostPageName){s.pageName=s.__wlHostPageName}if(c){c.call(this)}};e.ClassName="wlVideoModal "+d;(Modal.Requested=e).Show()}};VideoUtil.SetupVideoLink=function(e,g,h,b,i,a){var f=function(){window.AllowVideoTrack=true;if(h){h.call(this)}VideoUtil.AdjustVideoFrameHeight(this)};var c=function(){window.AllowVideoTrack=false;if(window.s&&s.__wlHostPageName){s.pageName=s.__wlHostPageName}if(b){b.call(this)}};var d={ClassName:"wlVideoModal",OnReady:f,OnDismiss:c};if(i){d.ClassName+=" "+i}if(a){d.PageName=a}Modal.Setup($(e),g,d)};VideoUtil.ShowInitialVideo=function(b,a,c,d){VideoUtil.ShowVideo(b,function(){this.SuppressTrackView=true;this.SuppressTrackExit=false;if(a){a.call(this)}},function(){if(c){c.call(this)}},d)};VideoUtil.GetAjaxUrl=function(a){var b=a.toLowerCase(),c=b.indexOf("/desktop");if(c<0){c=b.indexOf("/online")}if(c<0){c=b.indexOf("/experience")}if(c<0){c=b.indexOf("/campaign")}return"/Ajax"+a.substring(c)};VideoUtil.AdjustVideoFrameHeight=function(f){var g=f.Self.find("#silverlightVideoHost");if(g.length>0){var b=false;if(navigator.plugins&&navigator.plugins.length>0){for(var a=navigator.plugins.length-1;a>-1;a--){b=navigator.plugins[a].name.toLowerCase().indexOf("silverlight")>-1;if(b){break}}}else{if(window.ActiveXObject){try{var c=new ActiveXObject("AgControl.AgControl");if(c){b=true}delete c}catch(d){}}}if(!b){g.add(".wlVideoModal .modalDetail .content").css("height","480px")}}};VideoUtil.InitVideoModals=function(){$("#wlHome #RediscoverHotmail .promotion a, #wlHome #OnlineUpdates .promotion a, #productInDepth #heroSidebar a.videoCta, #productInDepth #heroSidebar a.videoCtaThumb, a.video-link").each(function(){var b=$(this),a=VideoUtil.GetAjaxUrl(this.href);VideoUtil.SetupVideoLink(b,a,null,null,null,b.attr("title"))})};
/* end ~/Content/scripts/video.js */
/* start ~/Content/scripts/Tutorial.js*/
WL.registerOnloadEvent(function(){TutorialUtil.InitializeTutorialModalLinks();TutorialUtil.ShowInitialTutorial()});var TutorialUtil={};TutorialUtil.GetAjaxUrl=function(a){var b="/Ajax"+a.substring(a.toLowerCase().indexOf("/tutorial")),c=b.toLowerCase().indexOf("/stepbystep");if(c>-1){b=b.substring(0,c)}return b};TutorialUtil.ReplaceModalContents=function(b,c,a){b.Clear();b.Self.attr("id",c);b.InsertContentIntoFrame(a);TutorialUtil.InitializeOnModalLinks(b,"a.videoCta");b.Center();Cufon.refresh()};TutorialUtil.InitializeOnModalLinks=function(b,a){b.Self.find(a).click(function(d){d.preventDefault();var c=TutorialUtil.GetAjaxUrl(this.href),f=$(this).attr("tutorial"),g=Modal.Cache[c];if(g){TutorialUtil.ReplaceModalContents(b,f,g)}else{$.ajax({dataType:"html",url:c,success:function(e){if(e.length>0){Modal.Cache[c]=e;TutorialUtil.ReplaceModalContents(b,f,e)}},error:function(){}})}if(d.target.className.indexOf("video")>-1){WL.eventHandler.trigger("scModalTutorialVideo",d.target)}else{WL.eventHandler.trigger("scModalStepByStep",d.target)}})};TutorialUtil.GetModalReadyCallback=function(b,c,a){return function(){this.Self.attr("id",b);var d;if(a){d=$(a).attr("product")}if(!d){d=$("#ProductID").val()}this.PageName=d+" Tutorial: "+b+(c?" Video":"");TutorialUtil.InitializeOnModalLinks(this,"a.videoCta")}};TutorialUtil.InitializeTutorialModalLinks=function(){$("a.howToCta, a.videoCta[tutorial]").each(function(b){var d=$(this),c=TutorialUtil.GetAjaxUrl(this.href),e=d.attr("tutorial"),a=TutorialUtil.GetModalReadyCallback(e,d.hasClass("videoCta"),d);VideoUtil.SetupVideoLink(d,c,a,null,"tutorial")})};TutorialUtil.ShowInitialTutorial=function(){var c=$("#InitialTutorialID").val(),d=$("#InitialTutorialUrl").val();if(c&&d){var b=d.toLowerCase().indexOf("video")>-1;var a=TutorialUtil.GetModalReadyCallback(c,b);VideoUtil.ShowInitialVideo(d,a,null,"tutorial")}};
/* end ~/Content/scripts/Tutorial.js */