(function(d){var a=null;var e,f,l,c,h;d.fn.TMobileNavigation=function(m){var n=d.extend({},d.fn.TMobileNavigation.defaults,m);return this.each(function(){$this=d(this);var w=d.meta?d.extend({},n,$this.data()):n;var p=$this.attr("id");var v=$this.attr("appId");var r=$this.attr("supportspanish");var u=$this.attr("section");var t=u==null?false:u=="Homepage"?true:false;h=$this.attr("tmopath");var q=$this.attr("SpanishUrl");var s=(d("#head").html()==null||d("#head")[0].innerHTML.length==0)?true:false;if(v==null&&p=="foot"){v=d("#head").attr("appId");h=d("#head").attr("tmopath")}else{if(v==null){v="tmobile"}}if(p=="head"){if(s){d.getJSON(h+"/htmlservices/navigation/TMobileNavigation.ashx?func=tmo&appId="+v+"&supportspanish="+r+"&section="+u+"&format=json&jsoncallback=?",function(o){a=o;tmAddHeaderHTML();tmNavSetFooter();initSearch();b();tm_spanish_Check(a.SpanishUrl)})}else{tm_spanish_Check(q);b();initSearch()}}})};(function(){this.fixFooter=function(){try{var p=document.getElementById("bottom")?document.getElementById("bottom"):document.getElementById("foot");var m=document.getElementById("bottom")?document.getElementById("wrapper"):document.getElementById("page");if(d.browser.msie&&d.browser.version.substr(0,1)<7){var q=getClientHeight();var o=p.offsetHeight;if(q>o){m.style.height=parseInt(q-o-100)+"px"}}else{if(!(d.browser.msie)){m.style.minHeight=parseInt(getClientHeight()-p.offsetHeight)+"px"}}}catch(n){}}})();(function(){this.tmAddHeaderHTML=function(){d("#head").html(a.HeaderHTML)}})();(function(){this.checkSearchEnter=function(n){try{var m;if(n&&n.which){n=n;m=n.which}else{n=event;m=n.keyCode}if(m==13){doSearch();return false}else{return true}}catch(n){return true}}})();(function(){this.doSearch=function(){var m=document.getElementById("SearchForaQuestion").value;if(!(m.length)||m=="Search T-Mobile"){d("SearchForaQuestion").focus();return false}else{if(m.length>200){alert("Your question is too long. It may be truncated at 200 characters.")}}var n=m.replace(/</g,"").replace(/>/g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/&/g,"");window.location.href=h+"/Search/?ui_mode=question&question_box="+n;return false}})();(function(){this.popLink=function(n,o,m){window.open(n,"popped","width="+o+",height="+m+",screenX=568,screenY=400,left=50,top=50,toolbar=no,location=no,menubar=no,status=no,resizable,scrollbars");return false}})();(function(){this.tmNavSetFooter=function(){d("#foot").html(a.FooterHTML)}})();function j(m){m=(m==null||m=="undefined")?d(".topnav .secondlvl"):d(m);e=setTimeout(function(){d(m).hide();g(c);d(".topnav > li").removeClass("selected");l.addClass("selected")},500)}function g(m){k(e);if(m){d(m).show()}}function k(m){if(m){clearTimeout(m);m=null}}function b(){d(".smartval").smartval();d(".dropdown").hover(function(){d(".topnav > li").find("li.dropdown").removeClass("subnavactive");d(".topnav .secondlvl").find("li .thirdlvl li a").blur();d(this).addClass("subnavactive").setNav3Width()},function(){d(this).removeClass("subnavactive")});d(".topnav > li > .secondlvl").show().hide();l=d(".topnav > .selected");c=d(l).find(".secondlvl").show();d(".topnav > li > a").hover(function(){d(".topnav .secondlvl").hide();g(d(this).next())},function(){j()});d(".secondlvl").hover(function(){k(e)},function(){j()});d(".topnav > li > a").focus(function(){k(e);d(".topnav > li").removeClass("selected");d(this).parent().addClass("selected");d(".topnav .secondlvl").hide();g(d(this).next());d(this).parent().find("li:first-child").removeClass("subnavactive")});d(".topnav > li > a").blur(function(){j()});d(".topnav .secondlvl > li > a").focus(function(){k(e);d(this).parents("li").next().removeClass("subnavactive");if(d(this).parent("li").hasClass("dropdown")){d(this).parent().addClass("subnavactive").setNav3Width()}});d(".topnav .secondlvl > li > a").blur(function(){j()});d(".topnav .secondlvl > li.dropdown li:last-child a").blur(function(){d(this).parents("li.dropdown").removeClass("subnavactive")});d(".topnav .secondlvl > li.dropdown li a").focus(function(){if(!d(this).parent("li").hasClass("subnavactive")){d(this).parents("li.dropdown").addClass("subnavactive")}});d(".topnav > li > a").click(function(m){d(".topnav > li").removeClass("selected");d(this).parent().addClass("selected");l=d(".topnav > .selected");c=d(l).find(".secondlvl")});d("#password-clear").show();d("#myTMobile-password").hide();d("#password-clear").focus(function(){d("#password-clear").hide();d("#myTMobile-password").show();d("#myTMobile-password").focus()});d("#myTMobile-password").blur(function(){if(d("#myTMobile-password").val()==""){d("#password-clear").show();d("#myTMobile-password").hide()}})}function i(m,u,n,r,p,s,o,q){var t=window.open(m,"popup","height="+u+",width="+n+",top="+r+",left="+p+",toolbar="+s+",resizable="+o+",scrollbars="+q);if(typeof window.focus!="undefined"){javascript:t.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");document.getElementById("Spanish").innerHTML="Español"}else{tm_spanish_setCookie("TMobileSpanish","IsSpanishUser=false");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};