ITB-WEST MARINES "SEMPER FIDELIS"
Play
01
U.S. Marines with Alpha Company, Infantry Training Battalion, School of Infantry - West, begin their second week of the Infantry Marine Course on...
Play
02
U.S. Marines with Alpha Company, Infantry Training Battalion, School of Infantry - West, learn demolitions and fire FGM-148 Javelin missiles during...
Play
03
U.S. Marines with Alpha Company, Infantry Training Battalion, School of Infantry - West, hone the skills they have learned throughout the course in...
Play
04
U.S. Marines with Alpha Company, Infantry Training Battalion, School of Infantry - West, complete their infantry physical assessment and sharpen...
Play
05
U.S. Marines with Alpha Company, Infantry Training Battalion, School of Infantry - West, learn demolitions and fire javelins as part of the eighth...
Play
06
U.S. Marines with Alpha Company, Infantry Training Battalion, School of Infantry - West, participate in the capstone exercise for the Infantry Marine...
'; return html; }; var modalYouTubeTemplate = function(obj) { var html = ''; html += '
'; html += '
'; html += '
'; html += '
'; return html; }; function handleStartMobileVideo(player) { goFullScreen(player); goLandscape(); } function handleEndMobileVideo() { exitFullScreen(); exitLandscape(); currentModal.close(); } var load = function(e) { e.preventDefault(); e.stopPropagation(); var slideid, attr, el = e.target || e.srcElement; if (el.nodeType === 3) el = el.parentNode; attr = el.hasAttribute('data-load') ? el.getAttribute('data-load') :el.parentNode.getAttribute('data-load'); if (attr) { slideid = attr.replace('videomodal', ''); currentVideo = document.querySelector('#' + attr + ' video'); } if (currentVideo) { // Video Modal currentModal = new Modal(attr, function() { // open modal callbackss currentSlideshow.pause(); currentVideo.crossorigin = 'anonymous'; if (Config.Video.isMobile) { handleStartMobileVideo(currentVideo); // @overlay, videoOverlay currentVideo.onended = function() { // on end of playback exit handleEndMobileVideo(currentModal); }; } currentVideo.play(); currentVideo.focus(); }, function() { // close modal callback var pausepromise = currentVideo.pause(); currentVideo.currentTime = 0.1; // ios 3.2 issue if (pausepromise) { pausepromise.then(function() { currentSlideshow.resume(); }) .catch(function(error) { if (Config.Debug) console.log(error); currentSlideshow.resume(); currentVideo.load(); }); } }); } else { // YouTube Video Modal currentVideo = document.querySelector('#' + attr + ' iframe'); if (currentVideo) { var playerID = Config.Video.VIDEO_TAG.concat(slideid); currentModal = new Modal(attr, function() { // open modal callback currentSlideshow.pause(); if (Config.Platform.isMobile) handleStartMobileVideo(currentVideo); playerYT[playerID].playVideo(); }, function() { // close modal callback if (Config.Platform.isMobile) handleEndMobileVideo(currentVideo); currentSlideshow.resume(); playerYT[playerID].stopVideo(); }); } } if (currentModal) currentModal.show(); }; if (typeof VideoObjectsArray152433 !== undefined && VideoObjectsArray152433.length > 0) { if (Config.Debug) console.log('VideoObjectsArray152433 > ', VideoObjectsArray152433); for (var i = 0, len = VideoObjectsArray152433.length; i < len; i++) { var data = VideoObjectsArray152433[i]; if (data) { var id = data.slideid ? data.slideid :i; var modalHTML = document.getElementById('videomodal' + id) || createModalAsElement(id); switch (data.format) { case 'dvids': modalHTML.innerHTML = modalDvidsTemplate(data); break; case 'youtube': modalHTML.innerHTML = modalYouTubeTemplate(data); break; } } } // create video triggers var videotriggers = document.body.querySelectorAll('.video-trigger'); for (var t = 0, tlen = videotriggers.length; t < tlen; t++) { videotriggers[t].addEventListener('click', load, false); videotriggers[t].addEventListener('touch', load, false); videotriggers[t].addEventListener('keydown', event => { if (event.code === "Space") { load(event) } }, false); } } } /* Slideshow - create a slideshow from loaded slides using jquery.cycle.slider @return - methods */ function SlideShow() { var $window = jQuery(window); var slideContainer = moduleContainer.find(".slides"); var slides = slideContainer.children(".slide"); var pagerContainer = moduleContainer.find(".pager-circles"); var pagerGroups = pagerContainer.find(".wrapper"); var pagerAnchors = pagerGroups.find("a"); var prevLinkAnchor = moduleContainer.find("a.previous"); var nextLinkAnchor = moduleContainer.find("a.next"); var prevTitle = prevLinkAnchor.children("span"); var nextTitle = nextLinkAnchor.children("span"); var activePagerGroup = pagerGroups.eq(0); var isSlideDetailsVisible = false; var windowResizeTimeout = null; var windowResizeTimeoutInterval = 500; function changePagerGroup(destinationIndex) { var goToNext = activePagerGroup.index() < destinationIndex; activePagerGroup = pagerGroups.eq(destinationIndex); } function setNextPrevAnchorLinks(counter) { var nexttitle, prevtitle, maxchars = 24; var shorten = function(str) { return str.length > maxchars ? str.substr(0, 22) + '...' :str; } switch (counter) { case 0: nexttitle = jQuery(slides[counter + 1]).attr('data-imagetitle'); prevtitle = jQuery(slides[slides.length - 1]).attr('data-imagetitle'); break; case (slides.length - 1): nexttitle = jQuery(slides[0]).attr('data-imagetitle'); prevtitle = jQuery(slides[counter - 1]).attr('data-imagetitle'); break; default: nexttitle = jQuery(slides[counter + 1]).attr('data-imagetitle'); prevtitle = jQuery(slides[counter - 1]).attr('data-imagetitle'); } prevTitle.html(shorten(prevtitle)); nextTitle.html(shorten(nexttitle)); } if (slides.length > 0) { pagerAnchors.eq(0).addClass("activeSlide"); slideContainer .cycle({ slides:"> .slide", fx:"fadeout", speed:500, timeout:5000, swipe:true, pauseOnHover:true, prev:prevLinkAnchor, next:nextLinkAnchor, log:false }) .on("cycle-before", function(evt, options, currentSlide, nextSlide) { slideContainer.find('.slideshow-img-holder').fadeOut(); }) .on("cycle-after", function(evt, options, currentSlide, nextSlide) { var current = parseInt(options.slideNum) - 1; initImageScrollForSlide(); pagerAnchors.removeClass("activeSlide"); pagerAnchors.eq(current).addClass("activeSlide"); if (activePagerGroup.children("a.activeSlide").length === 0) { var destinationPagerGroup = pagerGroups.find("a.activeSlide").parent("div.group"); changePagerGroup(destinationPagerGroup.index()); } setNextPrevAnchorLinks(current); }); if (false) { slideContainer.on('cycle-next', function(event, opts) { slideContainer.cycle('pause'); }); slideContainer.on('cycle-prev', function(event, opts) { slideContainer.cycle('pause'); }); } slideContainer.data("paused", false); pagerAnchors.on("click", function() { var destinationSlideIndex = $(this).index() + ($(this).parent("div.wrapper").index() * 13); slideContainer.cycle("goto", destinationSlideIndex); return false; }); moduleContainer.hover(function() { slideContainer.cycle("pause"); var activeIndex = pagerGroups.find("a.activeSlide").index(); isSlideDetailsVisible = true; }, function() { isSlideDetailsVisible = false; slideContainer.cycle("resume"); }); } return { init:function() { moduleContainer.find(".toprotatorfull").css("visibility", "visible"); }, pause:function() { slideContainer.cycle('pause'); }, resume:function() { slideContainer.cycle("resume"); } }; } function initImageScrollForSlide() { var currentImage = moduleContainer.find('.cycle-slide-active').attr('data-image'); var currentImgAlt = moduleContainer.find('.cycle-slide-active').attr('data-imagetitle'); var width = moduleContainer.find('.cycle-slide-active').attr('data-width'); if (currentImage.toLowerCase().indexOf("dvidshub.") != -1) width = 1.3 * width; var height = moduleContainer.find('.cycle-slide-active').attr('data-height'); moduleContainer.find('.slideshow-img-holder').imageScroll('destroy'); moduleContainer.find('.slideshow-img-holder').imageScroll({ image: currentImage, container: moduleContainer.find('.toprotatorfull .slides'), coverRatio: 1, parallax: false, mediaWidth: width, mediaHeight: height, }); moduleContainer.find('.img-holder-img').attr('alt', currentImgAlt); moduleContainer.find('.slideshow-img-holder').fadeIn(500); } /* Custom Animation for Banner (non-AOS) To ensure correct sequencing of animations */ function AnimateTopRotatorFull() { var num = document.getElementById('toprotatorfull-number-title-152433'); var title = document.getElementById('toprotatorfull-title-152433'); var desc = document.getElementById('toprotatorfull-description-152433'); var aside = document.getElementById('toprotatorfull-aside-links-152433'); var pager = document.getElementById('toprotatorfull-pager-152433'); var prev = document.getElementById('toprotatorfull-prev-152433'); var next = document.getElementById('toprotatorfull-next-152433'); if (!num || !title || !desc || !aside || !pager || !prev || !next) return; var timeline = gsap.timeline({ delay:0.9, paused:true }); timeline .addLabel('caption') .staggerTo([num, title, desc, aside], 0.6, { opacity:1, x:0, ease:'cubic-bezier(0.4, 0.0, 0.2, 1)' }, 0.2, 'caption') .addLabel('pager') .to(pager, 0.8, { opacity:1, y:0, ease:'cubic-bezier(0.4, 0.0, 0.2, 1)' }, 'pager') .addLabel('footer') .to([prev, next], 0.8, { opacity:1, x:0, ease:'cubic-bezier(0.4, 0.0, 0.2, 1)' }, 'footer'); timeline.play(); } jQuery(document).ready(function () { moduleContainer = jQuery("#dnn_ctr152433_ModuleContent"); var slideshow152433 = new SlideShow(); slideshow152433.init(); VideoModalFactory(slideshow152433); $('#toprotatorfull-152433').on('inview', function(event, isInView) { if (isInView) { AnimateTopRotatorFull(); } }); var screenHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); var minHeight = 400; //fix small viewports in landscape mode if (screenHeight < minHeight) { $('#toprotatorfull-152433').css('min-height', minHeight); } //add aria for screen reader $("#toprotatorfull-pager-152433 .wrapper a").each(function (i) { $(this).attr("aria-label", "Slide " + ++i + " of " + "6"); }); initImageScrollForSlide(); }); })(); //IIFE