//smfbox - my name for the modified greybox
	var closeImg = 'images/close-x.png';

	if (closeImg != '') {toClose = '<img src="'+closeImg+'" alt="CLOSE |X|" />';} else {toClose = 'CLOSE |x|'};
	$('.smfbox').live('click',function(){
		var thepage = $(this).attr('href');
		productId = $(this).attr('id');
		$('body').append('<div id="smfoverlay"></div><div id="smfboxwrap"><div id="smfbox"><div id="smfcaption">&nbsp; <span id="smfclose">'+toClose+'</span></div><iframe src="'+thepage+'" frameborder="0" id="smfcopy" /></div></div>');
			
			//window starts off hidden to give the ajax time to load
			$('#smfoverlay').css('opacity', '0.75');
			$('#smfoverlay').fadeIn();
			$('#smfbox').fadeIn();

		//Remove smfbox when you click the close bar
		$('#smfclose').click(function(){
			$('#smfbox').fadeOut('fast');
			$('#smfoverlay').fadeOut(1000, function(){
				$('#smfboxwrap').remove();
				$('#smfoverlay').remove();
			});
		});

		//Remove smfbox when you click outside its borders
		$('#smfoverlay').click(function(){
			$('#smfbox').fadeOut('fast');
			$('#smfoverlay').fadeOut(1000, function(){
				$('#smfboxwrap').remove();
				$('#smfoverlay').remove();
			});
		});

		$('#smfboxwrap').click(function(){
			$('#smfbox').fadeOut('fast');
			$('#smfoverlay').fadeOut(1000, function(){
				$('#smfboxwrap').remove();
				$('#smfoverlay').remove();
			});
		});

	//prevent the default link behavior			
	return false;
	});
