/*
 *  Vodafone Masthead Export Script
 *  
 *  Copied from main 1.2.js, DO NOT MODIFY HERE
 *  
 *  Requires jQuery 1.4.2 or later, test with your implementation
 *
 *  DO NOT INCLUDE jQuery.js more than once in your page
 *   
 */

 var sUCMSPath=typeof sUCMSPath!="undefined"?sUCMSPath:"";
(function(a){a.noConflict();var f=a(document.documentElement);f.addClass("jsEnabled jsLoading");var e=document.write,h=function(b,a){if(a)e.call(this,b);else{var c=document.createElement("span");c.innerHTML=b;document.body.appendChild(c)}},i=function(a){function k(){d=!0;_metaMyAccountDropDownElement.stop(!0,!0).slideUp(function(){d=!1})}a.sId="MUmyAccount";var c=-1,d=!1;a.initScript=function(a){_metaMyAccountDropDownElement=a.find("#MUmyAccountOptions");a.live("mouseenter",function(){d||_metaMyAccountDropDownElement.stop(!0,
!0).slideDown()});a.live("mouseleave",function(){k()});a.delegate("a","focusin",function(){_metaMyAccountDropDownElement.css("display").toLowerCase()=="none"&&(d||_metaMyAccountDropDownElement.stop(!0,!0).slideDown());clearTimeout(c)});a.delegate("a","focusout",function(){clearTimeout(c);c=setTimeout(k,500)})};return a}(i||{}),g=function(b){function d(b,c){clearTimeout(i);g.removeClass(e);a(b).children("a").addClass(e);c.show()}function c(){i=setTimeout(function(){f()},500)}function f(){h.stop(!0,
!0).hide();g.removeClass(e)}b.sId="primaryNavigation";var g=[],h=[],i=-1,e="jsActive",j=-1;b.initScript=function(e){g=e.find("> li > a");h=e.find(".megaItems");e.delegate("#"+b.sId+" > li","mouseenter",function(){h.hide();d(this,a(this).find(".megaItems"))});e.live("mouseleave",function(){c(this)});e.delegate("a","focus",function(){clearTimeout(j);var b=a(this);b.hasClass("menuLayerLink")&&(h.hide(),d(this.parentNode,b.siblings(".megaItems")))});e.delegate("a","blur",function(){clearTimeout(j);j=
setTimeout(f,500)})};return b}(g||{}),d={_sDisplayTitleWhenEmpty:".displayTitleWhenEmpty, #searchQuery",init:function(b){(b?a(b).find(this._sDisplayTitleWhenEmpty):a(this._sDisplayTitleWhenEmpty)).each(function(b,c){if(c.value===""||c.value==c.title)c.value=c.title;a(c).bind("focus.resetField",d.resetField);a(c).bind("blur.resetField",d.resetField)})},resetField:function(a){var d=a.target,c=d.title;switch(a.type){case "focus":if(d.value==c)d.value="";break;case "blur":if(d.value==="")d.value=c}}};
a(document).ready(function(){f.removeClass("jsLoading");document.write=h;var b=a("#"+i.sId);b.length!==0&&i.initScript(b);b=a("#"+g.sId);b.length!==0&&g.initScript(b);a("body").trigger("mainLoaded");d.init()})})(jQuery);
(function(a){var f,e=window.ie6fix={hideSelectBoxes:function(e){f||(f=a("select:not(.ModalLayer select)"));f.css("visibility",e?"hidden":"")},fixMegaNavSmallItems:function(){try{a("#primaryNavigation .megaItems").each(function(e,f){var d=a(f);d.css("width")==="auto"&&(d.width(d.find(".megaItem").length*160+10),location.search.indexOf("debug")>-1&&alert("debug"))})}catch(e){}}};a(document).ready(function(){a.browser.msie&&a.browser.version==="6.0"&&(a("body").addClass("browserIE6"),e.fixMegaNavSmallItems())})})(jQuery);
