(function(e){var b=null;var g,h,o,d,k;var j=false;e.fn.TMobileNavigation=function(p){var q=e.extend({},e.fn.TMobileNavigation.defaults,p);return this.each(function(){$this=e(this);var t=e.meta?e.extend({},q,$this.data()):q;var u=$this.attr("id");var z=$this.attr("appId");var w=$this.attr("supportspanish");var x=$this.attr("section");var y=x==null?false:x=="Homepage"?true:false;k=$this.attr("tmopath");var s=$this.attr("SpanishUrl");var r=(e("#head").html()==null||e.trim(e("#head")[0].innerHTML).length==0)?true:false;var v=escape(window.location.href);if(window.location.href.indexOf("?")==(window.location.href.length-1)){v=escape(window.location.href.substring(0,(window.location.href.length-1)))}if(z==null&&u=="foot"){z=e("#head").attr("appId");k=e("#head").attr("tmopath")}else{if(z==null){z="tmobile"}}if(u=="head"){if(r){e.getJSON(k+"/htmlservices/navigation/TMobileNavigation.ashx?func=tmo&appId="+z+"&supportspanish="+w+"&section="+x+"&currentURL="+v+"&format=json&jsoncallback=?",function(A){b=A;tmAddHeaderHTML();tmNavSetFooter();tm_spanish_Check(b.SpanishUrl);c();initSearch();j=true})}else{tm_spanish_Check(s);c();initSearch();j=true}}})};(function(){this.fixFooter=function(){try{var s=document.getElementById("bottom")?document.getElementById("bottom"):document.getElementById("foot");var p=document.getElementById("bottom")?document.getElementById("wrapper"):document.getElementById("page");if(e.browser.msie&&e.browser.version.substr(0,1)<7){var t=getClientHeight();var r=s.offsetHeight;if(t>r){p.style.height=parseInt(t-r-100)+"px"}}else{if(!(e.browser.msie)){p.style.minHeight=parseInt(getClientHeight()-s.offsetHeight)+"px"}}}catch(q){}}})();(function(){this.tmAddHeaderHTML=function(){e("#head").html(b.HeaderHTML)}})();(function(){this.checkSearchEnter=function(q){try{var p;if(q&&q.which){q=q;p=q.which}else{q=event;p=q.keyCode}if(p==13){doSearch();return false}else{return true}}catch(q){return true}}})();(function(){this.doSearch=function(){var p=document.getElementById("SearchForaQuestion").value;if(!(p.length)||p=="Search T-Mobile"){e("SearchForaQuestion").focus();return false}else{if(p.length>200){alert("Your question is too long. It may be truncated at 200 characters.")}}var q=p.replace(/</g,"").replace(/>/g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/&/g,"");window.location.href=k+"/Search/?ui_mode=question&question_box="+q;return false}})();(function(){this.popLink=function(q,r,p){window.open(q,"popped","width="+r+",height="+p+",screenX=568,screenY=400,left=50,top=50,toolbar=no,location=no,menubar=no,status=no,resizable,scrollbars");return false}})();(function(){this.tmNavSetFooter=function(){e("#foot").html(b.FooterHTML)}})();function m(p){p=(p==null||p=="undefined")?e(".topnav .secondlvl"):e(p);g=setTimeout(function(){e(p).hide();i(d);e(".topnav > li").removeClass("selected");o.addClass("selected")},500)}function i(p){n(g);if(p){e(p).show()}}function n(p){if(p){clearTimeout(p);p=null}}function c(){e(".smartval").smartval();f.init();e("#SearchForaQuestion").val("Search T-Mobile");e("#head #topNavigation .topnav .secondlvl li a").css("display","block");a.init({mouseOutDelay:1250,switchOutDelay:75})}var f={defaults:{navId:"utilityNavigation",popupClass:"utilityPopup",closeClass:"utilityClose",triggerActiveClass:"utilityActive"},options:null,container:null,popupTriggers:null,popupDivs:null,closeTriggers:null,textInputs:null,isPopupVisible:false,init:function(p){this.options=e.extend({},f.defaults,p);this.container=e("#"+this.options.navId);this.popupDivs=e("."+this.options.popupClass,this.container);this.popupTriggers=this.popupDivs.prev("a");this.closeTriggers=e("."+this.options.closeClass,this.popupDivs);this.textInputs=e("input:text",this.popupDivs);this.bindEventHandlers()},bindEventHandlers:function(){this.popupTriggers.bind("click",function(q){var r=e(this);var p=r.next("."+f.options.popupClass);if(p.is(":visible")){f.hidePopups()}else{f.showPopup(r,p)}q.stopPropagation();q.preventDefault()});this.closeTriggers.bind("click",function(p){if(f.isPopupVisible){f.hidePopups()}if(e(this).is("."+f.options.closeClass)){p.preventDefault()}p.stopPropagation()});this.popupDivs.bind("click",function(p){p.stopPropagation()});this.textInputs.bind("focus",function(){e(this).select()})},showPopup:function(q,p){f.hidePopups();f.isPopupVisible=true;q.addClass(f.options.triggerActiveClass.toString());p.show();a.disable()},hidePopups:function(){f.isPopupVisible=false;f.popupTriggers.removeClass(f.options.triggerActiveClass);f.popupDivs.hide();a.enable()}};var a={defaults:{navId:"topNavigation",downLevelClassName:"cssDownlevel",firstLevelClassName:"topnav",secondLevelClassName:"secondlvl",thirdLevelClassName:"thirdlvl",thirdLevelWrapperClassName:"thirdlvlWrapper",selectedClassName:"selected",dropdownClassName:"dropdown",showClassName:"show",hoverClassName:"over",mouseOutDelay:1000,switchOutDelay:100,firstShowDelay:1,hoverDelay:50},options:{},container:null,activeNav:null,activeSubNav:null,tier2ListItems:null,tier3ListItems:null,tier4ListItems:null,mouseOutTimer:null,switchOutTimer:null,hoverTimer:null,isSubnavShowing:false,isEnabled:true,init:function(p){this.options=e.extend({},this.defaults,p);this.container=e("#"+this.options.navId);this.container.removeClass(this.options.downLevelClassName);this.tier2ListItems=e("."+this.options.firstLevelClassName+" > li",this.container).not(":last");this.tier3ListItems=e("."+this.options.secondLevelClassName+" > li",this.container);this.tier4ListItems=e("."+this.options.thirdLevelClassName+" > li",this.container);this.activeNav=this.tier2ListItems.filter("."+this.options.selectedClassName);this.activeSubNav=e("."+this.options.secondLevelClassName,this.activeNav).addClass(this.options.showClassName);this.setTier3Widths();this.bindEventHandlers()},bindEventHandlers:function(){e("a",this.container).bind("focus",function(){e(this).trigger("mouseenter")}).bind("blur",function(){e(this).trigger("mouseleave")});this.tier2ListItems.add(this.tier3ListItems).add("."+this.options.thirdLevelWrapperClassName,this.container).bind("mouseenter",function(){if(j==false){return}if(a.isEnabled){if(a.mouseOutTimer){clearTimeout(a.mouseOutTimer)}if(a.switchOutTimer){clearTimeout(a.switchOutTimer)}}});this.tier2ListItems.bind("mouseenter",function(p){if(j==false){return}if(a.isEnabled){var r=this;if(e("."+a.options.thirdLevelWrapperClassName,r).is(":hidden")){var q=(a.isSubnavShowing)?a.options.switchOutDelay:1;a.switchOutTimer=setTimeout(function(){var s=e(r).parent().children().index(r);a.showDropdownNav(s)},q)}}p.stopPropagation()}).bind("mouseleave",function(p){if(a.isEnabled){a.reset()}});this.tier3ListItems.bind("mouseenter",function(p){if(a.isEnabled){if(a.hoverTimer){clearTimeout(a.hoverTimer)}var q=e(this);if(q.not("."+a.options.hoverClassName)){a.tier3ListItems.removeClass(a.options.hoverClassName);q.addClass(a.options.hoverClassName)}if(q.is("."+a.options.selectedClassName)){q.addClass(a.options.hoverClassName+a.options.selectedClassName)}else{a.tier3ListItems.removeClass(a.options.hoverClassName+a.options.selectedClassName)}if(e("."+a.options.thirdLevelWrapperClassName,q).is(":hidden")){var r=(a.isSubnavShowing)?a.options.switchOutDelay:a.options.firstShowDelay;a.switchOutTimer=setTimeout(function(){var s=q.parents("."+a.options.firstLevelClassName).children().index(q.parent().parent());a.showDropdownNav(s)},r)}}p.stopPropagation()}).bind("mouseleave",function(p){var q=e(this);if(a.isEnabled){a.hoverTimer=setTimeout(function(){q.removeClass(a.options.hoverClassName);q.removeClass(a.options.hoverClassName+a.options.selectedClassName)},a.options.hoverDelay)}})},reset:function(){if(a.switchOutTimer){clearTimeout(a.switchOutTimer)}this.mouseOutTimer=setTimeout(function(){a.tier2ListItems.removeClass(a.options.selectedClassName);a.activeNav.addClass(a.options.selectedClassName);a.hideDropdownNav();a.activeSubNav.addClass(a.options.showClassName)},a.options.mouseOutDelay)},showDropdownNav:function(r){this.isSubnavShowing=true;var q=this.tier2ListItems.filter(":eq("+r+")");this.tier2ListItems.removeClass(this.options.selectedClassName);q.addClass(this.options.selectedClassName);e("."+this.options.showClassName,this.container).removeClass(this.options.showClassName);e("."+this.options.secondLevelClassName,q).addClass(this.options.showClassName);this.setTier3Widths();var p=e("."+this.options.thirdLevelClassName,q);if(p.length){e("."+this.options.thirdLevelWrapperClassName,q).addClass(this.options.showClassName)}this.setTier4Heights()},hideDropdownNav:function(){this.isSubnavShowing=false;e("."+this.options.showClassName,this.container).removeClass(this.options.showClassName)},disable:function(){a.isEnabled=false},enable:function(){a.isEnabled=true},setTier3Widths:function(){var s=this.tier3ListItems.filter(":visible");var q=s.parent("."+this.options.secondLevelClassName);var p=q.data("hasWidthsBeenSet");if(!p){var y=s.length;if(y>0){var t=0;var x=e("."+this.options.showClassName+"."+this.options.secondLevelClassName,this.container).width();s.each(function(){t+=e(this).width()});var u=(t<x)?false:true;var r=(u)?x-t:t-x;var v=Math.floor(r/y);var w=r-(v*y);s.each(function(z){var B=e(this);var A=(u)?B.width()+v:B.width()-v;if(z==y-1){A+=(u)?w:-w}B.width(A);B.children("a").width(A)})}q.data("hasWidthsBeenSet",true)}},setTier4Heights:function(){var r=this.tier4ListItems.parent("."+this.options.thirdLevelClassName).filter(":visible");var q=this.tier2ListItems.filter("."+this.options.selectedClassName);var p=q.data("hasHeightsBeenSet");if(!p){r.equalHeight();r.parents("."+this.options.secondLevelClassName).find("."+this.options.thirdLevelWrapperClassName).equalHeight();q.data("hasHeightsBeenSet",true)}}};function l(p,x,q,u,s,v,r,t){var w=window.open(p,"popup","height="+x+",width="+q+",top="+u+",left="+s+",toolbar="+v+",resizable="+r+",scrollbars="+t);if(typeof window.focus!="undefined"){javascript:w.focus()}}})(jQuery);function tm_spanish_setCookie(b,a){document.cookie=b+"="+a+";path=/;domain=t-mobile.com;"}function tm_spanish_Check(a){if(window.location.href.toLowerCase().indexOf(a)!=-1){tm_spanish_setCookie("TMobileSpanish","IsSpanishUser=true");if(document.getElementById("Spanish")!=null){document.getElementById("Spanish").innerHTML="Español"}}else{tm_spanish_setCookie("TMobileSpanish","IsSpanishUser=false");if(document.getElementById("English")!=null){document.getElementById("English").innerHTML="English"}}}$(document).ready(function(){$("#head").TMobileNavigation();window.onresize=fixFooter;fixFooter()});$(document).ajaxError(function(c,b,a){});$(document).ajaxStop(function(){});jQuery.fn.setNav3Width=function(){var a=this.find("a:first-child").width()+20;this.find("ul.thirdlvl, ul.thirdlvl li").css({width:"auto","min-width":"0px"});this.find("ul.thirdlvl li").each(function(){if(jQuery(this).width()>a){a=jQuery(this).width()}}).css("width",a+"px");return this};jQuery.fn.equalHeight=function(a){if(a>0){a={height:a}}var d={height:null};var a=$.extend(d,a);var b=-1;var c=this;return this.each(function(){setTimeout(function(){if(a.height===null){if(b<0){c.each(function(e){b=($(this).height()>b)?$(this).height():b})}c.height(b)}else{c.height(a.height)}},50)})};