$.fn.blind = function(options){
	options = options || {};
	options.size = options.size || '0px';
	options.opacity = options.opacity || 1;
	options.duration = options.duration || 1000;
	options.direction = options.direction || 'vertical';
	if (options.direction=='vertical'){
		if ($(this).css('height')=='0px'){
			$(this).animate({height:options.size, opacity:options.opacity},options.duration);
		}else{
			$(this).animate({height:0, opacity:0},options.duration);
		}
	}else{
		if ($(this).css('width')=='0px'){
			$(this).animate({width:options.size, opacity:options.opacity},options.duration);
		}else{
			$(this).animate({width:0, opacity:0},options.duration);
		}
	}
	return $(this);
}

$.fn.blink = function(color1, color2, duration){
	color1 = color1 || '#000';
	color2 = color2 || '#fff';
	duration = duration || 2000;
	$(this)
		.animate({backgroundColor:color1},'fast')
		.animate({backgroundColor:color2},'fast')
		.animate({backgroundColor:color1},'fast')
		.animate({backgroundColor:color2},'fast')
		.animate({backgroundColor:color1},'fast')
		.animate({backgroundColor:color2},'fast')
		.effect("highlight", { color: color1 }, duration);
	return $(this);
}