$(document).ready(function(){
	var active = 4;
	$("#banner .button").mouseenter(function(){
		$("#banner .button").removeClass("active");
		$(this).addClass("active");
	});
	$("#banner .button1").mouseenter(function(){
		if(!(active == 1)) {
			$("#banner .foto").stop().clearQueue().animate({
				width: "0px"
			});
			$("#banner .foto1").stop().clearQueue().animate({
				width: "499px",
				marginLeft: "0px"
			});
			active = 1;
		}
	});
	$("#banner .button2").mouseenter(function(){
		if(!(active == 2)) {
			$("#banner .foto").stop().clearQueue().animate({
				width: "0px"
			});
			$("#banner .foto2").stop().clearQueue().animate({
				width: "499px",
				marginLeft: "0px"
			});
			active = 2;
		}
	});
	$("#banner .button3").mouseenter(function(){
		if(!(active == 3)) {
			$("#banner .foto").stop().clearQueue().animate({
				width: "0px"
			});
			$("#banner .foto3").stop().clearQueue().animate({
				width: "499px",
				marginLeft: "0px"
			});
			active = 3;
		}
	});
	$("#banner .button4").mouseenter(function(){
		if(!(active == 4)) {
			$("#banner .foto").stop().clearQueue().animate({
				width: "0px"
			});
			$("#banner .foto4").stop().clearQueue().animate({
				width: "499px",
				marginLeft: "0px"
			});
			active = 4;
		}
	});
	$("#banner li").click(function(){
		window.location = $(this).attr("url");
	});
});
