');
//alert(item.html());
//var title = $(this).parent('a').attr("title");
//item.attr("title",title);
//$(itemDiv.html()).appendTo(item);
item.appendTo('.holephotos-carousel-inner');
if (i == 0) { // set first item active
item.addClass('active');
}
}
});
/* when clicking a thumbnail */
$(document).on("click", '.holephotos-gallery-images-container img.gallery-image-item', function (event) {
var idx = $(event.target).parent().parent().index();
var id = parseInt(idx);
$('#holephotos-lightbox-modal').modal('show'); // show the modal
$('#holephotos-carousel').carousel(id); // slide carousel to selected
});
$('#holephotos-lightbox-modal').on('show.bs.modal', function () {
$('.modal-dialog-image-gallery .modal-content .img-responsive').css('max-height', $(window).height() * 0.8);
});
});