/**
 * Want your site to fade in from white or black?
 * It's possible you're trapped in a 1996 'time hole', but
 * before we try and rescue you, lets do it anyway!
 *
 * @author Avery
 * @copyright 2008 ? or is it 1996 ?
 * @sarcasm 100%
 */

$.fn.fadeFromColor = function(obj,nemesies) {
	if (!obj) var obj = {};
	if (!obj.color) obj.color = "FFFFFF";
	if (!obj.speed) obj.speed = 1000;
	if (!obj.height) obj.height = "100%";
	if (!obj.width) obj.width = "100%";
	if (!obj.topOffset) obj.topOffset = 0;
	if (!obj.leftOffset) obj.leftOffset = 0;
 	if (!obj.zindex) obj.zindex = 600;
	$("<div/>")
	.attr("id","fadeout_div")
	.css("background-color",("#"+obj.color))
	.css("position","absolute")
	.css("top",(obj.topOffset))
	.css("left",(obj.leftOffset))
	.css("width",(obj.width))
	.css("height",(obj.height))
	.css("z-index",(obj.zindex))
	//.maxScaleCompare(nemesies,false)
	.appendTo($(this))
	.fadeRemove();
	return $(this);
}

$.fn.fadeRemove = function(fadeSpeed) {
	$(this).fadeOut(
		fadeSpeed,
		function() {
			$(this).remove();
		}
	);
	return null;
}