function updateMap(map) {
	$('#map').attr("src", "images/markets/"+map);
}

function show(id) {

	var position = $("#map").position();
	hideAll();
	shadow();

	jQuery('#' + id).show();
	var left = position.left + 80;
	var top = position.top + 40;
	jQuery('#' + id).css( {

		'top' : top + 'px',
		'left' : left + 'px',
		'color' : '#FFF',
		'width' : '650px',
		'width' : '220px',
		'height' : '15px',
		'position' : 'absolute',
		'z-index' : '100'

	});
	/*			jQuery('#' + id).css( {
		'top' : top + 'px',
		'left' : left + 'px',
		'width' : '650px',
		'height' : '235px',
		'position' : 'absolute',
		'z-index' : '100',
		'zoom':1
		

	});
		*/

	$('#' + id).animate( {
		width : "650px",
		height : "235px",
		marginLeft : "0.6in",
		fontSize : "1em"
	}, 1500, function() {
		// Animation complete.
		

		
		
			jQuery('#' + id + 'b').show();
			top = top + 280;

			jQuery('#' + id + 'b').css( {
				'top' : top + 'px',
				'left' : left + 'px',
				'color' : '#FFF',
				'width' : '650px',
				'width' : '220px',
				'height' : '15px',
				'position' : 'absolute',
				'z-index' : '100'

			});
			$('#' + id + 'b').animate( {
				width : "650px",
				height : "220px",
				marginLeft : "0.6in",
				fontSize : "1em"
			}, 1500);
		});

		
		
}
 
function hideAll() {
	jQuery('.market').hide();
}

function shadow() {
	jQuery('#plan').css( {
		'opacity' : '0.4',
		'-khtml-opacity' : '0.4',
		'-moz-opacity' : '0.4',
		'filter' : 'alpha(opacity=40)',
		'cursor' : 'pointer'
	});
}
function unshadow() {
	jQuery('#plan').css( {
		'opacity' : '1',
		'-khtml-opacity' : '1',
		'-moz-opacity' : '1',
		'filter' : 'alpha(opacity=100)',
		'cursor' : 'pointer'
	});
}
$(document).ready(function() {
	$(".div").click(function() {
		hideAll();
		unshadow();
	});
});
