try {
	$(function() {
				$(".dealer").click(
														function() {
															var id = parseInt(this.id);
															if ($("#" + id + '_details').html() != '') {
																$("#" + id + '_details').html('');
																return;
															}
															$("#" + id + '_details').html('loading .. ');
															$(".dealer_detail").html('');
															$.ajax({
																beforeSend: function() { $("#" + id + '_details').html('loading .. '); },
																type:'GET',
																url: '/plugins/dealers/reader.php?act=dealers_reader_details',
																data: 'id=' + id,
																complete: function(XMLHttpRequest, textStatus) {
																	$("#" + id + '_details').html(XMLHttpRequest.responseText);
																}
															});
														}
											);
	});
} catch (e) {
	alert(e.toString());
}
