function Bildwechsel(bild,size,selected){
	if(!size) {
		size = 'large';
		imageId = 'landkarte';
		if(!bild) bild = 'gesamt';
	} else {
		imageId = 'minimap';
		if(!bild) bild = selected;
	}	
	
	document.getElementById(imageId).src = '/img/map/' + size + '/' + bild + '.gif';
}

function google_maps(thermen_id) {
	window.open("/php/maps/google_maps.php?thermen_id=" + thermen_id,"mywindow","menubar=no,scrollbars=yes,width=640,height=475");
}

if(typeof $ !== "undefined"){
	$(document).ready(function() {
		$dia = $('#homeImage2');
		$dia.cycle({
	        after: function(){
	        	var wid = $("img", this).attr("rel");
	        	if(wid) {
	        		$.ajax({
						url: "/ajax/werbungstat/stat.php?wid=" + wid,
						error: function(){
							console.log("error hb23");
						},
						success: function(data){
							console.log(data);
						}
					});
	        	}	        
	        },
			fx: 'fade'
		});
	    
	    $(".homeSlideShowDot").click(function(){
	    	var slide = parseInt($(this).attr("rel"));
	    	$dia.cycle(slide);
	    	return false;
	    });
	});
}

