
jQuery.fn.formatHorizontalRule = function(){
    return this.each(function(){
    	var hr = $(this);
    	hr.wrap('<div class="hr"></div>');    	    
    });    
}

jQuery.fn.formatSelect = function(){
    return this.each(function(){
		var select = $(this);
		
		select.wrap('<div class="select_wrapper"></div>');
		select.parent('.select_wrapper').prepend('<span>'+select.find('option:selected').text()+'</span>');		
		
		select.change(function(){		
			$(this).prev('span').replaceWith('<span>'+$(this).find('option:selected').text()+'</span>');
		});		
	});
}

jQuery.fn.formatCheckbox = function(){
	return this.each(function(){
	
	});
}

jQuery.fn.slowEach = function( interval, callback ) {
	var array = this;
	if( ! array.length ) return;
	var i = 0;
	next();
	function next() {
		if( callback.call( array[i], i, array[i] ) !== false )
			if( ++i < array.length )
				setTimeout( next, interval );
	}
}; 
