function enlarge(src, w, h){
	$('#shade').css({ 'height': $(document).height() + 'px'});
	var tmp = $(window).scrollTop()+($(window).height()-h)/2;
	$('#popup').css({ 'top': (tmp>0?tmp:0) + 'px', 'left': ($(window).width()-w)/2 + 'px', 'height': h + 'px', 'width': w + 'px'});
	$('#loading').css({ display: 'block' });
	$('#loading').css({ 'margin-left': (w/2-33) + 'px', 'margin-top': (h/2-33) + 'px'});
	$('#shade').fadeIn();
	$('#popup').show(300);
	var img = $('<div id="preview_box" style="position: absolute; z-index: 1"><img id="preview" style="display:none" src="' + src + '" alt="" /></div>');
	$('#popup').append(img);
	$('#preview').load(function(){
		$('#loading').css({ display: 'none' });
		$('#preview').css({ display: 'block' });
		$('#shade').css({ 'height': $(document).height() + 'px'});
	});	
}
function close_popup(){
	$('#preview_box').empty().remove();
	$('#popup').hide(300);
	$('#shade').fadeOut();
}
