jQuery.fn.liveUpdate = function(list, tag){
list = jQuery(list);

//HACK: show/hide doesn't seem to work in IE 7.  Small amounts of horizontal space
//still seem to exist even when the img tags are set to display: none
//using absolute positions to move them way off of the screen and then setting position
//back to static to get them into their normal home.

if ( list.length ) {
	var rows = list.children(tag),
		cache = rows.map(function(){
			if(tag == 'a') {
				return jQuery(this).children('img').attr("alt").toLowerCase();
			}
			else {
				return jQuery(this).attr("alt").toLowerCase();
				//return jQuery(this).children('img').attr("alt").toLowerCase();
			}
		});
		
	this
		.keyup(filter).keyup()
		.parents('form').submit(function(){
			return false;
		});
}
return this;
	
function filter(){
	var term = jQuery.trim( jQuery(this).val().toLowerCase() ), scores = [];
	
	if ( !term ) {
		//rows.show();
		rows.css('position', 'static');

	} else {
		//rows.hide();
		rows.css('position', 'absolute');
		rows.css('left', '-9999px');
		rows.css('top', '-9999px');

		cache.each(function(i){
			var score = this.score(term);
			if (score > 0) { scores.push([score, i]); }
		});

		jQuery.each(scores.sort(function(a, b){return b[0] - a[0];}), function(){
			//jQuery(rows[ this[1] ]).show();
			jQuery(rows[ this[1] ]).css('position', 'static');
		});
	}
}
};
