$(document).ready(function()
{	
	
	$("#teaser-image").cycle({
		fx: 	'scrollLeft',
		timeout: 	'4000'
	});
	

	$(".product-box").hide();
	var rel = jQuery.url.attr("anchor");
	$("#"+rel).show();
	$('html, body').animate({scrollTop:0}, 'slow');
	
	$(".box-small-link").click(
		function() {
			$(this).addClass("active");
			var href = $(this).attr("href");
			var rel = jQuery.url.setUrl("http://www.rauh-hydraulik.com/"+href).attr("anchor");
			
			$(".product-box").fadeTo(200, 0, 
				function() {
					$(".product-box").hide();
					$("#"+rel).show().fadeTo(200,1);
				}
			);
			
			$('html, body').animate({scrollTop:0}, 'slow');
		}
	);
	

	
	// Standortauswahl
	
	$(".standort-box").hide();
	$("#standort-einstieg").show();
	
	$("#standorte-box area").click(
		function() {
			var rel = $(this).attr('rel');
			$(".standort-box").fadeTo(200, 0,
				function() {
					$(".standort-box").hide();
					$("#"+rel).show().fadeTo(200,1);
					
				}
			);	
		}
	);
	
	
	$(".standort-box a").click(
		function() {
			var rel = $(this).attr('class');
			$(".standort-box").fadeTo(200, 0,
				function() {
					$(".standort-box").hide();
					$("#"+rel).show().fadeTo(200,1);
					
				}
			);	
		}
	);
	


}
);
