$(document).ready(function(){

/*
	$(".title").click(function() {
		$(this).toggleClass("selected");
		$(this).next(".feature").css("display","block");
		return false;
	});
*/

	$('.new').attr('target','_blank');



	if($.browser.safari){
	
		$(".title").toggle(function(){
			$(this).next(".feature").css("display","block");
		},function(){
			$(this).next(".feature").css("display","none");
		});

		$(".title").click(function() {
			$(this).toggleClass("selected");
			return false;
		});
	}else{
	
		$(".title").click(function() {
			$(this).toggleClass("selected");
			$(this).next(".feature").toggle(400);
			return false;
		});

	}

    $(".box-feature").bind("mouseenter",function(){
		$("img",this).animate({ 
			width: "252px",
			height: "252px",
			marginLeft: "0"
		},200);
		$("span",this).animate({ 
			width: "252px",
			height: "32px",
			fontSize: "12px"
		},200);
    }).bind("mouseleave",function(){
		$("img",this).animate({ 
			width: "28px",
			height: "28px",
			marginLeft: "0"
		},200);
		$("span",this).animate({ 
			width: "28px",
			height: "0",
			fontSize: "0px"
		},200);
    });


/*
	$(".box-feature").hover(
		function(){
			$("img",this).animate({ 
				width: "252px",
				height: "252px",
				marginLeft: "0"
			},400);
			$("span",this).animate({ 
				width: "252px",
				height: "32px",
				fontSize: "12px"
			},400);
		},
		function(){
			$("img",this).animate({ 
				width: "28px",
				height: "28px",
				marginLeft: "0"
			},400);
			$("span",this).animate({ 
				width: "28px",
				height: "0",
				fontSize: "0px"
			},400);
		}
	);	
*/

	$("#map-features").mouseover(function(){
			$(".dot-features > a").append("<img src='img/dot_features.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);

	$("#map-mechanical").mouseover(function(){
			$(".dot-mechanical > a").append("<img src='img/dot_mechanical.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
	$("#map-psychological").mouseover(function(){
			$(".dot-psychological > a").append("<img src='img/dot_psychological.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
	$("#map-computational").mouseover(function(){
			$(".dot-computational > a").append("<img src='img/dot_computational.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
	$("#map-public").mouseover(function(){
			$(".dot-public > a").append("<img src='img/dot_public.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
	$("#map-coming-soon").mouseover(function(){
			$(".dot-coming-soon > a").append("<img src='img/dot_coming-soon.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
	$("#map-in-development").mouseover(function(){
			$(".dot-in-development > a").append("<img src='img/dot_in-development.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
	$("#map-ongoing-research").mouseover(function(){
			$(".dot-ongoing-research > a").append("<img src='img/dot_ongoing-research.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
	$("#map-previous-projects").mouseover(function(){
			$(".dot-previous-projects > a").append("<img src='img/dot_previous-projects.gif' class='dot' />");
		}).mouseout(function(){
			$(".dot").remove();
		}
	);
});