$(document).ready(function() {
	$('area').live('click',function(e) {
		$('#pop-wrapper').fadeIn(500);
		var map_loc = $(this).attr('class');
		$('#'+map_loc+'-map-click').css('display', 'block');
		var pop_width = $('#pop-wrapper #image-map-click').width();
		var pop_var = $(window).width();
		var pop_left = (pop_var / 2)-(pop_width/2);
		$('#pop-wrapper #image-map-click').css('left', pop_left);
		var pop_height = $('#pop-wrapper #image-map-click').height();
		var pop_var2 = $(window).height();
		var pop_top = (pop_var2 / 2)-(pop_height/2);
		$('#pop-wrapper #image-map-click').css('top', pop_top);
		
		//$('#image-map-click-bg').fadeIn(500);
		//$('#image-map-click').fadeIn(500);
		return false;
	}).live('mouseover',function(e) {
		//var clicked = e.target;
		var map_loc = $(this).attr('class');
		map_mouseover(map_loc);
	}).live('mouseout',function(e) {
		//var clicked = e.target;				
		var map_loc = $(this).attr('class');
		map_mouseout(map_loc);
		
	});
	
	$('#image-map-click .map-click-closer').click(function(){
		$('#pop-wrapper').fadeOut(500);
		//$('#image-map-click-bg').fadeOut(100);
		$('#image-map-click .map-click-holder').css('display', 'none');
		//$('#image-map-click').fadeOut(100);
	});
	$('#image-map-click-bg').click(function(){
		$('#pop-wrapper').fadeOut(500);
		//$('#image-map-click-bg').fadeOut(100);
		$('#image-map-click .map-click-holder').css('display', 'none');
		//$('#image-map-click').fadeOut(100);
	});
});

function map_mouseover(map_loc) {
	$('#'+map_loc+'_hover').stop(true, true).fadeIn('fast');
}
function map_mouseout(map_loc) {
	$('#'+map_loc+'_hover').stop(true, true).fadeOut('slow');
}
