
$(document).ready(function() {
	$('.SCB').mouseover(
		function(){
			$(this).css('background-image',$(this).css('background-image').replace(new RegExp('OFF'),''));
			document.getElementById("SCB_legende").innerHTML=this.id;
		}
	);
	$('.SCB').mouseout(
		function(){
			$(this).css('background-image',$(this).css('background-image').replace(new RegExp('.png'),'OFF.png'));
			document.getElementById("SCB_legende").innerHTML='';
		}
	);
	$(".SCB").each(function(){
		$(this).qtip({
			content: this.id,
			position: {
				corner: {
					tooltip: 'bottomMiddle', 
					target: 'topMiddle'
				}
			},
			style: {
				border: {
					width: 4,
					radius: 0
				},
				fontFamily: 'verdana',
				fontSize: 10,
				padding: 10, 
				textAlign: 'left',
				tip: true, // Give it a speech bubble tip with automatic corner detection
				name: 'brownCHF' // Style it according to the preset 'cream' style
			},
			show: {
				 when: {
					target: false,
					event: 'mouseover'
				 },
				 effect: {
					type: 'fade',
					length: 100
				 },
				 delay: 10,
				 solo: false,
				 ready: false
			 }
		});
		
	});
});

