﻿// if JavaScript is enabled, hide the 'no-script' list of links, and show the ajax-driven menu
// these two lines MUST be below the elements they reference in the DOM (towards the bottom of the page)
$(".no-script").hide();
$(".sections").show();

// namespace
if (typeof HAT == "undefined" || !HAT)
{
    var HAT = {};
}

HAT.Languages = {
    lang: [
		{
		    intelcode: "ara",
		    textdirection: "rtl",
		    culture: "ar_AE",
		    countryval: "GlobalGateway_UAE_Arabic",
		    countrylang: ["Algeria - Arabic", "Bahrain - Arabic", "Iraq - Arabic", "Jordan - Arabic", "Kuwait - Arabic", "Lebanon - Arabic", "Morocco - Arabic", "Mauritania - Arabic", "Oman - Arabic", "Qatar - Arabic", "Tunisia - Arabic", "United Arab Emirates - Arabic", "Yemen - Arabic"],
		    fonttype: "HAT-font2"
		},
		{
		    intelcode: "ara",
		    textdirection: "rtl",
		    culture: "ar_AR",
		    countryval: "",
		    countrylang: [],
		    fonttype: "HAT-font2"
		},
		{
		    intelcode: "ara",
		    textdirection: "rtl",
		    culture: "ar_EG",
		    countryval: "GlobalGateway_Egypt_Arabic",
		    countrylang: ["Egypt - Arabic"],
		    fonttype: "HAT-font2"
		},
		{
		    intelcode: "ara",
		    textdirection: "rtl",
		    culture: "ar_SA",
		    countryval: "GlobalGateway_SaudiArabia_Arabic",
		    countrylang: ["Saudi Arabia - Arabic", "Middle East - Arabic"],
		    fonttype: "HAT-font2"
		},
		{
		    intelcode: "eng",
		    textdirection: "ltr",
		    culture: "en_SA",
		    countryval: "GlobalGateway_SaudiArabia_English.xml",
		    countrylang: ["Saudi Arabia - English", "United Arab Emirates - English", "Egypt - English", "Middle East - English"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "aze",
		    textdirection: "ltr",
		    culture: "az_AZ",
		    countryval: "",
		    countrylang: [],
		    fonttype: "HAT-font6"
		},
		{
		    intelcode: "ces",
		    textdirection: "ltr",
		    culture: "cs_CZ",
		    countryval: "/cd/corporate/europe/emea/ces/index.htm",
		    countrylang: ["Czech Republic - Czech"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "deu",
		    textdirection: "ltr",
		    culture: "de_DE",
		    countryval: "GlobalGateway_Germany_German",
		    countrylang: ["Austria - German", "Europe - German", "Germany - German", "Liechtenstein - German", "Switzerland - German"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "eng",
		    textdirection: "ltr",
		    culture: "en_AP",
		    countryval: "GlobalGateway_APAC_English",
		    countrylang: ["Asia Pacific - English", "Hong Kong - English", "Malaysia - English", "New Zealand - English", "Pakistan - English", "Philippines - English", "Singapore - English"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "eng",
		    textdirection: "ltr",
		    culture: "en_AU",
		    countryval: "GlobalGateway_Australia_English",
		    countrylang: ["Australia - English"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "eng",
		    textdirection: "ltr",
		    culture: "en_IN",
		    countryval: "GlobalGateway_India_English",
		    countrylang: ["India - English"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "sin",
		    textdirection: "ltr",
		    culture: "en_SG",
		    countryval: "",
		    countrylang: [],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "eng",
		    textdirection: "ltr",
		    culture: "en_UK",
		    countryval: "GlobalGateway_UnitedKingdom_English",
		    countrylang: ["Africa - English", "Belgium - English", "Czech Republic - English", "Denmark - English", "Estonia - English", "Europe - English", "Finland - English", "Gambia - English", "Greece - English", "Hungary - English", "Iceland - English", "Ireland - English", "Kenya - English", "Latvia - English", "Lithuania - English", "Luxembourg - English", "Nigeria - English", "Norway - English", "Romania - English", "Rwanda - English", "Tanzania - English", "United Kingdom - English", "Zimbabwe - English"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "eng",
		    textdirection: "ltr",
		    culture: "en_US",
		    countryval: "GlobalGateway_UnitedStates_English",
		    countrylang: ["United States - English", "Canada - English"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "spa",
		    textdirection: "ltr",
		    culture: "es_ES",
		    countryval: "GlobalGateway_Spain_Spanish",
		    countrylang: ["Spain - Spanish"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "esla",
		    textdirection: "ltr",
		    culture: "es_LA",
		    countryval: "GlobalGateway_LatinAmerica_Spanish",
		    countrylang: ["Argentina - Spanish", "Chile - Spanish", "Colombia - Spanish", "Costa Rica - Spanish", "Latin America - Spanish", "Mexico - Spanish", "Venezuela - Spanish", "Peru - Spanish", "Bolivia - Spanish", "Uruguay - Spanish"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "espanol",
		    textdirection: "ltr",
		    culture: "es_MX",
		    countryval: "",
		    countrylang: [],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "fra",
		    textdirection: "ltr",
		    culture: "fr_FR",
		    countryval: "GlobalGateway_France_French",
		    countrylang: ["Canada - French", "France - French", "Belgium – French"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "heb",
		    textdirection: "rtl",
		    culture: "he_IL",
		    countryval: "/cd/corporate/europe/emea/heb/287256.htm",
		    countrylang: ["Israel - Hebrew"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "hun",
		    textdirection: "ltr",
		    culture: "hu_HU",
		    countryval: "/cd/corporate/europe/emea/hun/index.htm",
		    countrylang: ["Hungary - Hungarian"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "bah",
		    textdirection: "ltr",
		    culture: "id_ID",
		    countryval: "/id_ID/index.htm",
		    countrylang: ["Indonesia - Bahasa"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "ita",
		    textdirection: "ltr",
		    culture: "it_IT",
		    countryval: "GlobalGateway_Italy_Italian",
		    countrylang: ["Italy - Italian"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "jpn",
		    textdirection: "ltr",
		    culture: "ja_JP",
		    countryval: "GlobalGateway_Japan_Japanese",
		    countrylang: ["Japan - Japanese"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "kor",
		    textdirection: "ltr",
		    culture: "ko_KR",
		    countryval: "GlobalGateway_Korea_Korean",
		    countrylang: ["Korea - Korean"],
		    fonttype: "HAT-font5"
		},
		{
		    intelcode: "nla",
		    textdirection: "ltr",
		    culture: "nl_NL",
		    countryval: "GlobalGateway_Netherlands_Dutch",
		    countrylang: ["Netherlands - Dutch", "Belgium – Netherlands"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "pol",
		    textdirection: "ltr",
		    culture: "pl_PL",
		    countryval: "GlobalGateway_Poland_Polish",
		    countrylang: ["Poland - Polish"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "portugues",
		    textdirection: "ltr",
		    culture: "pt_BR",
		    countryval: "GlobalGateway_Brazil_Portuguese",
		    countrylang: ["Brazil - Portuguese"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "rom",
		    textdirection: "ltr",
		    culture: "ro_RO",
		    countryval: "",
		    countrylang: [],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "rus",
		    textdirection: "ltr",
		    culture: "ru_RU",
		    countryval: "GlobalGateway_Russia_Russian",
		    countrylang: ["Russia - Russian"],
		    fonttype: "HAT-font4"
		},
		{
		    intelcode: "swe",
		    textdirection: "ltr",
		    culture: "sv_SE",
		    countryval: "GlobalGateway_Sweden_Swedish",
		    countrylang: ["Sweden - Swedish"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "tur",
		    textdirection: "ltr",
		    culture: "tr_TR",
		    countryval: "GlobalGateway_Turkey_Turkish",
		    countrylang: ["Turkey - Turkish"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "tha",
		    textdirection: "ltr",
		    culture: "th_TH",
		    countryval: "GlobalGateway_Thailand_Thai",
		    countrylang: ["Thailand - Thai"],
		    fonttype: "GG-Thai-font"
		},
		{
		    intelcode: "vie",
		    textdirection: "ltr",
		    culture: "vi_VN",
		    countryval: "/vi_VN/index.htm",
		    countrylang: ["Vietnam - Vietnamese"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "zho",
		    textdirection: "ltr",
		    culture: "zh_CN",
		    countryval: "GlobalGateway_China_SimplifiedChinese",
		    countrylang: ["China - Simplified Chinese"],
		    fonttype: "HAT-font3"
		},
		{
		    intelcode: "ukr",
		    textdirection: "ltr",
		    culture: "uk_UA",
		    countryval: "/cd/corporate/europe/emea/rus/ukraine/index.htm",
		    countrylang: ["Ukraine - Ukrainian"],
		    fonttype: "HAT-font1"
		},
		{
		    intelcode: "zht",
		    textdirection: "ltr",
		    culture: "zh_TW",
		    countryval: "GlobalGateway_Taiwan_TraditionalChinese",
		    countrylang: ["Taiwan - Traditional Chinese"],
		    //fonttype:"HAT-font3"
		    fonttype: "GG-Taiwan-font"
		}
	]
}

HAT.Countries = [
		{
		deeplink: 'en_US_01',
		name: 'United States - English',
		sot: {
		    image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
		    imagewidth:'773px',
		    text: 'The All New 2010 Intel&#174; Core&trade; Processor Family. Not just faster. Smarter. Learn More &#x3E;',
		    href: '/consumer/products/processors/core-family.htm?iid=en_us_01_core+gg_headline'
        },
        image: '/homepage/pix/bg/bg-global-gateway-2010core.jpg',
		menu: '/homepage/xml/GlobalGateway_UnitedStates_English.xml'
	},
	{
	    deeplink: 'es_LA_06',
	    name: 'Argentina - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_06_core+gg_headline'
	    },
	    localizedName: 'Argentina - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'en_AP_00',
	    name: 'Asia Pacific - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '773px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_AP/consumer/products/processors/core-family.htm?iid=en_AP_00_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_APAC_English.xml'
	},
	{
	    deeplink: 'en_AU_01',
	    name: 'Australia - English',

	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_superbowl.gif',
	        imagewidth: '773px',
	        text: 'The All New 2010 Intel&#174; Core&trade; Processor Family. Not just faster. Smarter. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_AU/consumer/products/processors/core-family.htm?iid=en_AU_01_core+gg_headline'
	    },
	    image: '/homepage/pix/bg/bg-global-gateway.superbowl.jpg',
	    menu: '/homepage/xml/GlobalGateway_Australia_English.xml'
	},
	{
	    deeplink: 'de_DE_01',
	    name: 'Austria - German',
	    localizedName: 'Austria - Deutsch',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.de_DE_2010core.gif',
	        imagewidth: '793px',
	        text: 'Die ganz neuen 2010er Intel® Core™ Prozessoren. Nicht nur schnell. Intelligent. Weitere Informationen &#x3E;',
	        href: 'http://www.intel.com/de_de/consumer/products/processors/core-family.htm?iid=de_DE_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_Germany_German.xml'
	},
	{
	    deeplink: 'fr_BE_01',
	    name: 'Belgium – French',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.fr_FR_2010core.gif',
	        imagewidth: '872px',
	        text: 'Nouvelle famille de processeurs Intel ® Core™ en 2010 . Plus rapides ET plus astucieux. Suite',
	        href: 'http://www.intel.com/fr_fr/consumer/products/processors/core-family.htm?iid=fr_BE_01_core+gg_headline'
	    },
	    localizedName: 'Belgium – Français',
	    menu: '/homepage/xml/GlobalGateway_France_French.xml'
	},
	{
	    deeplink: 'nl_BE_01',
	    name: 'Belgium – Netherlands',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.nl_BE_2010core.gif',
	        imagewidth: '936px',
	        text: 'De geheel nieuwe Intel® Core™ processorfamilie van 2010. Niet alleen sneller. Ook intelligenter. Meer weten &#x3E;',
	        href: 'http://www.intel.com/nl_nl/consumer/products/processors/core-family.htm?iid=nl_BE_01_core+gg_headline'
	    },
	    localizedName: 'Belgium – Nederlands',
	    menu: '/homepage/xml/GlobalGateway_Netherlands_Dutch.xml'
	},
	{
	    deeplink: 'es_LA_07',
	    name: 'Bolivia - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_07_core+gg_headline'
	    },
	    localizedName: 'Bolivia - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'pt_BR_01',
	    name: 'Brazil - Portuguese',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.pt_BR_2010core.gif',
	        imagewidth: '820px',
	        text: 'A nova família de processadores Intel® Core™ 2010. Mais rápidos e mais inteligentes. Saiba mais &#x3E;',
	        href: 'http://www.intel.com/portugues/core/inside/index.htm?iid=pt_BR_01_core+gg_headline'
	    },
	    localizedName: 'Brazil - Português',
	    menu: '/homepage/xml/GlobalGateway_Brazil_Portuguese.xml'
	},
	{
	    deeplink: 'en_CA_01',
	    name: 'Canada - English',
	    link: '/en_CA/index.htm'
	},
	{
	    deeplink: 'fr_CA_01',
	    name: 'Canada - French',
	    localizedName: 'Canada - Français',
	    link: '/fr_CA/index.htm'
	},
	{
	    deeplink: 'es_LA_02',
	    name: 'Chile - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. 	Más información &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_02_core+gg_headline'
	    },
	    localizedName: 'Chile - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'zh_CN_01',
	    name: 'China - Simplified Chinese',
	    localizedName: 'China - 简体中文',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.zh_CN_2010core.gif',
	        imagewidth: '',
	        text: '2010全新英特尔® 酷睿™ 处理器家族.  以智变 应万变 了解更多 &#x3E;',
	        href: 'http://www.intel.com/cn/10newcore/index.htm?iid=zh_CN_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_China_SimplifiedChinese.xml'
	},
	{
	    deeplink: 'es_LA_03',
	    name: 'Colombia - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información  &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_03_core+gg_headline'
	    },
	    localizedName: 'Colombia - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'es_CR_01',
	    name: 'Costa Rica - Spanish',
	    localizedName: 'Costa Rica - Español',
	    link: '/costarica/index.htm'
	},
	{
	    deeplink: 'cz_CZ_01',
	    name: 'Czech Republic - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core_01.gif',
	        imagewidth: '773px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster.'
	    },
	    menu: '/homepage/xml/GlobalGateway_UnitedKingdom_English.xml'
	},
	{
	    deeplink: 'en_EG_01',
	    name: 'Egypt - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '773px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_SA/consumer/products/processors/core-family.htm?iid=en_EG_01_core+gg_headline'

	    },
	    menu: '/homepage/xml/GlobalGateway_SaudiArabia_English.xml'
	},
	{
	    deeplink: 'ar_EG_01',
	    name: 'Egypt - Arabic',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.ar_SA_2010core.gif',
	        imagewidth: '617px',
	        text: 'الجديدة تماماً لعام 2010  Intel® Core™. إنها ليست أسرع فحسب، بل أذكى أيضاً.تعرّف إلى المزيد ',
	        href: 'http://www.intel.com/ar_SA/consumer/products/processors/core-family.htm?iid=ar_EG_01_core+gg_headline'
	    },
	    localizedName: 'Egypt - عربي',
	    menu: '/homepage/xml/GlobalGateway_Egypt_Arabic.xml'
	},
	{
	    deeplink: 'fr_FR_01',
	    name: 'France - French',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.fr_FR_2010core.gif',
	        imagewidth: '872px',
	        text: 'Nouvelle famille de processeurs Intel ® Core™ en 2010. Plus rapides ET plus astucieux. Suite...',
	        href: 'http://www.intel.com/fr_fr/consumer/products/processors/core-family.htm?iid=fr_FR_01_core+gg_headline'
	    },
	    localizedName: 'France - Français',
	    menu: '/homepage/xml/GlobalGateway_France_French.xml'
	},
	{
	    deeplink: 'de_DE_03',
	    name: 'Germany - German',
	    localizedName: 'Germany - Deutsch',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.de_DE_2010core.gif',
	        imagewidth: '793px',
	        text: 'Die ganz neuen 2010er Intel® Core™ Prozessoren. Nicht nur schnell. Intelligent.	Weitere Informationen &#x3E;',
	        href: 'http://www.intel.com/de_De/consumer/products/processors/core-family.htm?iid=de_DE_03_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_Germany_German.xml'
	},
	{
	    deeplink: 'en_AP_01',
	    name: 'Hong Kong - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '773px',
	        text: 'Intel is working on the technology of the future today. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_AP/consumer/products/processors/core-family.htm?iid=en_AP_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_APAC_English.xml'
	},
	{
	    deeplink: 'hu_HU_01',
	    name: 'Hungary - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '773px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_UK/consumer/products/processors/core-family.htm?iid=hu_HU_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_UnitedKingdom_English.xml'
	},
	{
	    deeplink: 'en_IN_01',
	    name: 'India - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '773px',
	        text: 'Intel is working on the technology of the future today. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_IN/consumer/products/processors/core-family.htm?iid=en_IN_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_India_English.xml'
	},
	{
	    deeplink: 'id_ID_01',
	    name: 'Indonesia - Bahasa',
	    link: '/id_ID/index.htm'
	},
	{
	    deeplink: 'en_UK_16',
	    name: 'Ireland - English',
	    link: '/corporate/europe/emea/irl/intel/index.htm'
	},
	{
	    deeplink: 'he_IL_01',
	    name: 'Israel - Hebrew',
	    localizedName: 'Israel - עברית',
	    link: 'http://www.intel.com/cd/corporate/europe/emea/heb/287256.htm'
	},
	{
	    deeplink: 'it_IT_01',
	    name: 'Italy - Italian',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.it_IT_2010core.gif',
	        imagewidth: '811px',
	        text: 'Nuova famiglia di processori Intel® Core™ del 2010. Non solo più veloce, più intelligente. Per saperne di più &#x3E;',
	        href: 'http://www.intel.com/it_it/consumer/products/processors/core-family.htm?iid=it_IT_01_core+gg_headline'
	    },
	    localizedName: 'Italy - Italiano',
	    menu: '/homepage/xml/GlobalGateway_Italy_Italian.xml'
	},
	{
	    deeplink: 'ja_JP_01',
	    name: 'Japan - Japanese',
	    localizedName: 'Japan - 日本語',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.ja_JP_2010core.gif',
	        imagewidth: '806px',
	        text: '新 2010 インテル® Core™ プロセッサー・ファミリー. より速く、よりスマートに。	詳しくはこちら&#x3E;',
	        href: 'http://www.intel.com/ja_JP/consumer/products/processors/core-family.htm?iid=ja_JP_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_Japan_Japanese.xml',
	    imagelink: '#jp-link'
	},
	{
	    deeplink: 'ko_KR_01',
	    name: 'Korea - Korean',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.ko_KR_2010core.gif',
	        imagewidth: '851px',
	        text: '새롭게 선보이는 2010년 인텔® 코어™ 프로세서 제품군. 더 빠르고, 더 스마트하게 자세한 내용  &#x3E;',
	        href: 'http://www.intel.com/ko_KR/consumer/products/processors/core-family.htm?iid=ko_KR_01_core+gg_headline'
	    },
	    localizedName: 'Korea - 한국어',
	    menu: '/homepage/xml/GlobalGateway_Korea_Korean.xml'
	},
	{
	    deeplink: 'es_LA_01',
	    name: 'Latin America - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información  &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_01_core+gg_headline'
	    },
	    localizedName: 'Latin America - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'en_AP_03',
	    name: 'Malaysia - English',
	    link: '/en_MY/index.htm'
	},
	{
	    deeplink: 'es_LA_04',
	    name: 'Mexico - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información  &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_04_core+gg_headline'
	    },
	    localizedName: 'Mexico - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'en_XR_01',
	    name: 'Middle East - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '774px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_SA/consumer/products/processors/core-family.htm?iid=en_XR_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_SaudiArabia_English.xml'
	},
	{
	    deeplink: 'ar_XR_01',
	    name: 'Middle East - Arabic',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.ar_SA_2010core.gif',
	        imagewidth: '617px',
	        text: 'الجديدة تماماً لعام 2010  Intel® Core™. إنها ليست أسرع فحسب، بل أذكى أيضاً.تعرّف إلى المزيد ',
	        href: 'http://www.intel.com/ar_SA/consumer/products/processors/core-family.htm?iid=ar_XR_01_core+gg_headline'
	    },
	    localizedName: 'Middle East – عربي',
	    menu: '/homepage/xml/GlobalGateway_SaudiArabia_Arabic.xml'
	},
	{
	    deeplink: 'nl_NL_01',
	    name: 'Netherlands - Dutch',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.nl_NL_2010core.gif',
	        imagewidth: '936px',
	        text: 'De geheel nieuwe Intel® Core™ processorfamilie van 2010. Niet alleen sneller. Ook slimmer. Meer weten &#x3E;',
	        href: 'http://www.intel.com/nl_nl/consumer/products/processors/core-family.htm?iid=nl_NL_01_core+gg_headline'
	    },
	    localizedName: 'Netherlands - Nederlands',
	    menu: '/homepage/xml/GlobalGateway_Netherlands_Dutch.xml'
	},
	{
	    deeplink: 'en_AP_04',
	    name: 'New Zealand - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '774px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_AP/consumer/products/processors/core-family.htm?iid=en_AP_04_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_APAC_English.xml'
	},
	{
	    deeplink: 'en_AP_05',
	    name: 'Pakistan - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '774px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_AP/consumer/products/processors/core-family.htm?iid=en_AP_05_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_APAC_English.xml'
	},
	{
	    deeplink: 'es_LA_08',
	    name: 'Peru - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información  &#x3E;',
	        href: 'http://intel.com/espanol/core/inside/index.htm?iid=es_LA_08_core+gg_headline'
	    },
	    localizedName: 'Peru - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'en_AP_06',
	    name: 'Philippines - English',
	    link: '/en_PH/index.htm'
	},
	{
		deeplink: 'pl_PL_01',
		name: 'Poland - Polish',
		sot: {
		    image: '/homepage/pix/bg/bg-sot.pl_PL_2010core.gif',
		    imagewidth: '714px',
		    text: 'Nowe procesory z rodziny Intel® Core™ na 2010. Oprócz szybkości, liczy się inteligencja. Więcej informacji &#x3E;',
			href:'http://www.intel.com/pl_pl/consumer/products/processors/core-family.htm?iid=pl_PL_01_core+gg_headline'
		},
		localizedName: 'Polska - Polski',
		menu: '/homepage/xml/GlobalGateway_Poland_Polish.xml'
	},
	{
	    deeplink: 'ru_RU_05',
	    name: 'Russia - Russian',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.ru_RU_2010core.gif',
	        imagewidth: '859px',
	        text: 'Новое семейство процессоров Intel® Core™ 2010 года.. Не только быстрее. Еще и умнее.	Подробнее &#x3E;',
	        href: 'http://www.intel.com/ru_ru/consumer/products/processors/core-family.htm?iid=ru_RU_05_core+gg_headline'
	    },
	    localizedName: 'Russia - Русский',
	    menu: '/homepage/xml/GlobalGateway_Russia_Russian.xml'
	},
	{
	    deeplink: 'en_SA_01',
	    name: 'Saudi Arabia - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '774px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_SA/consumer/products/processors/core-family.htm?iid=en_SA_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_SaudiArabia_English.xml'
	},
	{
	    deeplink: 'ar_SA_01',
	    name: 'Saudi Arabia - Arabic',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.ar_SA_2010core.gif',
	        imagewidth: '',
	        text: 'الجديدة تماماً لعام 2010  Intel® Core™. إنها ليست أسرع فحسب، بل أذكى أيضاً.تعرّف إلى المزيد ',
	        href: 'http://www.intel.com/ar_SA/consumer/products/processors/core-family.htm?iid=ar_SA_01_core+gg_headline'
	    },
	    localizedName: 'Saudi Arabia – عربي',
	    menu: '/homepage/xml/GlobalGateway_SaudiArabia_Arabic.xml'
	},
	{
	    deeplink: 'en_AP_07',
	    name: 'Singapore - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '774px',
	        text: 'Intel is working on the technology of the future today. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_AP/consumer/products/processors/core-family.htm?iid=en_AP_07_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_APAC_English.xml'
	},
	{
	    deeplink: 'en_ZA_01',
	    name: 'South Africa - English',
	    link: 'http://www.intel.com/cd/corporate/africa/emea/eng/za/index.htm'
	},
	{
	    deeplink: 'es_ES_01',
	    name: 'Spain - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_ES_2010core.gif',
	        imagewidth: '809px',
	        text: 'La nueva familia de procesadores Intel® Core™ del 2010. No sólo más rápida, sino más inteligente. Más información  &#x3E;',
	        href: 'http://www.intel.com/es_es/consumer/products/processors/core-family.htm?iid=es_ES_01_core+gg_headline'
	    },
	    localizedName: 'Spain - Español',
	    menu: '/homepage/xml/GlobalGateway_Spain_Spanish.xml'
	},
	{
	    deeplink: 'sv_SE_01',
	    name: 'Sweden - Swedish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.sv_SE_2010core.gif',
	        imagewidth: '813px',
	        text: '2010 års modell av processorfamiljen Intel® Core™ . Snabbare. Och smartare.	Läs mer  &#x3E;',
	        href: 'http://www.intel.com/sv_se/consumer/products/processors/core-family.htm?iid=sv_SE_01_core+gg_headline'
	    },
	    localizedName: 'Sweden - Svenska',
	    menu: '/homepage/xml/GlobalGateway_Sweden_Swedish.xml'
	},
	{
	    deeplink: 'de_DE_05',
	    name: 'Switzerland - German',
	    localizedName: 'Switzerland - Deutsch',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.de_DE_2010core.gif',
	        imagewidth: '793px',
	        text: 'Die ganz neuen 2010er Intel® Core™ Prozessoren. Nicht nur schnell. Intelligent. Weitere Informationen  &#x3E;',
	        href: 'http://www.intel.com/de_de/consumer/products/processors/core-family.htm?iid=de_DE_05_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_Germany_German.xml'
	},
	{
	    deeplink: 'zh_TW_01',
	    name: 'Taiwan - Traditional Chinese',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.zh_TW_2010core.gif',
	        imagewidth: '549px',
	        text: '全新 2010 Intel® Core™ 處理器系列. 不只極速，更具智慧。	進一步瞭解  &#x3E;',
	        href: 'http://www.intel.com/zh_TW/consumer/products/processors/core-family.htm?iid=zh_TW_01_core+gg_headline'
	    },
	    localizedName: 'Taiwan - 繁體中文',
	    menu: '/homepage/xml/GlobalGateway_Taiwan_TraditionalChinese.xml'
	},
	{
	    deeplink: 'th_TH_01',
	    name: 'Thailand - Thai',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.th_TH_2010core.gif',
	        imagewidth: '',
	        text: 'ก้าวสู่ปี 2010 กับขุมพลังใหม่จาก Intel® Core™. เร็วเหนือชั้น ฉลาดล้ำยิ่งกว่า	เรียนรู้เพิ่มเติม   &#x3E;',
	        href: 'http://www.intel.com/th_TH/consumer/products/processors/core-family.htm?iid=th_TH_01_core+gg_headline'
	    },
	    localizedName: 'Thailand - ภาษาไทย',
	    menu: '/homepage/xml/GlobalGateway_Thailand_Thai.xml'
	},
	{
	    deeplink: 'tr_TR_01',
	    name: 'Turkey - Turkish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.tr_TR_2010core.gif',
	        imagewidth: '643px',
	        text: 'Yepyeni 2010 Intel® Core™ İşlemci Ailesi. Daha hızlı. Daha akıllı. Daha fazla bilgi edinin &#x3E;',
	        href: 'http://www.intel.com/tr_tr/consumer/products/processors/core-family.htm?iid=tr_TR_01_core+gg_headline'
	    },
	    localizedName: 'Turkey - Türkçe',
	    menu: '/homepage/xml/GlobalGateway_Turkey_Turkish.xml'
	},
	{
	    deeplink: 'ru_RU_09',
	    name: 'Ukraine - Ukrainian',
	    localizedName: 'Ukraine - Українська',
	    link: 'http://www.intel.com/cd/corporate/europe/emea/rus/ukraine/index.htm'
	},
	{
	    deeplink: 'en_AE_01',
	    name: 'United Arab Emirates - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '774px',
	        text: 'The All New 2010 Intel® Core™ Processor Family. Not just smarter. Faster. Learn More &#x3E;',
	        href: 'http://www.intel.com/ar_ae/consumer/products/processors/core-family.htm?iid=en_AE_01_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_SaudiArabia_English.xml'
	},
	{
	    deeplink: 'ar_AE_01',
	    name: 'United Arab Emirates - Arabic',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.ar_SA_2010core.gif',
	        imagewidth: '',
	        text: 'الجديدة تماماً لعام 2010  Intel® Core™. إنها ليست أسرع فحسب، بل أذكى أيضاً.تعرّف إلى المزيد ',
	        href: 'http://www.intel.com/ar_ae/consumer/products/processors/core-family.htm?iid=ar_AE_01_core+gg_headline'
	    },
	    localizedName: 'United Arab Emirates – عربي',
	    menu: '/homepage/xml/GlobalGateway_UAE_Arabic.xml'
	},
	{
	    deeplink: 'en_UK_15',
	    name: 'United Kingdom - English',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.en_US_2010core.gif',
	        imagewidth: '774px',
	        text: 'Intel is working on the technology of the future today. Learn More &#x3E;',
	        href: 'http://www.intel.com/en_uk/consumer/products/processors/core-family.htm?iid=en_UK_15_core+gg_headline'
	    },
	    menu: '/homepage/xml/GlobalGateway_UnitedKingdom_English.xml'
	},
	{
	    deeplink: 'es_LA_09',
	    name: 'Uruguay - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información  &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_09_core+gg_headline'
	    },
	    localizedName: 'Uruguay - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'es_LA_05',
	    name: 'Venezuela - Spanish',
	    sot: {
	        image: '/homepage/pix/bg/bg-sot.es_LA_2010core_01.gif',
	        imagewidth: '839px',
	        text: 'La nueva familia de procesadores Intel® Core™ 2010. Más rápidos y más inteligentes. Más información  &#x3E;',
	        href: 'http://www.intel.com/espanol/core/inside/index.htm?iid=es_LA_05_core+gg_headline'
	    },
	    localizedName: 'Venezuela - Español',
	    menu: '/homepage/xml/GlobalGateway_LatinAmerica_Spanish.xml'
	},
	{
	    deeplink: 'vi_VN_01',
	    name: 'Vietnam - Vietnamese',
	    localizedName: 'Vietnam – Tiếng Việt',
	    link: '/vi_VN/index.htm'
	}
];


// section hover behavior
$(document).ready(function()
{
    var s = "fast";
    // fixes some occasional visual glitches when user moves mouse over/out of the section
    function resetHeight() { $(this).height('auto'); }
    $(".section").hover(function()
    {
        $(this)
			.find('h2').stop().slideUp(s, resetHeight).end()
			.find('.contents').stop().slideDown(s, resetHeight);
    }, function()
    {
        $(this)
			.find('h2').stop().slideDown(s, resetHeight).end()
			.find('.contents').stop().slideUp(s, resetHeight);
    });
});

var default_country_name;
var default_country;
var deeplink = location.hash.substr(2); // flash-style deeplinking: "#/country_code"
if (!deeplink)
{
    default_country_name = param("country") || cookie("countrylang"); // passed-in param or cookie

    // If no cookie, then determine geo by language (geocheck.js)
    if ((default_country_name == "undefined") && (typeof (geocheck) != "undefined"))
    {
        checkGeo();
    }
}

var redirect = (!param("country") && !deeplink); // don't (initially) redirect if a country has been passed in
var initialTracking = false;
var omniture_page_name;

$.each(HAT.Countries, function(i, country)
{
    // for convenience, set up a direct link the the appropriate item in HAT.Languages.lang
    $.each(HAT.Languages.lang, function(i, language)
    {
        if ($.inArray(country.name, language.countrylang) >= 0)
        {
            country.language = language;
            return false;
        }
    });

    // set up the default country value and an analytics tracking name
    if (deeplink == country.deeplink || default_country_name == country.name)
    {
        default_country = country;
        // set omniture page name, but NOT for the default (index 0, en_US) selection
        if (i && country.language)
        {
            omniture_page_name = country.language.countryval.replace(/_/g, ":");
        }
    }
});

$(document).ready(function()
{
    // parse the country list into a select box when loaded
    $.each(HAT.Countries, function(i, n)
    {
        $("<option value='" + n.name + "'>")
			.html(n.localizedName || n.name)
			.attr("selected", (n == default_country ? "selected" : ""))
			.appendTo("#country-selector");
    });

    // show the country selector, and add a change handler
    $("#country-selector").show().change(function(e)
    {
        var country = HAT.Countries[this.selectedIndex];

        if (country.language && country.language.textdirection === "rtl")
        {  // to fix a positioning bug in IE if switching to a RTL language
            $("#supportbtn_wrapper").hide();
        }

        //document.cookie = "countrylang=" + country.name + ";path=/;max-age=" + (60*60*24*365);
        //IE6 Cookie Fix 2/1/2009
        var nextyear = new Date();
        nextyear.setFullYear(nextyear.getFullYear() + 1);
        var cookie_value = "countrylang=" + encodeURIComponent(country.name) + "; path=/; expires=" + nextyear.toGMTString();
        document.cookie = cookie_value;


        if (country.link && redirect)
        {
            location.href = country.link;
        } else if (country.menu && country.language)
        {
            location.hash = "/" + country.deeplink;
            var header = "sites/sitewide/HAT/30recode/" + country.language.culture + "/json/global_header_gateway.js";
            var footer = "sites/sitewide/HAT/30recode/" + country.language.culture + "/" + country.language.textdirection + "_Standards_W1024_HTTP_UTF8/footer.inc";
            var languageClasses = "HAT-globalgateway HAT-wide " + country.language.fonttype + (country.language.textdirection == "rtl" ? " HAT-rtl" : "");
            var styleLink = "/sites/sitewide/HAT/30recode/css/" + country.language.textdirection + "_header.css";

            $.get(country.menu, parseCountryXML, "xml");
            $.getJSON(header, parseHeaderJSON);
            $("#footerdiv").load(footer);
            $("html").attr("dir", country.language.textdirection);

            $("#HAT-linkStyle").attr('href', styleLink);
            $("#HATlinkStyle").attr('href', styleLink);
            $("#HAT-globalheader, #ggw").attr('class', languageClasses);
            $("#ggw").css('background-image', (country.image ? 'url(' + country.image + ')' : ''));

            // track change after the language updates for better user experience
            // but only after the initial page load
            if (initialTracking)
            {
                var omniture_page_name = country.language.countryval.replace(/_/g, ":").toLowerCase();
                waTrackAsLink("global gateway selection: " + country.name, 'o', 'wa_prop14=cim:' + omniture_page_name);
            }

            showSOT(country);

            // fix a bug in IE6 where the country selector loses track of which item is selected when changing between LTR and RTL
            $("#country-selector").find("option").filter(function()
            {
                if ($(this).val() === country.name)
                {
                    $(this).attr("selected", "selected");
                }
            });
        }
    });

    // load the selected language if it is not the first (0th)
    // this assumes that the default language is already set up
    if ($("#country-selector").get(0).selectedIndex)
    {
        $("#country-selector").trigger('change');
    } else
    {
        var country = HAT.Countries[0];
        showSOT(country);
        $("#main-c").addClass("postload");
    }

    // make gfx a clickable link (if applicable)
    $("#sot span#gfx").click(function()
    {
        // 'sotlink' is set by showSOT if country.sot.href is defined						  
        var sotlink = $(this).attr("sotlink");

        var isAUS = false;

        if (cookie("countrylang") === "undefined")
        {
            if (default_country_name === "Australia - English")
            {
                isAUS = true;
            }
            else if (country.name === "Australia - English")
            {
                isAUS = true;
            }

        }
        else if (cookie("countrylang") === "Australia - English")
        {
            isAUS = true;
        }

        if (isAUS) // override default behavior for Super Bowl promotion
        {
            if ($.browser.safari)
            {
                //change before going live
				waTrackAsLink('gateway_link','o','wa_iid=en_AU_01_superbowl+gg_headline');
                window.open('/homepage/feedroom-video-superbowl-shell.htm?id=d9ab3985612ad477559cc09a9b64b8d4fba05c14', null, 'left=300,top=300,height=483,width=643,toolbar=0,resizable=0,menubar=0,scrollbars=0,directories=0,status=0,location=0');
            }
            else
            {
                //change before going live
				waTrackAsLink('gateway_link','o','wa_iid=en_AU_01_superbowl+gg_headline');
                window.open('/homepage/feedroom-video-superbowl-shell.htm?id=d9ab3985612ad477559cc09a9b64b8d4fba05c14', 'win', 'left=300,top=300,height=480,width=640,toolbar=0,resizable=0,menubar=0,scrollbars=0,directories=0,status=0,location=0');
            }
        }
        else if (sotlink && sotlink != "")
        {
            location.href = sotlink;
        }
    });


    redirect = true; // after the initial language is set up, re-enable redirects
    initialTracking = true;

    var previousImageLink; //previous image-map link
    function showSOT(country)
    {
        if (typeof (previousImageLink) != "undefined") //check if we're changing from a geo that had an image-map link.  If so, hide it so we can't accidentally click it.
        {
            $(previousImageLink).css('display', 'none');
        }

        if (country.sot)
        {
            $("#ggw").removeClass("nosot");

            var gfxEl = $("#sot span#gfx").css('background-image', 'url(' + country.sot.image + ')');
            gfxEl.css("top", "32px");

            if (country.sot.imagewidth.length > 0)
            {
                gfxEl.css("width", country.sot.imagewidth);
            }
            else
            {
                gfxEl.css("width", "830px");
            }
            if (country.sot.href)
            {
                // if href was defined for this country, make gfx pointer
                gfxEl.css("cursor", "pointer");
                //set "sotlink" and cursor so that span#gfx acts like a clickable link
                gfxEl.attr("sotlink", country.sot.href);
                //gfxEl.css("left", "16px");
            } else
            {
                gfxEl.css("cursor", "auto");
                gfxEl.attr("sotlink", "");

            }
            if (country.language.textdirection == "rtl")
            {
                gfxEl.css("right", "25px");
                gfxEl.css("width", "617px");
            }
            else
            {
                gfxEl.css("left", "16px");

            }

            //else {
            //     gfxEl.css("top", "0px");
            //     gfxEl.css("left", "0px");
            // }


            //uncomment for US specific main background image:
            if (country.deeplink === "en_US_01")
            {
                gfxEl.css("width", "913px");
                $("#ggw").css('background-image', 'url(' + country.image + ')');
            }


            $("#sot span#gfx").css('background-image', 'url(' + country.sot.image + ')');
            $("#sot span#sottxt").html(country.sot.text);
            $(country.imagelink).css('display', 'block'); //if this country has an image-map link, show it
            previousImageLink = country.imagelink; //this country's image-map link is now the "previous" image-map link
        } else
        {
            $("#ggw").addClass("nosot");
            $("#sot span#sottxt").html('');
            $("#sot span#gfx").css('background-image', 'none');
        }
    }

    function parseCountryXML(xml)
    {
        var $xml = $(xml);
        function update(selector, textnode, linknode)
        {
            $(selector).html($.trim($xml.find(textnode).text()) || "&nbsp;"); // insert a hard space even if item is empty, to preserve HTML layout
            if (linknode) { $(selector).attr('href', $xml.find(linknode).text()); }
        }
        update(".choose-location h2", "headercopy");
        update(".section.work h1 a", "worktitle", "worklink");
        update(".section.play h1 a", "playtitle", "playlink");
        update(".section.about h1 a", "abouttitle", "aboutlink");
        update(".section.work h2", "worksubtitle");
        update(".section.play h2", "playsubtitle");
        update(".section.about h2", "aboutsubtitle");
        update(".section.work .contents", "workbody");
        update(".section.play .contents", "playbody");
        update(".section.about .contents", "aboutbody");
        $("#main-c").addClass("postload");
    }

    function parseHeaderJSON(json)
    {
        $("#logo_link").attr('href', json.header.logo.href + "?iid=" + json.header.logo.iid);
        $("#logo_img")
			.attr('alt', json.header.logo.value)
			.attr('title', json.header.logo.value);
        $("#lbl_search").html(json.header.search.button.value);
        $("#culture").val(json.header.search.culture);
        $("#searchsubmit")
			.attr('alt', json.header.search.button.value)
			.attr('title', json.header.search.button.value)
			.attr('src', "/sites/sitewide/HAT/30recode/pix/searchbtn_" + json.header.search.button.language + ".gif");

        HAT.SearchFilterLUT.head = json.header.search.filter.filterhead;
        HAT.SearchFilterLUT.qs = $.map(json.header.search.filter.term, function(n)
        {
            return { filter: n.query, term: n.value };
        });

        $("#HAT-filter-menu").remove();
        setTimeout(function()
        {
            $("#HAT-filter-menu").remove();
            HAT.FilterMenu.BuildFilter();
            HAT.FilterMenu.AttachEvents();
        }, 50);

        $("#supportbtn_link").attr('href', json.header.support.link.href + "?iid=" + json.header.support.link.ggiid);
        $("#supportbtn").text(json.header.support.link.value);
        $("#supportbtn_wrapper").show();
    }
    function parseSupportJSON(sjson)
    {
        var lang = cookie("culture");
        $("#supportbtn_link").attr('href', sjson.support[lang].support.href);
        $("#supportbtn").text(sjson.support[lang].support.button.value);
    }
});

function cookie(key)
{
    //return parseParams(document.cookie, /; ?/)[key];
    //IE6 Cookie Fix 2/1/2009
    return decodeURIComponent(parseParams(document.cookie, /; ?/)[key]);
}

function param(key)
{
    var params = parseParams(location.search.substr(1), "&");
    return params[key] ? unescape(params[key]) : null;
}

// can be used for cookies or URL search strings
function parseParams(str, delimiter)
{
    var x = {};
    $.each(str.split(delimiter), function(i, n)
    {
        var keyVal = n.split(/=/);
        if (keyVal[0] && keyVal[1]) { x[keyVal[0]] = keyVal[1]; }
    });
    return x;
}

// utility function to generate the 'no script' list of country links
function createNoscriptList()
{
    var $div = $(".no-script").empty().show();
    var $list = $("<ul>").appendTo($div);
    $.each(HAT.Countries, function(i, n)
    {
        var value = n.link;
        if (n.menu)
        {
            $.ajax({ async: false, url: n.menu,
                success: function(countryXML) { value = $(countryXML).find("worklink").text(); }
            });
        }
        $list.append("<li><a href='" + value + "'>" + (n.localizedName || n.name) + "<\/a><\/li>");
        if ((i + 1) % 16 == 0)
        {
            if (i + 1 == HAT.Countries.length)
            {
                $list.css("text-align", "right");
                $div.append("<div class='clear'>");
            } else
            {
                $list = $("<ul>").appendTo($div);
            }
        }
    });
}
