/*
 * $Id: sp-menu.js,v 1.40 2011/01/31 20:50:35 khurrum Exp $
 * IBM Smarter Planet overlay menu script
*/
/*
 * Copyright (c) 2009 IBM Corporation
 * Owner: Corporate Webmaster 
*/
(function(){var B=navigator.appName;var A={init:function(){var E=null;var D=jQuery("meta[name=DC.Language]").attr("content");var C=D.toLowerCase().split("-");if(C[1]=="us"||C[1]=="ca"||C[1]=="id"||C[1]=="my"||C[1]=="ph"||C[1]=="sg"||C[1]=="th"||C[1]=="ae"||C[1]=="bh"||C[1]=="eg"||C[1]=="jo"||C[1]=="kw"||C[1]=="lb"||C[1]=="om"||C[1]=="qa"||C[1]=="sa"||C[1]=="ar"||C[1]=="bo"||C[1]=="cl"||C[1]=="co"||C[1]=="ec"||C[1]=="mx"||C[1]=="pe"||C[1]=="py"||C[1]=="uy"||C[1]=="ve"||C[1]=="br"||C[1]=="au"||C[1]=="nz"||C[1]=="hk"||C[1]=="in"||C[1]=="tw"||C[1]=="cn"||C[1]=="kr"||C[1]=="uk"||C[1]=="gb"||C[1]=="fr"||C[1]=="it"||C[1]=="es"||C[1]=="dk"||C[1]=="de"||C[1]=="fi"||C[1]=="no"||C[1]=="be"||C[1]=="ch"||C[1]=="nl"||C[1]=="se"||C[1]=="za"||C[1]=="pl"||C[1]=="ru"||C[1]=="tr"||C[1]=="at"||C[1]=="bg"||C[1]=="cz"||C[1]=="hr"||C[1]=="hu"||C[1]=="ee"||C[1]=="lv"||C[1]=="lt"||C[1]=="gr"||C[1]=="pt"||C[1]=="ie"||C[1]=="sk"||C[1]=="si"||C[1]=="rs"||C[1]=="ua"||C[1]=="ro"||C[1]=="vn"){jQuery("#spansion-topics-col1").hover(function(){if(E!==null){clearTimeout(E);
E=null}if(((jQuery("#spansion-topics-col1.ibm-active").length)||(jQuery("#ibm-sp-logo a.ibm-active").length))==0){A.openMastheadMenu(this)}return false},function(){E=setTimeout(A.closeMastheadMenu,500)})}else{jQuery("#ibm-sp-logo").hover(function(){if(E!==null){clearTimeout(E);E=null}if(((jQuery("#spansion-topics-col1.ibm-active").length)||(jQuery("#ibm-sp-logo a.ibm-active").length))==0){A.openMastheadMenu(this)}return false},function(){E=setTimeout(A.closeMastheadMenu,500)})}jQuery("#spansion-menu-col1").hover(function(){if(E!==null){clearTimeout(E);
E=null}return false},function(){E=setTimeout(A.closeMastheadMenu,500);return false})},openMastheadMenu:function(){var C=arguments[0]||jQuery("#spansion-topics-col1");if(!C.jquery){C=jQuery(C)}jQuery("#spansion-topics-col1").addClass("ibm-active");jQuery("#ibm-sp-logo a").addClass("ibm-active");if(B=="Microsoft Internet Explorer"){jQuery("#spansion-menu-col1").css("top","0px").fadeIn("fast").removeClass("menu-closed").animate({top:"10px"},300).addClass("menu-open")}else{jQuery("#spansion-menu-col1").css("opacity",0,"top","0px").removeClass("menu-closed").animate({opacity:1,top:"10px"},300).addClass("menu-open")
}},closeMastheadMenu:function(){var C=arguments[0]||jQuery("#spansion-topics-col1");if(!C.jquery){C=jQuery(C)}jQuery("#spansion-topics-col1").removeClass("ibm-active");jQuery("#ibm-sp-logo a").removeClass("ibm-active");if(B=="Microsoft Internet Explorer"){jQuery("#spansion-menu-col1").animate({top:"0px"},200,function(){jQuery("#spansion-menu-col1").addClass("menu-closed").removeClass("menu-open")}).fadeOut("fast")}else{jQuery("#spansion-menu-col1").animate({opacity:0,top:"0px"},300,function(){jQuery("#spansion-menu-col1").addClass("menu-closed").removeClass("menu-open")
})}},preInit:function(){var D="";var F=jQuery("meta[name=DC.Language]").attr("content");var C=F.toLowerCase().split("-");if(C[1]=="il"){D="-rtl"}var E=document.createElement("link");E.setAttribute("type","text/css");E.setAttribute("rel","stylesheet");E.setAttribute("href",A.cssJSURL+"sp-scrolling"+D+".css");document.getElementsByTagName("head").item(0).appendChild(E);if(C[1]=="il"){A.preload(A.imgURL+"",A.imgURL+"",A.imgURL+C[1]+"/"+C[0]+"",A.imgURL+"",A.imgURL+"",A.imgURL+"",A.imgURL+"")
}else{A.preload(A.imgURL+"",A.imgURL+"",A.imgURL+C[1]+"/"+C[0]+"",A.imgURL+"",A.imgURL+"",A.imgURL+"",A.imgURL+"",A.imgURL+"",A.imgURL+"",A.imgURL+"",A.imgURL+"")}},preload:function(){var C;for(var D=0;D<arguments.length;D++){C=new Image();C.src=arguments[D]}}};jQuery(function(){if(jQuery("#spansion-menu-col1-columns").length>0){return true
}var D=jQuery("meta[name=DC.Language]").attr("content");var C=D.toLowerCase().split("-");var E=new Date().getTime();jQuery("#spansion-menu-col1").load("/common/v16/sp/js/"+C[1]+"/"+C[0]+"/menu-content.html?ibmrand="+E)});A.preInit();jQuery(A.init)})();jQuery(function(){var B="";var C=jQuery("meta[name=DC.Language]").attr("content");var A=C.toLowerCase().split("-");if(A[1]=="il"){B="-rtl"}jQuery('< >').appendTo("head");
jQuery("ul#ibm-sp-lead-nav li a").wrapInner("<span></span>");openSelect=jQuery("#ibm-sp-lead-nav-first");openWidth=80;closeWidth=2;if(jQuery("html").attr("lang")=="fr-FR"){openWidth=95}jQuery("ul#ibm-sp-lead-nav li a").hover(function(){jQuery(this).css({color:"#FFF"});jQuery(openSelect).animate({width:closeWidth+"px"},{queue:false,duration:400});jQuery(this).animate({width:openWidth+"px"},{queue:false,duration:400});openSelect=this},function(){jQuery(openSelect).animate({width:closeWidth+"px"},{queue:false,duration:400})
})});
