
ABOUT ALMIRANTE
Easy to handle, well-mannered, and a pleasure to have in the barn, Almirante is a charming and promising PRE stallion with a lot of potential ahead of him.
At just 3 years old, Almirante already shows remarkable natural quality, with expressive movement, good balance and excellent coordination. He moves with elasticity and power, using his body naturally and showing exciting potential for the future.
Almirante is at the beginning of his training. His work currently focuses on groundwork and lunging, giving him a solid foundation from which to continue his education and development.
With his willing attitude and versatile nature, Almirante has the potential to develop into a lovely partner for dressage or working equitation, or even small jumps.
(function () {
const page = document.getElementById('edx-enrico-page');
if (!page) { return; }
/* ===================================================== GALLERY ===================================================== */
const galleryTrack = page.querySelector('.edx-gallery-track');
const galleryNext = page.querySelector('.edx-next');
const galleryPrev = page.querySelector('.edx-prev');
const galleryPhotos = Array.from( page.querySelectorAll('.edx-photo') );
if (galleryTrack && galleryNext && galleryPrev) {
galleryNext.addEventListener( 'click', function () {
galleryTrack.scrollBy({ left: galleryTrack.clientWidth, behavior: 'smooth' });
} );
galleryPrev.addEventListener( 'click', function () {
galleryTrack.scrollBy({ left: -galleryTrack.clientWidth, behavior: 'smooth' });
} );
}
/* Hide gallery if no ACF images */
const gallery = page.querySelector('.edx-gallery');
if ( gallery && galleryPhotos.length === 0 ) { gallery.style.display = 'none'; }
/* ===================================================== VIDEO ===================================================== */
const video = page.querySelector('.edx-video');
if ( video && !video.querySelector('iframe') ) { video.style.display = 'none'; }
/* If gallery or video missing, let remaining item fill row */
const media = page.querySelector('.edx-media');
if (media) {
const hasGallery = galleryPhotos.length > 0;
const hasVideo = video && video.querySelector('iframe');
if ( (hasGallery && !hasVideo) || (!hasGallery && hasVideo) ) { media.style.gridTemplateColumns = '1fr'; }
if ( !hasGallery && !hasVideo ) { media.style.display = 'none'; }
}
/* ===================================================== PHOTO LIGHTBOX ===================================================== */
const photoLightbox = page.querySelector('.edx-lightbox');
const photoLightboxImage = page.querySelector('.edx-lightbox-image');
const photoClose = page.querySelector('.edx-lightbox-close');
const photoNext = page.querySelector('.edx-lightbox-next');
const photoPrev = page.querySelector('.edx-lightbox-prev');
const photoCounter = page.querySelector('.edx-lightbox-counter');
let currentPhoto = 0;
function getPhotoUrl(index) {
const photo = galleryPhotos[index];
if (!photo) { return ''; }
return ( photo.getAttribute('data-full') || ( photo.querySelector('img') ? photo.querySelector('img').src : '' ) );
}
function showPhoto(index) {
if (!galleryPhotos.length) { return; }
if (index < 0) { index = galleryPhotos.length - 1; } if (index >= galleryPhotos.length) { index = 0; }
currentPhoto = index;
photoLightboxImage.src = getPhotoUrl(currentPhoto);
photoCounter.textContent = (currentPhoto + 1) + " / " + galleryPhotos.length;
}
function openPhoto(index) {
showPhoto(index);
photoLightbox.classList.add('open');
document.body.style.overflow = 'hidden';
}
function closePhoto() {
photoLightbox.classList.remove('open');
document.body.style.overflow = '';
}
galleryPhotos.forEach( function (photo, index) {
photo.addEventListener( 'click', function () {
openPhoto(index);
} );
} );
if (photoClose) {
photoClose.addEventListener( 'click', closePhoto );
}
if (photoNext) {
photoNext.addEventListener( 'click', function () {
showPhoto( currentPhoto + 1 );
} );
}
if (photoPrev) {
photoPrev.addEventListener( 'click', function () {
showPhoto( currentPhoto - 1 );
} );
}
if (photoLightbox) {
photoLightbox.addEventListener( 'click', function (event) {
if ( event.target === photoLightbox ) { closePhoto(); }
} );
}
/* ===================================================== PEDIGREE ===================================================== */
const pedigreeButton = page.querySelector('.edx-pedigree-button');
const pedigreeThumb = pedigreeButton ? pedigreeButton.querySelector('img') : null;
const pedigreeSection = page.querySelector('.edx-pedigree');
const pedigreeLightbox = page.querySelector('.edx-pedigree-lightbox');
const pedigreeLightboxImage = page.querySelector('.edx-pedigree-lightbox-image');
const pedigreeClose = page.querySelector('.edx-pedigree-close');
/* No pedigree selected in ACF = hide section */
if ( pedigreeSection && !pedigreeThumb ) {
pedigreeSection.style.display = 'none';
}
function openPedigree() {
if ( !pedigreeThumb || !pedigreeLightbox ) { return; }
pedigreeLightboxImage.src = pedigreeThumb.src;
pedigreeLightbox.classList.add( 'open' );
document.body.style.overflow = 'hidden';
}
function closePedigree() {
if (!pedigreeLightbox) { return; }
pedigreeLightbox.classList.remove( 'open' );
document.body.style.overflow = '';
}
if ( pedigreeButton && pedigreeThumb ) {
pedigreeButton.addEventListener( 'click', openPedigree );
}
if (pedigreeClose) {
pedigreeClose.addEventListener( 'click', closePedigree );
}
if (pedigreeLightbox) {
pedigreeLightbox.addEventListener( 'click', function (event) {
if ( event.target === pedigreeLightbox ) {
closePedigree();
}
} );
}
/* ===================================================== KEYBOARD ===================================================== */
document.addEventListener( 'keydown', function (event) {
if ( pedigreeLightbox && pedigreeLightbox.classList.contains( 'open' ) ) {
if (event.key === 'Escape') { closePedigree(); }
return; }
if ( photoLightbox && photoLightbox.classList.contains( 'open' ) ) {
if (event.key === 'Escape') { closePhoto(); }
if (event.key === 'ArrowRight') {
showPhoto( currentPhoto + 1 );
}
if (event.key === 'ArrowLeft') {
showPhoto( currentPhoto - 1 );
}
}
} );
})();
