var tmopath;(function(e){var b=null;var g,h,n,d;var j=false;e.fn.TMobileNavigation=function(o){var p=e.extend({},e.fn.TMobileNavigation.defaults,o);return this.each(function(){$this=e(this);var x=e.meta?e.extend({},p,$this.data()):p;var q=$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;tmopath=$this.attr("tmopath");var s=(e("#head").html()==null||e.trim(e("#head")[0].innerHTML).length==0)?true:false;var w=escape(window.location.href);if(window.location.href.indexOf("?")==(window.location.href.length-1)){w=escape(window.location.href.substring(0,(window.location.href.length-1)))}if(v==null&&q=="foot"){v=e("#head").attr("appId");tmopath=e("#head").attr("tmopath")}else{if(v==null){v="tmobile"}}if(q=="head"){if(s){e.getJSON(tmopath+"/htmlservices/navigation/TMobileNavigation.ashx?func=tmo&appId="+v+"&supportspanish="+r+"&section="+u+"&currentURL="+w+"&format=json&jsoncallback=?",function(y){b=y;tmAddHeaderHTML();tmNavSetFooter();c();initSearch();j=true})}else{c();initSearch();j=true}}})};(function(){this.fixFooter=function(){try{var r=document.getElementById("bottom")?document.getElementById("bottom"):document.getElementById("foot");var o=document.getElementById("bottom")?document.getElementById("wrapper"):document.getElementById("page");if(e.browser.msie&&e.browser.version.substr(0,1)<7){var s=getClientHeight();var q=r.offsetHeight;if(s>q){o.style.height=parseInt(s-q-100)+"px"}}else{if(!(e.browser.msie)){o.style.minHeight=parseInt(getClientHeight()-r.offsetHeight)+"px"}}}catch(p){}}})();(function(){this.tmAddHeaderHTML=function(){e("#head").html(b.HeaderHTML)}})();(function(){this.checkSearchEnter=function(p){try{var o;if(p&&p.which){p=p;o=p.which}else{p=event;o=p.keyCode}if(o==13){doSearch();return false}else{return true}}catch(p){return true}}})();(function(){this.doSearch=function(){try{cmCreateManualLinkClickTag("/searchbutton/?cm_sp=searchbutton-_-searchbutton-_-searchbutton","searchbutton")}catch(p){}var o=document.getElementById("SearchForaQuestion").value;if(!(o.length)||o=="Search T-Mobile"){e("SearchForaQuestion").focus();return false}else{if(o.length>200){alert("Your question is too long. It may be truncated at 200 characters.")}}var q=o.replace(/</g,"").replace(/>/g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/&/g,"");window.location.href=tmopath+"/Search/?ui_mode=question&question_box="+encodeURI(encodeURI(encodeURI(q)));return false}})();(function(){this.popLink=function(p,q,o){window.open(p,"popped","width="+q+",height="+o+",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(){e("body").click(function(){a.tier2ListItems.removeClass(a.options.selectedClassName);a.activeNav.addClass(a.options.selectedClassName);a.hideDropdownNav();a.activeSubNav.addClass(a.options.showClassName)})})();function l(o){o=(o==null||o=="undefined")?e(".topnav .secondlvl"):e(o);g=setTimeout(function(){e(o).hide();i(d);e(".topnav > li").removeClass("selected");n.addClass("selected")},500)}function i(o){m(g);if(o){e(o).show()}}function m(o){if(o){clearTimeout(o);o=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(o){this.options=e.extend({},f.defaults,o);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(p){var q=e(this);var o=q.next("."+f.options.popupClass);if(o.is(":visible")){f.hidePopups()}else{f.showPopup(q,o)}p.stopPropagation();p.preventDefault()});this.closeTriggers.bind("click",function(o){if(f.isPopupVisible){f.hidePopups()}if(e(this).is("."+f.options.closeClass)){o.preventDefault()}o.stopPropagation()});this.popupDivs.bind("click",function(o){o.stopPropagation()});this.textInputs.bind("focus",function(){e(this).select()})},showPopup:function(p,o){f.hidePopups();f.isPopupVisible=true;p.addClass(f.options.triggerActiveClass.toString());o.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(o){this.options=e.extend({},this.defaults,o);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(o){if(j==false){return}if(a.isEnabled){var q=this;if(e("."+a.options.thirdLevelWrapperClassName,q).is(":hidden")){var p=(a.isSubnavShowing)?a.options.switchOutDelay:1;a.switchOutTimer=setTimeout(function(){var r=e(q).parent().children().index(q);a.showDropdownNav(r)},p)}}o.stopPropagation()}).bind("mouseleave",function(o){if(a.isEnabled){a.reset()}});this.tier3ListItems.bind("mouseenter",function(o){if(a.isEnabled){if(a.hoverTimer){clearTimeout(a.hoverTimer)}var p=e(this);if(p.not("."+a.options.hoverClassName)){a.tier3ListItems.removeClass(a.options.hoverClassName);p.addClass(a.options.hoverClassName)}if(p.is("."+a.options.selectedClassName)){p.addClass(a.options.hoverClassName+a.options.selectedClassName)}else{a.tier3ListItems.removeClass(a.options.hoverClassName+a.options.selectedClassName)}if(e("."+a.options.thirdLevelWrapperClassName,p).is(":hidden")){var q=(a.isSubnavShowing)?a.options.switchOutDelay:a.options.firstShowDelay;a.switchOutTimer=setTimeout(function(){var r=p.parents("."+a.options.firstLevelClassName).children().index(p.parent().parent());a.showDropdownNav(r)},q)}}o.stopPropagation()}).bind("mouseleave",function(o){var p=e(this);if(a.isEnabled){a.hoverTimer=setTimeout(function(){p.removeClass(a.options.hoverClassName);p.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(q){this.isSubnavShowing=true;var p=this.tier2ListItems.filter(":eq("+q+")");this.tier2ListItems.removeClass(this.options.selectedClassName);p.addClass(this.options.selectedClassName);e("."+this.options.showClassName,this.container).removeClass(this.options.showClassName);e("."+this.options.secondLevelClassName,p).addClass(this.options.showClassName);this.setTier3Widths();var o=e("."+this.options.thirdLevelClassName,p);if(o.length){e("."+this.options.thirdLevelWrapperClassName,p).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 r=this.tier3ListItems.filter(":visible");var p=r.parent("."+this.options.secondLevelClassName);var o=p.data("hasWidthsBeenSet");if(!o){var x=r.length;if(x>0){var s=0;var w=e("."+this.options.showClassName+"."+this.options.secondLevelClassName,this.container).width();r.each(function(){s+=e(this).width()});var t=(s<w)?false:true;var q=(t)?w-s:s-w;var u=Math.floor(q/x);var v=q-(u*x);r.each(function(y){var A=e(this);var z=(t)?A.width()+u:A.width()-u;if(y==x-1){z+=(t)?v:-v}A.width(z);A.children("a").width(z)})}p.data("hasWidthsBeenSet",true)}},setTier4Heights:function(){var q=this.tier4ListItems.parent("."+this.options.thirdLevelClassName).filter(":visible");var p=this.tier2ListItems.filter("."+this.options.selectedClassName);var o=p.data("hasHeightsBeenSet");if(!o){q.equalHeight();q.parents("."+this.options.secondLevelClassName).find("."+this.options.thirdLevelWrapperClassName).equalHeight();p.data("hasHeightsBeenSet",true)}}};function k(o,w,p,t,r,u,q,s){var v=window.open(o,"popup","height="+w+",width="+p+",top="+t+",left="+r+",toolbar="+u+",resizable="+q+",scrollbars="+s);if(typeof window.focus!="undefined"){javascript:v.focus()}}})(jQuery);$(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)})};var redirectPageurl="";var MP={Version:"1.0.22",Domains:{es:"es.t-mobile.com"},SrcLang:"en",UrlLang:"mp_js_current_lang",SrcUrl:unescape("mp_js_orgin_url"),init:function(){if(MP.UrlLang.indexOf("p_js_")==1){MP.SrcUrl=window.top.document.location.href;MP.UrlLang=MP.SrcLang}},getCookie:function(b){var c=document.cookie.indexOf(b+"=");if(c<0){return null}c=c+b.length+1;var a=document.cookie.indexOf(";",c);if(a<0){a=document.cookie.length}while(document.cookie.charAt(c)==" "){c++}return unescape(document.cookie.substring(c,a))},setCookie:function(b,e,f,d){var c=b+"="+escape(e);if(f){c+="; path="+f}if(d){c+="; domain="+d}var a=new Date();a.setTime(a.getTime()+1000*60*60*24*365);c+="; expires="+a.toUTCString();document.cookie=c},switchLanguage:function(b){if(b!=MP.SrcLang){var a=document.createElement("SCRIPT");a.src=location.protocol+"//"+MP.Domains[b]+"/"+MP.SrcLang+b+"/?1023749632;"+encodeURIComponent(MP.SrcUrl);document.body.appendChild(a)}else{if(b==MP.SrcLang&&MP.UrlLang!=MP.SrcLang){var a=document.createElement("SCRIPT");a.src=location.protocol+"//"+MP.Domains[MP.UrlLang]+"/"+MP.SrcLang+MP.UrlLang+"/?1023749634;"+encodeURIComponent(location.href);document.body.appendChild(a)}}return false},switchToLang:function(a){if(redirectPageurl==""){window.top.location.href=a}else{window.top.location.href=redirectPageurl}}};var modalWindow={open:function(c){try{if(getCookie("TMobileSpanish","IsSpanishUser")!="true"){window.top.location.href=c}else{redirectPageurl=c;if(typeof jQuery.blockUI=="undefined"){$.getScript("http://www.t-mobile.com/assets/scripts/jquery.blockUI.js",function(){b()})}else{b()}}}catch(a){}function b(){var d=(window.screen.width-602)/2;showPackagesCss={padding:0,margin:0,top:"40%",left:d,textAlign:"left",position:"fixed",color:"#000",border:"0px solid #aaa",backgroundColor:"#fff",cursor:"auto",overflow:"hidden",width:"600px"};showPackagesoverlayCSS={backgroundColor:"#000",opacity:"0.3",cursor:"default"};$.blockUI({message:$("#dvSpeedBump").html(),css:showPackagesCss,overlayCSS:showPackagesoverlayCSS})}}};function getCookie(a,m){var e=a+"=";var f=document.cookie.split(";");for(var h=0;h<f.length;h++){var l=f[h];while(l.charAt(0)==" "){l=l.substring(1,l.length)}if(l.indexOf(e)==0){var b=l.substring(e.length,l.length);var d=b.split("&");for(var g=0;g<d.length;g++){var k=d[g].split("=");if(k[0]==m){return k[1]}}}}return null}function SpeedBumpConfirm(){$("#liUnavLang a").eq(0).click();$.unblockUI()}function SpeedBumpCancel(){redirectPageurl="";$.unblockUI()}function languageSwitch(e,d){var b=".t-mobile.com";var a="MP_LANG";var c=window.location+"";c=c.replace(tmopath,"");MP.setCookie(a,e,c,b);MP.switchToLang(d)};
