var Preview = {
	ajaxUrl: 'http://www.rescreatu.com/viewPetInfo.php?id=',

	showOptions: function(id)
	{
		var $ = jQuery;
		$('body').prepend(
			this.bg = $('<div id="fader"></div>') 
				.width($(document).width())
				.height($(document).height())
				.css({
					position: 'absolute',
					left: '0px',
					top: '0px',
					backgroundColor: '#555',
					opacity: 0.5, 
					zIndex: 999
				})
			);
				
		$('body').prepend(
			this.popup = $('<div id="dialog"></div>')
				.hide()
				.load(this.ajaxUrl + id, {}, function(){
					var client = {
						width:	$(window).width(),
						height:	$(window).height()
					};
					$(this)
						.prepend(
							$('<div id="dialog"></div>')
								.html('<a href="#" class="close">close</a>')
								.click(function(){
									Preview.popup.hide();
									Preview.bg.hide();
								})
						)
						.show()
					;
				})
		);
		return false;
	}
};
