/**
 * @author John Resig
 * @desc NextUntil - select all tags in between two tags, for example
 *     all after one <h3> and before the next <h3>
 * @example
 *   $("dt > a").click(function(){ 
 *			$(this).parent().nextUntil('dt').toggle(); 
 *			return false;
 *		}); 
 *
 *	$('.page').nextUntil('h3').wrapAll('<div class="subpage"></div>');
 * @license free
 *
 */

jQuery.fn.nextUntil = function(expr) {
	var match = [];

				// We need to figure out which elements to push onto the array
	this.each(function(){
				// Traverse through the sibling nodes
		for( var i = this.nextSibling; i; i = i.nextSibling ) {
				// Make sure that we're only dealing with elements
			if ( i.nodeType != 1 ) continue;

				// If we find a match then we need to stop
			if ( jQuery.filter( expr, [i] ).length ) break;

				// Add it on to the stack if include is not set
				match.push( i );
		}
	});
	return this.pushStack( match, arguments );
}