- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
if($('.article-775-gallery')){
$('.article-775-gallery').each(function(){
get_images_by_building_gallery_id($(this).attr('id').replace(/gallery-/g,''));
});
}
/* ************************************************************************************************************** */
function get_building_details_by_property_id(id, size){
$.get(urlprefix + "/ajax/nanar/" + id, function(data){
var desc = jQuery.parseJSON(data);
console.log(desc);
if(desc.street && desc.zip && desc.town){
$('div[id="new-property-entry-id-' + id + '"] .house-item-head').html(desc.street + " <strong>" + desc.zip + " " + desc.town + " </strong>");
$('div[id="new-property-entry-id-' + id + '"] .house__item-descr').text(desc.description);
$('div[id="new-property-entry-id-' + id + '"] img').attr('src', desc.preview + size);
$('div[id="new-property-entry-id-' + id + '"] .verd').text(desc.verd);
$('div[id="new-property-entry-id-' + id + '"] .stard').text(desc.stard);
$('div[id="new-property-entry-id-' + id + '"] .tegund').text(desc.tegund);
$('div[id="new-property-entry-id-' + id + '"] .rooms').text(desc.rooms);
$('div[id="new-property-entry-id-' + id + '"]').slideDown();
}
});
}
if($('div[id^="new-property-entry-id-"]')){
setTimeout(function(){
$($('div[id^="new-property-entry-id-"]')).each(function(){
var size;
if($('div[id^="new-property-entry-id-"] div').hasClass('big-image')){
size = "180x140";
$('.new-property-entry-description').css('width','476px');
$('.time').css('display','block');
}else{size = "322x157";}
get_building_details_by_property_id($(this).attr('id').replace(/new-property-entry-id-/g,''), size);
});
},500);
}