function rerenderSifr(id)
{		
		if (typeof sIFR != "function"){
			return;
		}else{
			sIFR.replaceElement(named({sSelector:"div#"+id+" h4", sFlashSrc: SIFR_SLAB_PATH, sColor:"#333333", sWmode:"transparent"}));
			sIFR.replaceElement(named({sSelector:"div#"+id+" div.sifr-h2 h2", sFlashSrc: SIFR_SLAB_PATH, sColor:"#666666", sWmode:"transparent"}));
			sIFR.replaceElement(named({sSelector:"div#"+id+" h2", sFlashSrc: SIFR_SLAB_PATH, sColor:"#666666", sWmode:"transparent"}));
			
			sIFR.replaceElement(named({sSelector:"div#"+id+" div.sifr-h3 h3", sFlashSrc: SIFR_SLAB_PATH, sColor:"#666666", sWmode:"transparent"}));
			sIFR.replaceElement(named({sSelector:"div#"+id+" div.sifr-h2 ul.bullet-list li", sFlashSrc: SIFR_SLAB_PATH, sColor:"#666666", sWmode:"transparent"}));	
		}
}

function showListContent(x, y)
{
	var x = $(x);
	var y = $(y);
	if(x.visible()) {
		x.hide();
		y.removeClassName('list-expanded').addClassName('list-collapsed');
	} else {
		x.show();
		y.removeClassName('list-collapsed').addClassName('list-expanded');
	}
}


function showToolTip(e) {
	var x = Event.pointerX(e) +5;
	var y = Event.pointerY(e) +5;
	var el = Event.findElement(e, 'a');	
	if(!el)
		el = Event.findElement(e, 'area');
	
	var c 			= el.href;
	var contentID 	= c.substring(c.indexOf('#')+1, c.length);
	
	if($('tooltip-'+contentID)) {
		$('tooltip').setStyle({left: x +'px', top: y +'px'});
		$('tooltip').update($('tooltip-'+contentID).innerHTML);
		
		$('tooltip').show();
	}
}

function hideToolTip(e) {
	$('tooltip').hide();
}

function init_map_lightbox() {
	$$('#kreisgrafik1 area[rel]').each(
			function(trigger){
				var id = trigger.hash.substring(1,trigger.hash.length);
				console.log("Creating layer for " +id );
				GLOBAL_LAYER_CONTROLLER[id]=new pubLayer(null,trigger,id,layerOptions['inline'],'inline');
			}
		);
}

document.observe("dom:loaded", function() {
	$('vision-block').hide();
	$('valuesvision').hide();
	$$('#responsible', '#excellent', '#innovative').invoke('hide');
	init_map_lightbox();
	
	//setup tooltip
	//GLOBAL_LAYER_CONTROLLER['tooltip'] = new pubLayer(null, null, 'tooltip', layerOptions['tooltip'], 'tooltip');
	new Insertion.Before($('footer-position-placeholder'), '<div id="tooltip"></div>');
	
	$$('a[rel$="inline"]', 'area[rel$="inline"]').each( function(el,i) { 
		$(el).observe('mouseover', function(e) { showToolTip(e); })
		$(el).observe('mouseout', function(e) { hideToolTip(); })
	});
});

