var geoMap=
{
	US:
	{
		code:"",noResults:"No Shortcut found. Search all of apple.com.",viewAll:"View all search results",searchText:"Music Search"
	}
	,ASIA:
	{
		code:"asia"	
	}
	,AT:
	{
		code:"at",viewAll:"Alle Suchergebnisse",searchText:"Suchen"	
	}
	,AU:
	{
		code:"au"	
	}
	,BE_FR:
	{
		code:"bf",viewAll:"Afficher tous les rÃ©sultats",noResults:"Pas de rÃ©sultat. Essayez une recherche apple.com",searchText:"Rechercher"	
	}
	,BE_NL:
	{
		code:"bl",viewAll:"Toon alle zoekresultaten",noResults:"Niets gevonden. Zoek opnieuw binnen www.apple.com.",searchText:"Zoek"	
	}
	,BR:
	{
		code:"br",noResults:"NÃ£o encontrado. Tente a busca em apple.com",viewAll:"Ver todos os resultados da busca",searchText:"Buscar"	
	}
	,CA_EN:
	{
		code:"ca",directory:"/ca"	
	}
	,CA_FR:
	{
		code:"ca",directory:"/ca/fr",viewAll:"Afficher tous les rÃ©sultats",searchText:"Recherche"	
	}
	,CH_DE:
	{
		code:"ce",viewAll:"Alle Suchergebnisse",noResults:"Kein Treffer in Kurzsuche. Vollsuche auf apple.com",searchText:"Suchen"	
	}
	,CH_FR:
	{
		code:"cr",viewAll:"Afficher tous les rÃ©sultats",noResults:"Pas de rÃ©sultat. Essayez une recherche apple.com",searchText:"Rechercher"	
	}
	,CN:null,DE:
	{
		code:"de",viewAll:"Alle Suchergebnisse",noResults:"Kein Treffer in Kurzsuche. Vollsuche auf apple.com",searchText:"Suchen"	
	}
	,DK:
	{
		code:"dk",noResults:"Ingen genvej fundet. PrÃ¸v at sÃ¸ge pÃ¥ hele apple.com.",viewAll:"Vis alle sÃ¸geresultater",searchText:"SÃ¸g"	
	}
	,ES:
	{
		code:"es",viewAll:"Ver todos los resultados de bÃºsqueda",noResults:"NingÃºn atajo. BÃºsqueda completa en apple.com",searchText:"Buscar"	
	}
	,FI:
	{
		code:"fi",noResults:"Ei oikotietÃ¤. Etsi koko apple.com.",viewAll:"Katso hakutulokset",searchText:"Etsi"	
	}
	,FR:
	{
		code:"fr",viewAll:"Afficher tous les rÃ©sultats",noResults:"Pas de rÃ©sultat. Essayez une recherche apple.com",searchText:"Rechercher"	
	}
	,HK:
	{
		code:"hk",noResults:"æ‰¾ä¸åˆ°å¿«é€Ÿæœå°‹çµæžœï¼Œè«‹è©¦è©¦ apple.com çš„å®Œæ•´æœå°‹",viewAll:"æª¢è¦–æ‰€æœ‰æœå°‹çµæžœ",searchText:"æœå°‹"	
	}
	,HK_EN:
	{
		code:"hk",directory:"/hk/en"	
	}
	,ID:
	{
		code:"id"	
	}
	,IE:
	{
		code:"ie"	
	}
	,IN:
	{
		code:"in"	
	}
	,IT:
	{
		code:"it",noResults:"Nessuna scorciatoia trovata. Provate su apple.com",viewAll:"Mostra tutti i risultati",searchText:"Cerca"	
	}
	,JP:
	{
		code:"jp",noResults:"ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚æ¤œç´¢ã¯ã“ã¡ã‚‰ã€‚",viewAll:"ã™ã¹ã¦ã®æ¤œç´¢çµæžœã‚’è¦‹ã‚‹",searchText:"Search"	
	}
	,KR:
	{
		code:"kr",noResults:"ì¼ì¹˜í•˜ëŠ” ê²€ìƒ‰ê²°ê³¼ê°€ ì—†ìŠµë‹ˆë‹¤. ë‹¤ì‹œ ê²€ìƒ‰í•˜ê¸°.",viewAll:"ê²€ìƒ‰ ê²°ê³¼ ì „ì²´ ë³´ê¸°."	
	}
	,LA:
	{
		code:"la",noResults:"No se encontraron resultados. Intenta en apple.com.",viewAll:"Ver todos los resultados de la bÃºsqueda",searchText:"Buscar"	
	}
	,LAE:
	{
		code:"lae",noResults:"No Shortcut found. Try a full search of apple.com.",viewAll:"View all search results",searchText:"Search"	
	}
	,MX:
	{
		code:"mx",noResults:"No se encontraron resultados. Intenta en apple.com.",viewAll:"Ver todos los resultados de la bÃºsqueda",searchText:"Buscar"	
	}
	,MY:
	{
		code:"my"	
	}
	,NL:
	{
		code:"nl",viewAll:"Toon alle zoekresultaten",noResults:"Niets gevonden. Zoek opnieuw binnen www.apple.com.",searchText:"Zoek"	
	}
	,NO:
	{
		code:"no",noResults:"Fant ingen snarvei. SÃ¸k pÃ¥ hele apple.com.",viewAll:"Vis alle sÃ¸keresultater",searchText:"SÃ¸k"	
	}
	,NZ:
	{
		code:"nz"	
	}
	,PH:
	{
		code:"ph"	
	}
	,PL:
	{
		code:"pl",noResults:"Fraza nie zostaÅ‚a odnaleziona. UÅ¼yj apple.com.",viewAll:"PrzeglÄ…daj wszystkie wyniki",searchText:"Szukaj"	
	}
	,PT:
	{
		code:"pt",noResults:"Nenhum resultado. Tente pesquisar em apple.com.",viewAll:"Ver todos os resultados de pesquisa",searchText:"Procurar"	
	}
	,RU:
	{
		code:"ru",noResults:"Ð¡ÑÑ‹Ð»Ð¾Ðº Ð½ÐµÑ‚. ÐŸÐ¾Ð¿Ñ€Ð¾Ð±ÑƒÐ¹Ñ‚Ðµ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ‹Ð¹ Ð¿Ð¾Ð¸ÑÐº.",viewAll:"ÐŸÐ¾ÐºÐ°Ð·Ð°Ñ‚ÑŒ Ð²ÑÐµ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ñ‹ Ð¿Ð¾Ð¸ÑÐºÐ°",searchText:"ÐŸÐ¾Ð¸ÑÐº"	
	}
	,SE:
	{
		code:"se",noResults:"Ingen genvÃ¤g hittad. SÃ¶k i hela apple.com.",viewAll:"Visa alla sÃ¶kresultat",searchText:"SÃ¶k"	
	}
	,SG:
	{
		code:"sg"	
	}
	,TH:
	{
		code:"th"	
	}
	,TW:
	{
		code:"tw",noResults:"å¿«é€Ÿæœå°‹æ‰¾ä¸åˆ°ï¼Œè©¦è©¦ apple.com å®Œæ•´æœå°‹",viewAll:"ç€è¦½æœç´¢çµæžœ",searchText:"æœå°‹"	
	}
	,UK:
	{
		code:"uk"	
	}
	,VN:
	{
		code:"vn"	
	}
	,ZA:
	{
		code:"za"	
	}
	,PO:null,TR:null,UA:null,RO:null,CZ:null,HU:null,BG:null,HR:null,GR:null,IS:null	
};

var enhanceSearch=function(b)
{
	var a=function(c)
	{
		var d=document.getElementById(c);
		if(d)
		{
			d.parentNode.removeChild(d)	
		}
	};
	document.getElementById("g-search").setAttribute("action",b);
	document.getElementById("g-search").setAttribute("method","GET");
a("search-oe");
	a("search-access");
a("search-site");
a("search-lr")	
};

function loadShortcuts()
{
	decorateGlobalSearchInput();
	if(typeof(searchCountry)=="undefined")
	{
		searchCountry="us"	
	}
	if(geoMap[searchCountry.toUpperCase()].directory)
	{
		var d=geoMap[searchCountry.toUpperCase()].directory
	}
	else
	{
		if(searchCountry!="us")
		{
			var d="/"+searchCountry.replace(/_/,"")	
		}
		else
		{
			d=""
		}
	}
	var c=
	{
		global:d+"/search/",downloads:d+"/search/",iphone:d+"/search/",ipoditunes:d+"/search/",mac:d+"/search/",store:"http://store.apple.com/"+d+"/search/",support:"http://www.info.apple.com/searchredir.html"	
	};
	var b=c[searchSection]||"/search/";
	b=b+="?sec="+window.searchSection;
	enhanceSearch(b);
	var a=navigator.userAgent.match(/AppleWebKit/i)&&navigator.userAgent.match(/Mobile/i);
	if(!a&&(typeof(deactivateSearchShortcuts)=="undefined"||!deactivateSearchShortcuts))
	{
		SearchShortcut.load()
	}
}

function shortcutsPageLoader(b)
{
	var a=window.onload;
	if(typeof window.onload!="function")
	{
		window.onload=b
	}
	else
	{
		window.onload=function()
		{
			a();
			b()	
		}
	}
}

shortcutsPageLoader(loadShortcuts);

var SearchShortcut=
{
	baseUrl:"http://www.apple.com/global/nav/scripts/shortcuts.php",minimumCharactersForSearch:0,entryDelay:150,currentRequest:false,descriptionCharacters:90,titleCharacters:39,isIe:false,init:function()
	{
		this.fullSearchUrl=document.getElementById("globalsearch").getElementsByTagName("form")[0].getAttribute("action");
		this.noResults=geoMap.US.noResults;
		this.viewAll=geoMap.US.viewAll;
		if(typeof(searchCountry)!="undefined"&&searchCountry)
		{
			this.noResults=geoMap[searchCountry.toUpperCase()].noResults||this.noResults;
			this.viewAll=geoMap[searchCountry.toUpperCase()].viewAll||this.viewAll	
		}
		this.html=
		{
			results:document.getElementById("sp-results").getElementsByTagName("div")[0],input:document.getElementById("sp-searchtext")	
		};
		if(navigator.userAgent.toLowerCase().indexOf("msie 6.")!=-1)
		{
			document.getElementById("sp-results").style.left="171px";
			this.isIe=true	
		}
		this.pausedControllers=[]	
	}
	,track:function(d,a)
	{
		if(typeof(s_gi)=="undefined"||!s_gi)
		{
			return
		}
		var c="appleglobal";
		var e="appleussearch";
		var b=null;
		if(typeof(searchCountry)!="undefined"&&searchCountry&&searchCountry!="US")
		{
			b=geoMap[searchCountry.toUpperCase()].code
		}
		if(b)
		{
			c="apple"+b+"global";
			e="apple"+b+"search"	
		}
		if(typeof(s_account)!="undefined"&&s_account.indexOf("appleussearch")==-1)
		{
			s=s_gi(s_account+","+e)
		}
		else
		{
			s=s_gi(c+","+e)	
		}
		s.prop4="";
		s.g_prop4="";
		s.prop6="";
		s.g_prop6="";
		s.pageName="";
		s.g_pageName="";
		s.pageURL="";
		s.g_pageURL="";
		s.g_channel="";
		s.linkTrackVars="eVar2,eVar4,prop7,prop10";
		s.eVar2="WWW-sc: "+d.toLowerCase();
		s.prop7="WWW-sc: "+d.toLowerCase();
		s.eVar4=a;
		s.prop10=a;
		s.tl(this,"o","Shortcut Search")	
	}
	,go:function(a)
	{
		SearchShortcut.track(SearchShortcut.searchText,a);
		document.location=a	
	}
	,search:function(c)
	{
		var a=this.baseUrl+"?q="+encodeURIComponent(c);
		if(typeof(searchSection)!="undefined"&&searchSection)
		{
			a+="&section="+searchSection
		}
		if(typeof(searchCountry)!="undefined"&&searchCountry)
		{
			a+="&geo="+searchCountry.toLowerCase()
		}
		this.spin();
		a+="&transport=js";
		var b=document.getElementsByTagName("head")[0];
		script=document.createElement("script");
		script.id="xdShortcutContainer";
		script.type="text/javascript";
		script.src=a;
		b.appendChild(script);
		SearchShortcut.scriptLoadTest()	
	}
	,scriptLoadTest:function()
	{
		var a=0;
		var b=window.setInterval(function()
		{
			a++;
			if(typeof(shortcutXml)!="undefined")
			{
				window.clearInterval(b)
			}
			else
			{
				if(a>20)
				{
					window.clearInterval(b);
					document.getElementById("sp-search-spinner").style.display="none"
				}
			}
		}
		,50)	
	}
	,loadXmlToDoc:function(b)
	{
		var a;
		if(window.ActiveXObject)
		{
			a=new ActiveXObject("Microsoft.XMLDOM");
			a.async="false";
			a.loadXML(b)	
		}
		else
		{
			var c=new DOMParser();
			a=c.parseFromString(b,"text/xml")
		}
		if(!this.html||!this.html.results)
		{
			this.init()	
		}
		document.getElementById("sp-search-spinner").style.display="none";
		this.term=a.getElementsByTagName("term")[0].firstChild.nodeValue;
		this.xml=a.getElementsByTagName("search_results")[0];
		this.parseResults(this.xml);
		if(this.results)
		{
			this.results.length>0?this.renderResults():this.renderNoResults()
		}
	}
	,spin:function()
	{
		document.getElementById("sp-search-spinner").style.display="block"
	}
	,parseResults:function(d)
	{
		var c=d.getElementsByTagName("error");
		if(c.length>0)
		{
			SearchShortcut.hideResults();
			return	
		}
		else
		{
			var f=d.getElementsByTagName("match");
			this.results=new Array();
			for(var e=0; e<(f.length); e++)
			{
				var a=f[e];
				var b=
				{
					title:a.getAttribute("title"),url:a.getAttribute("url"),desc:a.getAttribute("copy"),category:a.getAttribute("category"),priority:a.getAttribute("priority"),image:a.getAttribute("image")	
				};
				b.url=decodeURIComponent(b.url);
				this.results.push(b)	
			}
		}
	}
	,renderNoResults:function()
	{
		var d=this.noResults;
		this.html.results.innerHTML="";
		var b=document.createElement("ul");
		b.className="sp-results";
		listResult=document.createElement("li");
		listResult.className="firstCat resultCat";
		b.appendChild(listResult);
		listResult=document.createElement("li");
		listResult.id="sp-result-none";
		listResult.className="viewall";
		var a=document.createElement("div");
		a.className="hoverbox";
		var c=document.createElement("a");
		c.href=this.fullSearchUrl+"?q="+encodeURIComponent(this.term);
		c.innerHTML=d;
		listResult.appendChild(a);
		listResult.appendChild(c);
		listResult.url=this.fullSearchUrl+"?q="+encodeURIComponent(this.term);
		listResult.num=this.results.length;
		listResult.onclick=function()
		{
			SearchShortcut.go(this.url)
		};
		listResult.onmouseover=function()
		{
			SearchShortcut.itemSelected=true	
		};
		listResult.onmouseout=function()
		{
			SearchShortcut.itemSelected=false
		};
		b.appendChild(listResult);
		this.html.results.appendChild(b);
		document.getElementById("globalsearch").className="active"
	}
	,hideAllQuicktimeMovies:function()
	{
		if(typeof(AC)!="undefined"&&typeof(AC.Quicktime)!="undefined"&&typeof(AC.Quicktime.controllers)!="undefined")
		{
			function h(i)
			{
				var u=curtop=0;
				if(i.offsetParent)
				{
					u=i.offsetLeft;
					curtop=i.offsetTop;
					while(i=i.offsetParent)
					{
						u+=i.offsetLeft;
						curtop+=i.offsetTop	
					}
				}
				return[u,curtop]	
			}
			function q(v,A,E,I,u,z,C,H)
			{
				var y=v+E;
				var F=A+I;
				var x=u+C;
				var D=z+H;
				var w=Math.max(v,u);
				var B=Math.max(A,z);
				var G=Math.min(y,x);
				var i=Math.min(F,D);
				return G>w&&i>B	
			}
			var a=AC.Quicktime.controllers;
			var o=document.getElementById("sp-results");
			var l=
			{
				width:328,height:448	
			};
			var p=h(o);
			var e=p[0]-328;
			var d=p[1];
			var c=g+l.width;
			var b=f+l.height;
			for(var n=a.length-1; n>=0; n--)
			{
				var j=a[n].movie;
				var m=Element.getDimensions(j);
				var t=h(j);
				var g=t[0];
				var f=t[1];
				if(q(g,f,m.width,m.height,e,d,l.width,l.height))
				{
					this.pausedControllers.push(a[n]);
					a[n].Stop();
					a[n].movie.style.visibility="hidden"	
				}
			}
		}
		else
		{
			var k=document.getElementsByTagName("object");
			for(n=0; n<k.length; n++)
			{
				if(typeof(k[n].Stop)!="undefined")
				{
					k[n].Stop()	
				}
				try
				{
					if(typeof(k[n].getElementsByTagName("embed")[0].Stop)!="undefined")
					{
						k[n].getElementsByTagName("embed")[0].Stop()
					}
				}
				catch(r)
				{}
				k[n].style.visibility="hidden"	
			}
		}
	}
	,showAllQuicktimeMovies:function()
	{
		if(typeof(AC)!="undefined"&&typeof(AC.Quicktime)!="undefined"&&typeof(AC.Quicktime.controllers)!="undefined")
		{
			for(var b=this.pausedControllers.length-1; b>=0; b--)
			{
				this.pausedControllers[b].movie.style.visibility="visible";
				if(navigator.userAgent.match(/Firefox/i))
				{
					this.pausedControllers[b].movie.style.zIndex="100";
					setTimeout(this.pausedControllers[b].Play.bind(this.pausedControllers[b]),100)	
				}
				else
				{
					this.pausedControllers[b].Play()
				}
			}
			this.pausedControllers=[]	
		}
		else
		{
			var a=document.getElementsByTagName("object");
			for(b=0; b<a.length; b++)
			{
				a[b].style.visibility="visible";
				if(typeof(a[b].Play)!="undefined")
				{
					a[b].Play()
				}
				try
				{
					if(typeof(a[b].getElementsByTagName("embed")[0].Play)!="undefined")
					{
						a[b].getElementsByTagName("embed")[0].Play()
					}
				}
				catch(c)
				{}
			}
		}
	}
	,startFlashFixTimer:function()
	{
		var b=0;
		var a=setInterval(function()
		{
			SearchShortcut.flashDomRender();
			b++;
			if(b>50)
			{
				clearInterval(a)	
			}
		}
		,10)	
	}
	,border:5,flashDomFix:function()
	{
		document.getElementById("sp-results").firstChild.firstChild.style.border="5px none red";
		document.getElementById("globalsearch").onmousemove=function()
		{
			SearchShortcut.flashDomRender()
		}
	}
	,flashDomRender:function()
	{
		SearchShortcut.border%2==0?SearchShortcut.border++:SearchShortcut.border--;
		var a=document.getElementById("sp-results").firstChild.firstChild;
		if(a)
		{
			a.style.border=SearchShortcut.border+"px none red"
		}
	}
	,itemSelected:false,renderResults:function()
	{
		this.html.results.innerHTML="";
		var k=document.createElement("ul");
		k.className="sp-results";
		var m={};
		for(var h=0; h<this.results.length; h++)
		{
			var t=this.results[h];
			var q=unescape(t.desc);
			var e="";
			if(q.length>this.descriptionCharacters)
			{
				q=q.substring(0,q.lastIndexOf(" ",this.descriptionCharacters-11))+"&hellip;";
				e=unescape(t.desc)	
			}
			var d=unescape(t.title);
			if(d.length>this.titleCharacters)
			{
				d=d.substring(0,d.lastIndexOf(" ",30))+"&hellip;"
			}
			var g=document.createElement("li");
			g.id="sp-result-"+h;
			g.className="category-"+unescape(t.category).toLowerCase().replace(/\s+/g,"-");
			var c=document.createElement("div");
			c.className="hoverbox";
			var f=document.createElement("img");
			f.src=t.image;
			f.title=e;
			var p=document.createElement("span");
			p.className="text";
			var j=document.createElement("h4");
			var o=document.createElement("a");
			var b=document.createElement("p");
			o.href=decodeURIComponent(t.url);
			o.title=e;
			o.onclick=function()
			{
				SearchShortcut.go(decodeURIComponent(t.url))
			};
			o.innerHTML=d;
			b.innerHTML=q;
			b.title=e;
			j.appendChild(o);
			p.appendChild(j);
			p.appendChild(b);
			g.appendChild(c);
			g.appendChild(f);
			g.appendChild(p);
			g.url=t.url;
			g.num=h;
			g.onmouseover=function()
			{
				SearchShortcut.itemSelected=true;
				SearchShortcut.highlight(this)	
			};
			g.onmouseup=function()
			{
				SearchShortcut.itemSelected=true;
				SearchShortcut.go(this.url)	
			};
			g.onmouseout=function()
			{
				SearchShortcut.itemSelected=false;
				SearchShortcut.unhighlight(this)	
			};
			g.priority=parseInt(t.priority);
			if(!m[t.category])
			{
				m[t.category]=new Array()
			}
			m[t.category].push(g)	
		}
		var l="firstCat resultCat";
		for(var n in m)
		{
			if(!m.hasOwnProperty(n))
			{
				continue
			}
			g=document.createElement("li");
			g.className=l;
			g.innerHTML=unescape(n);
			l="resultCat";
			k.appendChild(g);
			for(var a=0; a<m[n].length; a++)
			{
				k.appendChild(m[n][a])	
			}
		}
		g=document.createElement("li");
		g.id="sp-result-"+this.results.length;
		g.className="viewall";
		var c=document.createElement("div");
		c.className="hoverbox";
		var o=document.createElement("a");
		o.href=this.fullSearchUrl+"?q="+encodeURIComponent(this.term);
		o.innerHTML=this.viewAll;
		g.appendChild(c);
		g.appendChild(o);
		g.url=this.fullSearchUrl+"?q="+encodeURIComponent(this.term);
		g.num=this.results.length;
		g.onclick=function()
		{
			SearchShortcut.go(this.url)	
		};
		g.onmouseover=function()
		{
			SearchShortcut.itemSelected=true
		};
		g.onmouseout=function()
		{
			SearchShortcut.itemSelected=false	
		};
		document.getElementById("globalsearch").className="active";
		k.appendChild(g);
		this.html.results.appendChild(k);
		this.hideAllQuicktimeMovies();
		if(typeof(flashOnPage)!="undefined"&&flashOnPage)
		{
			this.flashDomFix();
			this.startFlashFixTimer()
		}
	}
	,startKeystrokeTimer:function()
	{
		if(this.timeoutId)
		{
			window.clearTimeout(this.timeoutId)
		}
		this.timeoutId=window.setTimeout("SearchShortcut.commitKeystroke()",this.entryDelay)
	}
	,commitKeystroke:function()
	{
		this.search(this.searchText)	
	}
	,hideResults:function(a,b)
	{
		if(!this.html)
		{
			this.init()
		}
		this.selected=null;
		document.getElementById("globalsearch").className="";
		this.html.results.innerHTML="";
		this.showAllQuicktimeMovies()	
	}
	,highlight:function(a)
	{
		a.className="hoverli"	
	}
	,keyHighlight:function(a)
	{
		if(this.selected)
		{
			this.selected.className=""
		}
		this.selected=a;
		a.className="hoverli"	
	}
	,unhighlight:function(a)
	{
		a.className=""	
	}
	,load:function()
	{
		var d=document.createElement("img");
		if(location.protocol.match(/https/))
		{
			d.src="http://twmac.local/SGIRadio/images/search/spinner.gif"
		}
		else
		{
			d.src="http://twmac.local/SGIRadio/images/search/spinner.gif"	
		}
		d.width="11";
		d.height="11";
		d.border="0";
		d.alt="*";
		d.id="sp-search-spinner";
		d.style.display="none";
		document.getElementById("globalsearch").appendChild(d);
		var b=document.getElementById("g-search"),c=document.getElementById("search-section"),a;
		if(!c)
		{
			a=b.getElementsByTagName("div")[0];
			if(!a)
				{
					a=b	
				}
				c=document.createElement("input");
				c.id="search-section";
				c.type="hidden";
				c.name="sec";
				c.value=window.searchSection;
				a.appendChild(c)	
			}
			else
			{
				if(c)
				{
					c.value=window.searchSection	
				}
			}
			b.onsubmit=function(e)
			{
				return false
			};
			if(navigator.userAgent.match(/AppleWebKit/i))
			{
				document.getElementById("sp-searchtext").onkeydown=function(e)
				{
					var f=typeof(event)!="undefined"?event.keyCode:e.keyCode;
					if(!e)
					{
						e=event	
					}
					if(f==13&&!e.altKey)
					{
						if(e.target.value.length===0)
						{
							return false	
						}
						if(SearchShortcut.selected)
						{
							SearchShortcut.go(SearchShortcut.selected.url)
						}
						else
						{
							SearchShortcut.hideResults();
							document.getElementById("g-search").submit()
						}
					}
				}
			}
			document.getElementById("sp-searchtext").onkeyup=function(e)
			{
				var g=typeof(event)!="undefined"?event.keyCode:e.keyCode;
				if(!e)
				{
					e=event	
				}
				if(g==40&&SearchShortcut.results)
				{
					try
					{
						e.preventDefault();
						e.stopPropagation()
					}
					catch(h)
					{}
					if(SearchShortcut.selected&&(SearchShortcut.results.length>SearchShortcut.selected.num+1))
					{
						SearchShortcut.keyHighlight(document.getElementById("sp-result-"+(SearchShortcut.selected.num+1)))
					}
					if(!SearchShortcut.selected&&SearchShortcut.results.length>0)
					{
						SearchShortcut.keyHighlight(document.getElementById("sp-result-0"))
					}
					SearchShortcut.flashDomRender()	
				}
				else
				{
					if(g==38&&SearchShortcut.results)
					{
						try
						{
							e.preventDefault();
							e.stopPropagation()	
						}
						catch(h)
						{}
						if(SearchShortcut.selected&&SearchShortcut.selected.num>0)
						{
							SearchShortcut.keyHighlight(document.getElementById("sp-result-"+(SearchShortcut.selected.num-1)))
						}
						SearchShortcut.flashDomRender()	
					}
					else
					{
						if(g==27)
						{
							SearchShortcut.hideResults();
							document.getElementById("sp-searchtext").value=""
						}
						else
						{
							SearchShortcut.selected=false;
							var f=document.getElementById("sp-searchtext").value;
							f=f.replace(/[%\^\?\!\*\/<>\$]/ig,"");
							f=f.replace(/^\s+/g,"").replace(/\s+$/g,"");
							if(f.length<1&&SearchShortcut.html)
							{
								SearchShortcut.html.results.innerHTML="";
								document.getElementById("sp-search-spinner").style.display="none";
								SearchShortcut.hideResults()	
							}
							else
							{
								if(f.length>SearchShortcut.minimumCharactersForSearch)
								{
									SearchShortcut.searchText=f;
									SearchShortcut.startKeystrokeTimer()	
								}
							}
						}
					}
				}
			}
		}
};

function decorateGlobalSearchInput()
{
	var l=document.getElementById("sp-searchtext");
	var e=null;
	var d=0;
	var i="Music Search";
	if(typeof(searchCountry)=="undefined")
	{
		searchCountry="us"
	}
	if(geoMap[searchCountry.toUpperCase()].searchText)
	{
		i=geoMap[searchCountry.toUpperCase()].searchText
	}
	var h="";
	if(navigator.userAgent.match(/AppleWebKit/i))
	{
		if(navigator.userAgent.match(/win/i))
		{
			l.className+=" not-round"
		}
		l.setAttribute("type","search");
		if(!l.getAttribute("results"))
		{
			l.setAttribute("results",d)
		}
		if(null!=i)
		{
			l.setAttribute("placeholder",i);
			l.setAttribute("autosave",h)	
		}
		l.onblur=function()
		{
			if(!SearchShortcut.itemSelected)
			{
				SearchShortcut.hideResults()
			}
		}
	}
	else
	{
		l.setAttribute("autocomplete","off");
		e=document.createElement("input");
		l.parentNode.replaceChild(e,l);
		var b=document.createElement("span");
		b.className="left";
		var j=document.createElement("span");
		j.className="right";
		var g=document.createElement("div");
		g.className="reset";
		var a=document.createElement("div");
		a.className="search-wrapper";
		var f=l.value==i;
		var c=l.value.length==0;
		if(f||c)
		{
			l.value=i;
			a.className+=" blurred empty"
		}
		a.appendChild(b);
		a.appendChild(l);
		a.appendChild(j);
		a.appendChild(g);
		l.onfocus=function()
		{
			var m=a.className.indexOf("blurred")>-1;
			if(l.value==i&&m)
			{
				l.value=""	
			}
			a.className=a.className.replace("blurred","")	
		};
		l.onblur=function()
		{
			if(!SearchShortcut.itemSelected)
			{
				SearchShortcut.hideResults()
			}
			if(l.value=="")
			{
				a.className+=" empty";
				l.value=i	
			}
			a.className+=" blurred"	
		};
		l.onkeydown=function(m)
		{
			var o=typeof(event)!="undefined"?event.keyCode:m.keyCode;
			if(!m)
			{
				m=event	
			}
			if(o==13&&!m.altKey)
			{
				var n=null;
				if(m.target)
				{
					n=m.target	
				}
				else
				{
					if(m.srcElement)
					{
						n=m.srcElement
					}
				}
				if(n.value.length===0)
				{
					return false	
				}
				if(SearchShortcut.selected)
				{
					SearchShortcut.go(SearchShortcut.selected.url)
				}
				else
				{
					SearchShortcut.hideResults();
					document.getElementById("g-search").submit()
				}
				return	
			}
			if(l.value.length>=0)
			{
				a.className=a.className.replace("empty","")	
			}
			k()	
		};
		var k=function()
		{
			return(function(m)
			{
				var n=false;
				if(!m)
				{
					m=window.event	
				}
				if(m.type=="keydown")
				{
					if(m.keyCode!=27)
					{
						return
					}
					else
					{
						n=true	
					}
				}
				l.blur();
				l.value="";
				a.className+=" empty";
				l.focus()	
			})
		};
		g.onmousedown=k();
		if(e)
		{
			e.parentNode.replaceChild(a,e)	
		}
	}
};

