(function(n){n.belowthefold=function(t,i){var r=n(window).outerHeight()+n(window).scrollTop();return r<=n(t).offset().top-i.threshold};n.abovethetop=function(t,i){var r=n(window).scrollTop();return r>=n(t).offset().top+n(t).outerHeight()-i.threshold};n.rightofscreen=function(t,i){var r=n(window).width()+n(window).scrollLeft();return r<=n(t).offset().left-i.threshold};n.leftofscreen=function(t,i){var r=n(window).scrollLeft();return r>=n(t).offset().left+n(t).width()-i.threshold};n.inviewport=function(t,i){return!n.rightofscreen(t,i)&&!n.leftofscreen(t,i)&&!n.belowthefold(t,i)&&!n.abovethetop(t,i)};n.extend(n.expr[":"],{"below-the-fold":function(t){return n.belowthefold(t,{threshold:0})},"above-the-top":function(t){return n.abovethetop(t,{threshold:0})},"left-of-screen":function(t){return n.leftofscreen(t,{threshold:0})},"right-of-screen":function(t){return n.rightofscreen(t,{threshold:0})},"in-viewport":function(t){return n.inviewport(t,{threshold:0})}})})(jQuery);$(document).ready(function(){var i=$("a[data-backToTop=true]"),r=$("a[href='#']"),t=$("#manageyouraccount"),u={Init:function(){var n=this;n.BindEvents();n.AddTopSection();n.ManageAccount();n.HowToBuyDpa()},BindEvents:function(){$(".back-to-top").on("click",this.ScrollToTop);i.on("click",this.ScrollToTop);r.on("click",this.ScrollToTop);$(".dell-dpa-mobile h5 a").addClass("dpa-applynow");$(".dell-dpa-mobile h5 br").remove();$(".dell-advantage-mobile h5 br").remove()},AddTopSection:function(){},HowToBuyDpa:function(){var n=$("a[name='dpa-tips-for-existing-customers']");n.attr("id","dpa-tips-for-existing-customers")},ManageAccount:function(){t.length>0&&($("div.list-section:first").before("
<\/div>"),$("#manageYourAccountPhone").addClass("well well-gray-light bottom-offset-small"),$("#manageYourAccountPhone").html(t.html()))},ScrollToTop:function(){$("html,body").animate({scrollTop:0},10)}},n;u.Init();n={Init:function(){this.PopulateTableData($("#dfs-amortization-table-option li:first").find("a"));$("#dfs-amortization-table-option li a").on("click",this.ChangeAmortizationRateData)},ChangeAmortizationRateData:function(){n.PopulateTableData($(this))},PopulateTableData:function(n){$("#dfs-amortization-table-select").html(n.attr("data-groupid"));$("[data-val=data-r1t]").html(n.attr("data-r1t"));$("[data-val=data-r2t]").html(n.attr("data-r2t"));$("[data-val=data-r2v]").html(n.attr("data-r2v"));$("[data-val=data-r3t]").html(n.attr("data-r3t"));$("[data-val=data-r3v]").html(n.attr("data-r3v"));$("[data-val=data-r4t]").html(n.attr("data-r4t"));$("[data-val=data-r4v]").html(n.attr("data-r4v"));$("[data-val=data-r5t]").html(n.attr("data-r5t"));$("[data-val=data-r5v]").html(n.attr("data-r5v"));$("[data-val=data-r6t]").html(n.attr("data-r6t"));$("[data-val=data-r6v]").html(n.attr("data-r6v"));$("[data-val=data-r7t]").html(n.attr("data-r7t"));$("[data-val=data-r7v]").html(n.attr("data-r7v"));$("#dfs-amortization-table-select").html($(this).attr("data-groupid"))}};n.Init()});$(document).ready(function(){var t=$("#leftNavTop.desktab"),n=$("#navLeft"),i=$("#leftNavTop.desktab #navLeft li"),r={Init:function(){this.AdjustNav();this.BindEvents()},AdjustNav:function(){var r=t.width(),i;n.css("width",r+"px");i=t.offset();i!=null&&n.attr("data-top",i.top)},BindEvents:function(){i.on("click",this.ItemClick);$(window).on("scroll",this.leftnavscroll);$(window).on("resize",this.leftnavresize)},ItemClick:function(){i.removeClass("active");$(this).addClass("active")},leftnavscroll:function(){var h=$(".list-section:in-viewport").first(),c="#"+$.trim(h.attr("id")),i,r,u,f,o,s,e;$("#leftNavTop").length>0&&($("#leftNavTop.desktab li").removeClass("active"),$("#leftNavTop.desktab li a[href='"+c+"']").parent().addClass("active"),$("#bannerSection:in-viewport").length<=0&&$("div.banner:in-viewport").length<=0?$("footer:in-viewport").length>0?(i=$(window),r={top:i.scrollTop(),left:i.scrollLeft()},r.right=r.left+i.width(),r.bottom=r.top+i.height(),u=$("footer").offset(),u.right=u.left+$("footer").outerWidth(),u.bottom=u.top+$("footer").outerHeight(),f=r.bottom-u.top,f>0&&n.height()+f>i.height()&&(o=i.height()-(n.height()+f),n.css("top",o+"px"))):n.css("top","0"):(s=t.offset().top,e=s,e=e-$(window).scrollTop(),n.css("top",e+"px")))},leftnavresize:function(){var e,i,r,u,f,o,s,h;$("#leftNavTop").length>0&&(e=t.width(),n.css("width",e+"px"),$("#bannerSection:in-viewport").length<=0&&$("div.banner:in-viewport").length<=0?$("footer:in-viewport").length>0?(i=$(window),r={top:i.scrollTop(),left:i.scrollLeft()},r.right=r.left+i.width(),r.bottom=r.top+i.height(),u=$("footer").offset(),u.right=u.left+$("footer").outerWidth(),u.bottom=u.top+$("footer").outerHeight(),f=r.bottom-u.top,f>0&&n.height()+f>i.height()&&(o=i.height()-(n.height()+f),n.css("top",o+"px"))):n.css("top","0"):(s=t.offset().top,h=s,n.css("top",h+"px")))}};r.Init()}),function(n){var t=n("#navbar"),i=n("#section-title"),r={Init:function(){this.BindEvents();this.OnScroll()},BindEvents:function(){n(window).on("scroll",this.OnScroll);t.find("ul.nav li:first").find("a:first").on("click",this.SpyClick)},OnScroll:function(){var r,o;if(n("#bannerSection:in-viewport").length<=0&&n("div.banner:in-viewport").length<=0&&n("#dahelpsection:in-viewport").length<=0&&n("#manageYourAccountPhone:in-viewport").length<=0&&n("#manageYourAccountPhone:in-viewport").length<=0&&n(".list-section:in-viewport").length>0||n("footer.mhf:in-viewport").length>0||n("div.wrapper.copyright-container:in-viewport").length>0){t.show();r=n.trim(n(".list-section:in-viewport").first().attr("id"));r==undefined&&(r=n(".list-section:first").attr("id"));var f="#"+n.trim(r),u=t.find("ul.dropdown-menu a[href='"+f+"']").attr("data-title"),e=!1;u==""&&(u=n(".list-section:last-child").attr("data-title"),e=!0);i.html(u);e==!1&&(t.find("ul.dropdown-menu li").removeClass("active"),t.find("ul.dropdown-menu a[href='"+f+"']").parent().addClass("active"));o=n.trim(n("#navbar #section-title").html());t.find("ul.dropdown-menu a[data-title='"+o+"']").parent().addClass("active")}else t.hide()},SpyClick:function(t){return n(this).parent().hasClass("open")?n(this).parent().removeClass("open"):n(this).parent().addClass("open"),t.preventDefault(),!1}};r.Init()}(jQuery);$(document).ready(function(){var n=$("div.accordion-showhide"),t=$("#pd_page"),i={Init:function(){this.OnLoad();this.BindEvents()},OnLoad:function(){var i=this;$(".accordion-body:first").collapse("toggle");$(".accordion-toggle:first").removeClass("collapsed");$.trim(t.attr("data-pageid"))=="faq"&&n.show();i.DeepLink()},BindEvents:function(){n.find("a").on("click",this.ClickShowHide)},ClickShowHide:function(){return $.trim($(this).attr("data-showall"))=="true"?$(".accordion-body:not(.in)").each(function(){$(this).collapse("toggle");$(".accordion-toggle").removeClass("collapsed")}):$(".accordion-body.in").each(function(){$(this).collapse("toggle");$(".accordion-toggle").addClass("collapsed")}),!1},DeepLink:function(){var n=$("#"+window.location.hash.replace("#",""));n!=undefined&&n.length>0&&($(n).closest(".accordion-body").hasClass("in")||($(n).closest(".accordion-body").toggleClass("in"),$(n).closest(".accordion-group").find(".accordion-toggle").hasClass("collapsed")&&$(n).closest(".accordion-group").find(".accordion-toggle").toggleClass("collapsed")))}};i.Init()})