
/* start ~/Content/scripts/jcarousellite.js*/
(function(d){d.fn.jCarouselLite=function(e){e=d.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},e||{});return this.each(function(){var j=false,m=e.vertical?"top":"left",f=e.vertical?"height":"width";var u=d(this),s=u.children("ul"),l=s.children("li"),r=l.size(),i=e.visible;if(e.circular){s.prepend(l.slice(r-i-1+1).clone()).append(l.slice(0,i).clone());e.start+=i}var h=s.children("li"),g=h.size(),o=e.start;u.css("visibility","visible");h.css({overflow:"hidden","float":e.vertical?"none":"left"});s.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});u.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var k=e.vertical?a(h):c(h);var n=k*g;var t=k*i;h.css({width:h.width(),height:h.height()});s.css(f,n+"px").css(m,-(o*k));u.css(f,t+"px");if(e.btnPrev){d(e.btnPrev).click(function(){return q(o-e.scroll)})}if(e.btnNext){d(e.btnNext).click(function(){return q(o+e.scroll)})}if(e.btnGo){d.each(e.btnGo,function(v,w){d(w).click(function(){return q(e.circular?e.visible+v:v)})})}if(e.mouseWheel&&u.mousewheel){u.mousewheel(function(w,v){return v>0?q(o-e.scroll):q(o+e.scroll)})}if(e.auto){setInterval(function(){q(o+e.scroll)},e.auto+e.speed)}function p(){return h.slice(o).slice(0,i)}function q(v){if(!j){if(e.beforeStart){e.beforeStart.call(this,p())}if(e.circular){if(v<=e.start-i-1){s.css(m,-((g-(i*2))*k)+"px");o=v==e.start-i-1?g-(i*2)-1:g-(i*2)-e.scroll}else{if(v>=g-i+1){s.css(m,-((i)*k)+"px");o=v==g-i+1?i+1:i+e.scroll}else{o=v}}}else{if(v<0||v>g-i){return}else{o=v}}j=true;s.animate(m=="left"?{left:-(o*k)}:{top:-(o*k)},e.speed,e.easing,function(){if(e.afterEnd){e.afterEnd.call(this,p())}j=false});if(!e.circular){d(e.btnPrev+","+e.btnNext).removeClass("disabled");d((o-e.scroll<0&&e.btnPrev)||(o+e.scroll>g-i&&e.btnNext)||[]).addClass("disabled")}}return false}})};function b(e,f){return parseInt(d.css(e[0],f))||0}function c(e){return e[0].offsetWidth+b(e,"marginLeft")+b(e,"marginRight")}function a(e){return e[0].offsetHeight+b(e,"marginTop")+b(e,"marginBottom")}})(jQuery);
/* end ~/Content/scripts/jcarousellite.js */
/* start ~/Content/scripts/scroller.js*/
(function(){$("#carousel").prepend('<a class="prev" title="View more products">View more products</a>');$("#carousel").append('<a class="next" title="View more products">View more products</a>');$(".productScroller").jCarouselLite({btnNext:".next",btnPrev:".prev",visible:9,scroll:1,circular:true,start:4,afterEnd:function(){EmbeddedTooltip.Setup("#carousel .tooltipContainer")}});$(".explore").bind("click",function(){window.location=$(this).find("a.cta").attr("href")});if($.browser.msie&&parseInt($.browser.version)<7){$("#carousel a.next, #carousel a.prev").bind("mouseover",function(){$btn=$(this);if(!$btn.is(".disabled")){if($btn.is(".prev")){$btn.addClass("prevHover")}else{if($btn.is(".next")){$btn.addClass("nextHover")}}}});$("#carousel a.next, #carousel a.prev").bind("mouseout",function(){$(this).removeClass("prevHover").removeClass("nextHover")})}})();
/* end ~/Content/scripts/scroller.js */
/* start ~/Content/scripts/cycler.js*/
function CyclerTab(a){this.Self=$(a)}CyclerTab.prototype.IsHidden=false;CyclerTab.prototype.Self=undefined;CyclerTab.prototype.Parent=undefined;CyclerTab.prototype.AnimationDuration=500;CyclerTab.prototype.LockInPlace=function(a,b){if(isNaN(a)){a=0}if(isNaN(b)){b=0}this.Self.css({display:"block",position:"absolute",top:a+"px",left:b+"px"});return this};CyclerTab.prototype.MoveTo=function(c,d,a){var b={};if(!isNaN(c)){b.top=c+"px"}if(!isNaN(d)){b.left=d+"px"}this.Self.animate(b,this.AnimationDuration,"swing",a);return this};CyclerTab.prototype.MoveToAndFadeOut=function(c,e,a){var b={opacity:"0%"};if(!isNaN(c)){b.top=c+"px"}if(!isNaN(e)){b.left=e+"px"}var d=this;this.Self.animate(b,this.AnimationDuration,"swing",function(){d.Self.css("opacity",null);if(a){a.call(d)}});return this};CyclerTab.prototype.AnimateShow=function(b){var a=this.Parent.height();this.LockInPlace(a,0).MoveTo(0,undefined,b)};CyclerTab.prototype.AnimateHide=function(c){var a=this.Parent.height(),b=this;this.LockInPlace(0,0).MoveToAndFadeOut(-a,undefined,function(){b.Self.hide();if(c){c.call(b)}})};CyclerTab.prototype.Show=function(b,a){if(this.IsHidden){if(b){this.Self.show();if(a){a.call(this)}}else{this.AnimateShow(a)}this.IsHidden=false}else{if(a){a.call(this)}}};CyclerTab.prototype.Hide=function(b,a){if(!this.IsHidden){if(b){this.Self.hide();if(a){a.call(this)}}else{this.AnimateHide(a)}this.IsHidden=true}else{if(a){a.call(this)}}};function CyclerHorizSlideTab(a){CyclerTab.call(this,a)}CyclerHorizSlideTab.prototype=new CyclerTab;CyclerHorizSlideTab.prototype.AnimateShow=function(b){var a=this.Parent.width();this.LockInPlace(0,a).MoveTo(undefined,0,b)};CyclerHorizSlideTab.prototype.AnimateHide=function(c){var b=this.Parent.width(),a=this;this.LockInPlace(0,0).MoveToAndFadeOut(undefined,-b,function(){a.Self.hide();if(c){c.call(a)}})};function CyclerScissorSlideTab(a){CyclerTab.call(this,a)}CyclerScissorSlideTab.prototype=new CyclerTab;CyclerScissorSlideTab.prototype.AnimateShow=function(b){var a=this.Parent.height();this.LockInPlace(a,0).MoveTo(0,undefined,b)};CyclerScissorSlideTab.prototype.AnimateHide=function(c){var a=this.Parent.height(),b=this;this.LockInPlace(0,0).MoveToAndFadeOut(a,undefined,function(){b.Self.hide();if(c){c.call(b)}})};function CyclerSplitSlideTab(a){CyclerTab.call(this,a)}CyclerSplitSlideTab.prototype=new CyclerTab;CyclerSplitSlideTab.prototype.SplitPaneSelector=undefined;CyclerSplitSlideTab.prototype.SplitPane=undefined;CyclerSplitSlideTab.prototype.AnimateShow=function(a){if(!this.SplitPane&&this.SplitPaneSelector){this.SplitPane=this.Self.find(this.SplitPaneSelector)}CyclerTab.prototype.AnimateShow.call(this);if(this.SplitPane){this.SplitPane.css({display:"block",position:"absolute",top:-(2*this.Parent.height())+"px",left:"0px"}).animate({top:"0px"},this.AnimationDuration,"swing",a)}};CyclerSplitSlideTab.prototype.AnimateHide=function(a){if(!this.SplitPane&&this.SplitPaneSelector){this.SplitPane=this.Self.find(this.SplitPaneSelector)}CyclerTab.prototype.AnimateHide.call(this);if(this.SplitPane){this.SplitPane.css({display:"block",position:"absolute",top:"0px",left:"0px"}).animate({top:(2*this.Parent.height())+"px"},this.AnimationDuration,"swing",a)}};function Cycler(a){this.Tabs=[];this.TabButtons=[];this.Self=$(a).attr("role","application");this.Container=$('<ol class="cyclerContainer"></ol>').appendTo(this.Self);this.NavigationContainer=$('<ol class="cyclerNav" role="tablist"></ol>').appendTo(this.Self);this.ID="Cycler"+new Date().getTime()}Cycler.prototype.TabClass=CyclerTab;Cycler.prototype.CanAnimate=$.browser.msie==false||$.browser.version>=7;Cycler.prototype.CanAutoCycle=true;Cycler.prototype.MaxCompleteAutoCycles=-1;Cycler.prototype.AutoCycleCount=0;Cycler.prototype.AutoCycleDuration=10000;Cycler.prototype.Tabs=undefined;Cycler.prototype.TabButtons=undefined;Cycler.prototype.Self=undefined;Cycler.prototype.Container=undefined;Cycler.prototype.NavigationContainer=undefined;Cycler.prototype.NextButton=undefined;Cycler.prototype.PreviousButton=undefined;Cycler.prototype.SelectedIndex=-1;Cycler.prototype.IsTransitioning=false;Cycler.prototype.AddTabButton=function(f,d,a,c){var g=this,b=f>0?-1:0;var e=$('<li id="'+this.ID+"Tab"+f+'" tabindex="'+b+'" role="tab"><span class="'+a+' scCyclerNavigation">'+d+"</span></li>").appendTo(this.NavigationContainer).css("cursor","pointer").click(c).keydown(function(h){switch(h.keyCode){case 37:case 38:g.FocusPreviousTabButton(f);h.preventDefault();break;case 39:case 40:g.FocusNextTabButton(f);h.preventDefault();break;case 13:$(this).click();break}}).focus(function(h){g.OnFocus(h)});return e};Cycler.prototype.AddNextButton=function(){var a=this;return this.NextButton=this.AddTabButton(9999,"Next tab","tabNext",function(b){a.GoToNextTab()})};Cycler.prototype.AddPreviousButton=function(){var a=this;return this.PreviousButton=this.AddTabButton(9998,"Previous tab","tabPrev",function(b){a.GoToPreviousTab()})};Cycler.prototype.AddTab=function(c){var e=this.Tabs.length,d=e+1,b=new this.TabClass(c),a=this;b.Parent=this.Container;b.Self.appendTo(this.Container).attr("role","tabpanel").attr("aria-labelledby",this.ID+"Tab"+e).find("a").focus(function(f){a.OnFocus(f)});this.Tabs.push(b);this.TabButtons.push(this.AddTabButton(e,d,"tab"+d,function(f){a.CanAutoCycle=false;a.ShowTab(e)}));return b};Cycler.prototype.ShowTab=function(e,c){if(this.IsTransitioning){return}else{this.IsTransitioning=true}this.SelectedIndex=-1;var d=this;for(var b=this.Tabs.length-1;b>-1;b--){var f=this.Tabs[b],a=this.TabButtons[b];if(b==e){this.SelectedIndex=e;f.Self.attr("aria-hidden","false");f.Show(c||!this.CanAnimate,function(){d.IsTransitioning=false});a.addClass("current")}else{f.Self.attr("aria-hidden","true");f.Hide(c||!this.CanAnimate);a.removeClass("current")}}};Cycler.prototype.PreviousTab=function(a){if(this.IsTransitioning){return}this.SelectedIndex-=1;if(this.SelectedIndex<0){this.SelectedIndex=this.Tabs.length-1}this.ShowTab(this.SelectedIndex,a)};Cycler.prototype.NextTab=function(a){if(this.IsTransitioning){return}this.SelectedIndex+=1;if(this.SelectedIndex==this.Tabs.length){this.SelectedIndex=0}this.ShowTab(this.SelectedIndex,a)};Cycler.prototype.GoToPreviousTab=function(){this.CanAutoCycle=false;this.PreviousTab()};Cycler.prototype.GoToNextTab=function(){this.CanAutoCycle=false;this.NextTab()};Cycler.prototype.GetIndexOf=function(b){for(var a=this.TabButtons.length-1;a>-1;a--){if(this.TabButtons[a]==b){return a}}return -1};Cycler.prototype.FocusTabButton=function(c,a){var b=this.TabButtons[c],d=this.TabButtons[a];if(b){b.attr("tabindex","-1")}if(d){d.attr("tabindex","0").focus()}};Cycler.prototype.FocusPreviousTabButton=function(a){var b=a-1;if(b<0){b=this.TabButtons.length-1}this.FocusTabButton(a,b)};Cycler.prototype.FocusNextTabButton=function(b){var a=b+1;if(a>=this.TabButtons.length){a=0}this.FocusTabButton(b,a)};Cycler.prototype.OnFocus=function(a){this.CanAutoCycle=false};Cycler.prototype.SetNextAutoCycle=function(){if(this.CanAutoCycle){var a=this;setTimeout(function(){a.AutoCycle()},this.AutoCycleDuration)}};Cycler.prototype.GetHasMetMaxAutoCycles=function(){return this.MaxCompleteAutoCycles>0&&this.AutoCycleCount/this.Tabs.length>=this.MaxCompleteAutoCycles};Cycler.prototype.AutoCycle=function(){if(this.CanAutoCycle&&!this.GetHasMetMaxAutoCycles()){this.NextTab();this.SetNextAutoCycle();this.AutoCycleCount++}};Cycler.prototype.IsStrumming=false;Cycler.prototype.Strum=function(a){if(this.IsStrumming){return}this.IsStrumming=true;var b=-1,e=this,d=[];if(!a){a=150}this.NavigationContainer.css({overflow:"visible"});for(var c=this.TabButtons.length-1;c>-1;c--){d.unshift(this.TabButtons[c].find("span").css({position:"relative",top:"0px"}))}var f=function(){if(b+1<d.length){if(b>-1){d[b].css({top:"-10px"}).animate({top:"0px"},a,"swing")}b++;d[b].css({top:"0px"}).animate({top:"-10px"},a,"swing",function(){f()})}else{d[b].css({top:"-10px"}).animate({top:"0px"},a,"swing");e.IsStrumming=false}};f()};Cycler.Setup=function(l,j,g,a){var d=new Cycler(l),c=d.Self.find(j),b=[],f=[];if(g){for(var m in g){d[m]=g[m]}}if(c.length>0){if(c.length>1){d.AddPreviousButton()}c.each(function(n){var o=d.AddTab(this);if(a){for(var p in a){o[p]=a[p]}}b.push(o.Self.width());f.push(o.Self.height())});if(c.length>1){d.AddNextButton()}var h=b[0],k=f[0],e;for(e=b.length-1;e>0;e--){h=Math.max(h,b[e]);k=Math.max(k,f[e])}d.Container.width(h).height(k).css({overflow:"hidden",position:"relative"});d.ShowTab(g&&g.StartingIndex?g.StartingIndex:0,true)}d.SetNextAutoCycle();return d};(function(){var b=$("#productInDepth #topFeatures"),f=$("#wrapper.Home #heroContainer");if(b.length>0){b.css({overflow:"visible",height:"auto"});var g=Cycler.Setup(b,".feature",{TabClass:CyclerScissorSlideTab,AutoCycleDuration:6000,MaxCompleteAutoCycles:1});b.append('<span class="moreFeaturesIndicator">See more features</span>');$("span.moreFeaturesIndicator").hover(function(){g.Strum()}).click(function(){g.GoToNextTab()})}if(f.length>0){var e=0,c=true,d=window.location.toString().toLowerCase();if(d.indexOf("rediscoverhotmail")>-1){e=1;c=false}else{if(d.indexOf("ourbloggers")>-1){e=2;c=false}}var a;if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){a=Cycler.Setup(f,".tab",{StartingIndex:e,CanAutoCycle:c,AutoCycleDuration:6000,MaxCompleteAutoCycles:1})}else{a=Cycler.Setup(f,".tab",{TabClass:CyclerSplitSlideTab,StartingIndex:e,CanAutoCycle:c,AutoCycleDuration:6000,MaxCompleteAutoCycles:1},{SplitPaneSelector:".heroSummary"})}if(a){$("#heroContainer").append('<span class="interactivityIndicator">Change your view</span>');$("span.interactivityIndicator").hover(function(){a.Strum()}).click(function(){a.GoToNextTab()})}}})();
/* end ~/Content/scripts/cycler.js */
/* 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 */