/*
* Класс работы с ajax-выпадающими списками
* Урушев Владимир (c) ООО "Магия золота", 2009
* urushev@yandex.ru
*/

jQuery.fn.ajaxUpdate = function(options) {
	this.each(function(){
		var elem = $(this);
		
		if (elem.attr('type'))
			return true; //Потому, что у дива нет type!
			
		/*elem.attr('disabled','disabled');*/

		$.ajax({
			type: "POST",
			url: ('/index.php'),
			cache: false,
			data: {'hash': elem.attr('shash')},
			success: function(data){
				elem.html(data);
			}/*,
			beforeSend: function(){
				elem.setWait();
			}*/
		});
	});
		
	return this;
};
