$(document).ready(function(){
	$("li.img a").click(function(){
		$(".background").show();
	});
	
	$(".background,.background a.close").click(function(){
		$(".background").hide();
	});

	$(".background .imp").innerfade({
		containerheight:525,
		timeout:4000,
		speed:"slow"
	});
	
	$(".fade").innerfade({
		containerheight:334,
		timeout:4000,
		speed:"slow"
	});
	
	$(".header .img").innerfade({
		containerheight:105,
		timeout:4000,
		speed:4000
	});
	
	$(".fade").innerfade({
		containerheight:334,
		timeout:4000,
		speed:"slow"
	});
	
	$("div.gallery a").click(function(){
		$("img#prev").attr("src",$(this).attr("href"));
		return false;
	});
	
	$("map area").mouseover(function(e){
		$("div.first").hide();
		var page = $(this).parents("body").width()/2-500;
		$("#"+$(this).attr("class")).show();
		$("#"+$(this).attr("class"))
			.children("ul.details")
			.appendTo("body")
			.css({"top":e.pageY+20,"left":e.pageX+20})
			.show();
		
	}).mousemove(function(e){
		$("body").children("ul.details").css({"top":e.pageY+20,"left":e.pageX+20});	
	}).mouseout(function(){
		$("#"+$(this).attr("class")).hide();
		$("body").children("ul.details").appendTo("div#"+$(this).attr("class")).hide();
		$("div.first").show();
	});
	
	$(".flats tbody tr:even").addClass('even');
});
