function getInfo(lang, str, name) {

	var urlpath = window.location.pathname;
	var pattern=/b2c/gi;
	var IMGPATH = '/images/gelaendeplan/';
	if(urlpath.match(pattern) == "b2c") { 
		RELATIVEPATH = "../..";
	} else {	
		RELATIVEPATH = "../../..";
	}
	IMGPATH = RELATIVEPATH.concat(IMGPATH);
	
	var html = '';
	if(lang == 'en') {
		var HEADERTEXT = 'Exhibitors in Hall ';
		var CLICKINFO = 'Click on the hall to show all exhibitors.';
	} else {
		var HEADERTEXT = 'Aussteller in Halle ';
		var CLICKINFO = 'Klicken Sie auf die Halle, um alle Aussteller anzuzeigen.';
	}
	
	// Aussteller
	var aussteller = new Array();
	aussteller["1.1"] = new Array(
		"1-1-gorenje.gif", "Gorenje Vertriebs GmbH", 
		"1-1-11-2-lg.gif", "LG Electronics Inc.",
		"1-1-nespresso.gif", "Nespresso Deutschland GmbH", 
		"1-1-siemens.gif", "Siemens-Electroger&auml;te GmbH"
		);
		
	aussteller["1.2"] = new Array(
		"1-2-audiovox.gif", "Audiovox German Holdings GmbH",
		"1-2-canton.gif", "CANTON ELEKTRONIK GMBH &amp; CO.KG",
		"1-2-expert.gif", "expert AG", 
		"1-2-pioneer.gif", "Pioneer Electronics Deutschland GmbH", 
		"1-2-yamaha.gif", "Yamaha Music Europe GmbH (YME)"
		);
		
	aussteller["2.1"] = new Array(
		"2-1-jura.gif", "JURA Elektroger&auml;te Vertriebs GmbH",
		"2-1-liebherr.gif", "Liebherr-Hausger&auml;te GmbH",
		"2-1-miele.gif", "Miele &amp; Cie. KG"
		);
		
	aussteller["2.2"] = new Array(
		"2-2-ard.gif", "ARD c/o Rundfunk Berlin Brandenburg",
		"2-2-ep.gif", "ElectronicPartner International",
		"2-2-ford.gif", "Ford-Werke GmbH"
		);
		
	aussteller["3.1"] = new Array(
		"3-1-bosch.gif", "Robert Bosch Hausger&auml;te GmbH",
		"3-1-ek-servicegroup.gif", "EK / servicegroup eG",
		"3-1-2-haier.gif", "Haier Europe Trading S.r.l.",
		"3-1-russell-hobbs.gif", "Russell Hobbs Deutschland GmbH",
		"3-1-vestel.gif", "Vestel",
		"3-1-coway.gif", "Woongjin Coway"
		);
		
	aussteller["3.2"] = new Array(
		"3-2-blaupunkt.gif", "Blaupunkt Audio Vision GmbH &amp; Co. KG",
		"3-2-funai.gif", "Funai Europe GmbH",
		"3-2-gbl.gif", "G &amp; BL",
		"3-1-2-haier.gif", "Haier Television",
		"3-2-sennheiser.gif", "Sennheiser elektronic GmbH &amp; Co. KG",
		"3-2-telering.gif", "telering Marketing GmbH &amp; Co. KG",
		"3-2-vivanco.gif", "Vivanco Gruppe AG"
		);
		
	aussteller["4.1"] = new Array(
		"4-1-dyson.gif", "Dyson GmbH",
		"4-1-elektrolux.gif", "Electrolux Hausger&auml;te Vertriebs GmbH",
		"4-1-melitta.gif", "Melitta Haushaltprodukte",
		"4-1-severin.gif", "SEVERIN Elektrogeraete GmbH"
		);
		
	aussteller["4.2"] = new Array(
		"4-2-sony.gif", "Sony Europe"
		);
		
	aussteller["5.1"] = new Array(
		"5-1-20-samsung.gif", "Samsung Electronics Co. Ltd."
		);
		
	aussteller["5.2"] = new Array(
		"5-2-kenwood.gif", "Kenwood Electronics Deutschland GmbH",
		"5-2-jvc.gif", "JVC Deutschland GmbH",
		"5-2-panasonic.gif", "Panasonic Marketing Europe GmbH"
		);
		
	aussteller["5.3"] = new Array(
		"none", "International Halls"
		);
		
	aussteller["6.1"] = new Array(
		"6-1-delonghi.gif", "De'Longhi Deutschland GmbH",
		"6-1-wmf.gif", "WMF AG"
		);
		
	aussteller["6.2"] = new Array(
		"6-2-telekom.gif", "Deutsche Telekom AG", 
		"6-2-loewe.gif", "Loewe AG",
		"none", "IFA eLibrary"
		);
	
	aussteller["6.3"] = new Array(
		"none", "Media Center / IFA International Keynote Area"
		);
		
	aussteller["7.1a"] = new Array(
		"7-1a-beko.gif", "BEKO"
		);
		
	aussteller["7.1b"] = new Array(
		"7-1b-amica.gif", "Amica International GmbH"
		);
		
	aussteller["7.1c"] = new Array(
		"7-1c-babyliss.gif", "BaByliss Deutschland GmbH &amp; Co. KG"
		);
		
	aussteller["7.2b"] = new Array(
		"7-2b-mitsubishi.gif", "Mitsubishi Electric Europe B.V."
		);
		
	aussteller["7.2c"] = new Array(
		"7-2c-youngifa.gif", "Young IFA"
		);
		
	aussteller["8.1"] = new Array(
		"8-1-gl-international.gif", "GL International",
		"8-1-wahl.gif", "WICG-Wahl International Consumer Group B.V.",
		"8-1-vsm-pfaff.gif", "VSM Deutschland GmbH"
		);
		
	aussteller["8.2"] = new Array(
		"8-2-vestel.gif", "Vestel"
		);
		
	aussteller["9"] = new Array(
		"9-becker.gif", "Becker",
		"9-falk.gif", "Falk",
		"9-garmin.gif", "Garmin Deutschland GmbH",
		"9-navigon.gif", "NAVIGON AG",
		"9-tomtom.gif", "TomTom International B.V."
		);
		
	aussteller["10.1"] = new Array(
		"10-1-midea.gif", "Midea",
		"10-1-galanz.gif", "Guangdong Galanz Group"
		);
		
	aussteller["10.2"] = new Array(
		"10-2-hama.gif", "HAMA GMBH &amp; CO. KG"
		);
		
	aussteller["11.1"] = new Array(
		"11-1-tecwatch.gif", "TecWatch"
		);
		
	aussteller["11.2"] = new Array(
		"1-1-11-2-lg.gif", "LG Electronics Inc."
		);
		
	aussteller["12"] = new Array(
		"12-acer.gif", "ACER Computer GmbH",
		"12-brother.gif", "Brother International GmbH",
		"12-golla-oy.gif", "GOLLA OY"
		);
		
	aussteller["13"] = new Array(
		"13-dell.gif", "DELL"
		);
		
	aussteller["15.1"] = new Array(
		"15-16-izone.gif", "IFA iZone"
		);
		
	aussteller["16"] = new Array(
		"15-16-izone.gif", "IFA iZone"
		);
	
	aussteller["17"] = new Array(
		"17-amd.gif", "AMD GmbH",
		"17-intenso.gif", "INTENSO GmbH",		
		"17-lenovo.gif", "Lenovo Deutschland GmbH",
		"17-rollei.gif", "Rollei"
		);
		
	aussteller["18"] = new Array(
		"18-sharp.gif", "SHARP Electronics (Europe) GmbH",
		"18-vodafone.gif", "Vodafone D2 GmbH"
		);
		
	aussteller["X19"] = new Array(
		"19-nikon.gif", "Nikon GmbH",
		"19-fujifilm.gif", "FUJIFILM Electronic Imaging Europe GmbH"
		);
		
	aussteller["20"] = new Array(
		"5-1-20-samsung.gif", "Samsung Electronics Co. Ltd."
		);
		
	aussteller["21"] = new Array(
		"21-epson.gif", "EPSON Deutschland GmbH",
		"21-metz.gif", "Metz-Werke GmbH &amp; Co. KG",
		"21-toshiba.gif", "Toshiba Europe GmbH"
		);
		
	aussteller["22"] = new Array(
		"22-philips.gif", "Philips Consumer Lifestyle B.V."
		);
		
	aussteller["23"] = new Array(
		"23-euronics.gif", "EURONICS Deutschland eG.",
		"23-grundig.gif", "GRUNDIG Intermedia GmbH",
		"23-hannspree.gif", "Hannspree Europe Holdings BV"
		);
		
	aussteller["25"] = new Array(
		"25-hisense.gif", "Hisense",
		"25-hyundai.gif", "Hyundai Corporation",
		"25-changhong.gif", "Sichuan Changhong Electric Co. Ltd."
		);
		
	aussteller["26"] = new Array(
		"none", "International Halls"
		);
	
	aussteller["27"] = new Array(
		"none", "Taiwan Image Hall"
		);
		
	aussteller["28"] = new Array(
		"none", "International Halls"
		);
		
	aussteller["Funkturm"] = new Array(
		"funkturm-harman.gif", "Harman Consumer Group International"
		);
		
	aussteller["FG-SOM/100"] = new Array(
		"sommergarten-canon.gif", "Canon Deutschland GmbH"
		);
	
		
	// Tooltip-Inhalte
	html = html + '<h4>' + HEADERTEXT + str +'<\/h4>';

	var imgSrc = '';
	var textSrc = '';
	var imgTag = '';
	for (var i = 0; i < aussteller[str].length/2; i++) {
	
		// mehrere Kategorien: Anfang
		if(name == 'tooltip-special2') {
			html = html + '<div class="tt-logo-container-'+i+'">';
			switch (i) {
				case 0: html = html + '<div class="tt-logo-container-publicmedia"><div class="tt-logo-header">IFA Public Media</div>'; break;
				case 1: html = html + '<div class="tt-logo-container-audio"><div class="tt-logo-header">IFA Audio Entertainment</div>'; break;
				case 2: html = html + '<div class="tt-logo-container-audio"><div class="tt-logo-header">IFA Audio Entertainment</div>'; break;
			}
		}		
		
		if(name == 'tooltip-special6') {
			html = html + '<div class="tt-logo-container-'+i+'">';
			switch (i) {
				case 0: html = html + '<div class="tt-logo-container-communication"><div class="tt-logo-header">IFA Communication</div>'; break;
				case 1: html = html + '<div class="tt-logo-container-homeentertain"><div class="tt-logo-header">IFA Home Entertainment</div>'; break;
				case 2: html = html + '<div class="tt-logo-container-homeentertain"><div class="tt-logo-header">IFA Home Entertainment</div>'; break;
			}
		}
		
		if(name == 'tooltip-special18') {
			html = html + '<div class="tt-logo-container-'+i+'">';
			switch (i) {
				case 0: html = html + '<div class="tt-logo-container-homeentertain"><div class="tt-logo-header">IFA Home Entertainment</div>'; break;
				case 1: html = html + '<div class="tt-logo-container-communication"><div class="tt-logo-header">IFA Communication</div>'; break;
			}
		}	
		
		// Inhalte
		textSrc = aussteller[str][(i*2)+1];
		
		if(aussteller[str][i*2].toLowerCase() != 'none') {
			imgSrc = IMGPATH + aussteller[str][i*2].toLowerCase();
			imgTag = '<div class="tt-logo"><img src="'+imgSrc+'" alt="'+textSrc+'" /><\/div>';
			html = html + imgTag + ' <div class="tt-logo-text">' + textSrc + '<\/div>';
			
		} else {
			html = html + ' <div class="tt-text">' + textSrc + '<\/div>';
		}		
		
		// mehrere Kategorien: Ende
		if(name == 'tooltip-special2' || name == 'tooltip-special6' || name == 'tooltip-special18') { html = html + '<\/div>'; }
	}
	
	html = html + '<br class="clear" \/> <h5>' + CLICKINFO + '<\/h5>';
	
	return html;
} 

function simple_tooltip(lang, target_items, name){
	$(target_items).each(function(i){
	
		$("body").append("<div class='tooltip "+name+"' id='"+name+i+"'>"+getInfo(lang, $(this).attr('alt'), name)+"<\/div>");
		var my_tooltip = $("#"+name+i);

		$(this).removeAttr("alt").mouseover(function(){
				my_tooltip.css({opacity:0.96, display:"none"}).fadeIn(400);
		}).mousemove(function(kmouse){
				var ttalign = 15;
				if(kmouse.pageX > 830) {
					ttalign = -481;
				}
				my_tooltip.css({left:kmouse.pageX+ttalign, top:kmouse.pageY+15});
		}).mouseout(function(){
				my_tooltip.fadeOut(400);
		});
	});
}

$(document).ready(function(){
	var ttlang = 'de';
	if ($("#ifa-map-image-en").length > 0){
		ttlang = 'en';
		$("img#ifa-map-image-en").removeAttr("alt");
	} else {
		$("img#ifa-map-image-de").removeAttr("alt");
	}

	simple_tooltip(ttlang, "area.tooltip-service", "tooltip-service");
	simple_tooltip(ttlang, "area.tooltip-audio", "tooltip-audio");
	simple_tooltip(ttlang, "area.tooltip-communication", "tooltip-communication");	
	simple_tooltip(ttlang, "area.tooltip-ha", "tooltip-ha");
	simple_tooltip(ttlang, "area.tooltip-homeentertain", "tooltip-homeentertain");
	simple_tooltip(ttlang, "area.tooltip-mymedia", "tooltip-mymedia");
	simple_tooltip(ttlang, "area.tooltip-publicmedia", "tooltip-publicmedia");
	simple_tooltip(ttlang, "area.tooltip-technology", "tooltip-technology");
	
	simple_tooltip(ttlang, "area.tooltip-special2", "tooltip-special2");
	simple_tooltip(ttlang, "area.tooltip-special6", "tooltip-special6");
	simple_tooltip(ttlang, "area.tooltip-special18", "tooltip-special18");
});
