Сделано:
<script type="text/javascript">
$('.div img').click(function(){
$.ajax({
type: "GET",
url: $(this).attr('rel'),
dataType: "xml",
beforeSend: function() {
$('.reco_items').html('<div class="ajax_loader"><img src="loader.gif" /></div>');
},
success: function(xml){
for(var i = 0; i<4; i++){
$(xml).find('page:eq(' + i + ')').each(function(){
var Xname = $(this).find('name').text();
var Xlink = $(this).attr('link');
var Xtitle = $(this).find('value').eq(1).text();
var Ximg = $(this).find('value:first').text();
var Xprice = $(this).find('value:last').text();
$.ajax({
type: "GET",
url: "/udata://system/makeThumbnailFull/(." + Ximg + ")/210/300/notemplate/0/1",
dataType: "xml",
success: function(xml){
$(xml).find('udata').each(function (){
var Ximg = $(this).find('src').text();
$('.loader').remove();
$('.items').append("<div>'" + Xlink + "'<div>");
});
},
error: function() {
alert("An error occurred while processing XML file.");
}
});
});
}
},
});
});
</script>