//jQuery(document).ready(function(){$('.hotspots').bind({mouseenter:function(){showInfo(this);},mouseleave:function(){hideInfo(this);}});if($.cookie('toggleMovie') == "true"){initHotspot();}});function initHotspot(){var hotspots=$('.hotspots');if(hotspots.length>0){var ratio_org=(background_height/background_width);var ratio_bg=($('#supersized-image').height()/$('#supersized-image').width());for(i=1;i<=hotspots.length;i++){var ratio_hotspot=hotspot_width[i]/hotspot_height[i];var quoWidth=(hotspot_width[i]/background_width);var quoHeight=(hotspot_height[i]/background_height);var quoTop=(hotspot_top[i]/background_height);var quoLeft=(hotspot_left[i]/background_width);var new_width=($('#supersized-image').width()*quoWidth);var new_height=($('#supersized-image').height()*quoHeight);var new_left=($('#supersized-image').width()*quoLeft)+(parseFloat($('#supersized-image').css('left')));var new_top=($('#supersized-image').height()*quoTop)+(parseFloat($('#supersized-image').css('top')));$('#hotspot_'+i).css({'width':new_width,'height':new_height,'left':new_left,'top':new_top});}}$(window).resize(function(){initHotspot();});}function showInfo(elem){var id=$(elem).attr('id');$(elem).mousemove(function(e){if($('#'+id+'_info').hasClass('label_right')){newLeft=e.pageX-40-parseInt($('#'+id+'_info').css('width'));}else{newLeft=e.pageX+10;}$('#'+id+'_info').css({'display':'block','top':e.pageY,'left':newLeft});});}function hideInfo(elem){var id=$(elem).attr('id');$(elem).unbind('mousemove');$('#'+id+'_info').css({'display':'none'});}

jQuery(document).ready(function(){
	/*
	$('.hotspots').bind({
		mouseenter : function(){
			showInfo(this);
		},
		mouseleave : function(){
			hideInfo(this);
		}
	});	*/
	
});

function initHotspot(){
		
	var hotspots = $('.hotspots');
			
	if(hotspots.length > 0){	
		var ratio_org = (background_height/background_width);	// Define image ratio
		var ratio_bg = ($('#supersized-image').height()/$('#supersized-image').width());
			
		for(i=1;i<=hotspots.length;i++){
			var ratio_hotspot = hotspot_width[i]/hotspot_height[i];
			var quoWidth = (hotspot_width[i]/background_width);
			var quoHeight = (hotspot_height[i]/background_height);
			var quoTop = (hotspot_top[i]/background_height);
			var quoLeft = (hotspot_left[i]/background_width);
			
			
			var new_width = ($('#supersized-image').width()*quoWidth);
			var new_height = ($('#supersized-image').height()*quoHeight);
			
			var new_left = ($('#supersized-image').width()*quoLeft)+(parseFloat($('#supersized-image').css('left')));
			var new_top = ($('#supersized-image').height()*quoTop)+(parseFloat($('#supersized-image').css('top')));
			
			$('#hotspot_'+i).css(
			{
				'width': new_width,
				'height': new_height,
				'left' : new_left,
				'top' : new_top
			});	
		}
	}
		
	sizeContent();
	
}

function showInfo(elem){
	
	var id = $(elem).attr('id');
	$('#info_'+id).css('backgroundPosition','bottom');
	
}

function hideInfo(elem){
	
	if($(".anleitungspfeil").length > 0){
		//$(".anleitungspfeil").css("display","none");
	}
	
	var id = $(elem).attr('id');
	$('#info_'+id).css('backgroundPosition','top');
	
}

