function popHide(){
	$('#pop-wrap').hide();
	$('#pop-shaded').hide();
	$('#pop-inner').empty();
	$('embed').css('visibility', 'visible');
}


$(document).ready(function(){
	pageHeight = $(document).height();
	$('#pop-shaded').css('height', pageHeight + 'px');
	
	$(".embiggen").click(function() {
		$('#pop-wrap').show();
		$('#pop-shaded').show();
		$('embed').css('visibility', 'hidden');
		
		parent = $(this).parent();
		embed = $(parent).children('embed').clone();
		
		embed.attr('width', '750px');
		embed.attr('height', '650px');
		embed.css('visibility', 'visible');
		$('#pop-inner').append(embed);

		return false;
	});
	
	$("#pop-close").click(function(el) {
		popHide();
		return false;
	});
	
	$(document).keyup(function(e) {
		if (e.keyCode == 27) {
		 	popHide();
		}
	});	

});