1import device from './device.js'; 2import cycle from '../plugins/jquery.cycle2.min.js' 3import '../plugins/plyr.js'; 4 5 6var slideshow = { 7 8 plyr_loopcount_global: 0, 9 //slideshow_init: false, 10 11 init: function () { 12 //console.log("slideshow init with - " + this.slideshow_init); 13 // var slideshow.plyr_loopcount_global = 0; 14 //if (this.slideshow_init == false) { 15 this.plyr_loopcount_global = 0; 16 17 if (window.galleries.device.handheld()) { 18 $('.hero-parallax-element').removeClass('hero-parallax-element'); 19 } 20 21 // Accessibility - Hide parallax hero header from screen readers 22 $('#parallax-hero_header').attr('aria-hidden', true); 23 24 // Accessibility - remove links and buttons within mirror slideshow from tab order 25 $('#mirror-slideshow a, #mirror-slideshow button').each(function () { 26 $(this).attr('tabindex', -1); 27 }); 28 29 // Combine duplicate pagination labels when using location records 30 if ($('body.homepage_slideshow_continuous_cycle').length && $('#slideshow .slideshow_pager.location_pagination_enabled .slideshow-pager-item-wrapper.slideshow-text .slideshow-pager-item').length) { 31 var seen = {}; 32 $('#slideshow .slideshow_pager.location_pagination_enabled .slideshow-pager-item-wrapper.slideshow-text .slideshow-pager-item').each(function () { 33 34 var location = $(this).text(); 35 36 if (seen[location]) { 37 $(this).hide(); 38 $(this).parent().hide(); 39 $(this).parent().css('padding', '0'); 40 $(this).parent().addClass('inactive'); 41 } else { 42 seen[location] = true 43 $(this).parent().addClass('remain_active') 44 } 45 }) 46 } 47 48 if ($('.slide_has_video').length || $('#slideshow.fullscreen_video').length) { 49 window.galleries.slideshow.video_content('body'); 50 } 51 52 $('#slideshow ul, #mirror-slideshow ul').each(function () { 53 54 $(this).find('.cycle-sentinel').not('#sidebar .cycle-sentinel').remove(); 55 56 if (!$(this).hasClass('hero-parallax-element')) { 57 58 var autoHeight = 'calc'; 59 if ($("#slideshow, #mirror-slideshow").attr('data-cycle-autoheight-setting')) { 60 autoHeight = $("#slideshow").attr('data-cycle-autoheight-setting'); 61 } 62 63 var slideshowtimeout = 5500; 64 // if ($("#slideshow, #mirror-slideshow").attr('data-cycle-timeout-setting')) { 65 if ($("#slideshow").attr('data-cycle-timeout-setting')) { 66 slideshowtimeout = parseInt($("#slideshow").attr('data-cycle-timeout-setting')); 67 } 68 69 var newsettings; 70 if ($("#slideshow, #mirror-slideshow").attr('data-cycle-custom-settings')) { 71 newsettings = JSON.parse($("#slideshow, #mirror-slideshow").attr('data-cycle-custom-settings')); 72 } 73 74 if ($(this).find('.slide_has_video')) { 75 var $instance = $(this); 76 window.galleries.slideshow.video_content_embed_scale($instance); 77 78 var rtime, timeout = false, delta = 300; 79 80 $(window).resize(function () { 81 rtime = new Date(); 82 if (timeout === false) { 83 timeout = true; 84 setTimeout(resizeend, delta); 85 } 86 }); 87 88 function resizeend() { 89 if (new Date() - rtime < delta) { 90 setTimeout(resizeend, delta); 91 } else { 92 timeout = false; 93 window.galleries.slideshow.video_content_embed_scale($instance); 94 } 95 }; 96 /*function resizeend() { 97 if (new Date() - rtime < delta) { 98 setTimeout(resizeend, delta); 99 } else { 100 timeout = false;
101 window.galleries.slideshow.video_content_embed_scale($instance); 102 } 103 }*/ 104 } 105 var mastersettings = { 106 fx: 'fade', 107 speed: 1200, 108 timeout: slideshowtimeout, 109 pause: 0, 110 slides: '>', 111 autoHeight: autoHeight, 112 swipe: true, 113 sync: true, 114 log: false 115 } 116 117 for (var newkey in newsettings) { 118 mastersettings[newkey] = newsettings[newkey]; 119 } 120 121 var onfunction = $('#slideshow').on; 122 if (onfunction) { 123 $('#slideshow ul, #mirror-slideshow ul').on('cycle-post-initialize', function (event, optionHash) { 124 //$(this).on('cycle-post-initialize', function(event, optionHash) { 125 var first_slide = $('>', this).not('.cycle-sentinel').filter(':eq(0)'); 126 if (first_slide.find('.video_container.active').length) { 127 var plyr_loopcount = parseInt(first_slide.attr('data-plyr-index')) - 1; 128 // if (!isNaN(plyr_loopcount)){ 129 window.plyr_video_players[plyr_loopcount].on('ready', function (event) { 130 if (!$('#hero_image_responsive').is(':visible')) { 131 window.plyr_video_players[plyr_loopcount].play(); 132 } 133 }); 134 // } 135 // window.player = plyr_video_players[0]; //sometimes requires this to expose player 136 } 137 138 // Set position of pagination controls for standard homepage slideshow layout 139 function setSlideshowPaginationControlsPosition() { 140 141 if ($('.section-home #slideshow.full_list ul li .image').length) { 142 143 144 var slideshow_image_height = $('.section-home #slideshow.full_list ul li .image').outerHeight(true); 145 // If there is no caption set the pagination position higher as it no longer needs to sit inline with the caption 146 if (!$('.section-home #slideshow.full_list ul li .content.slide_has_caption').length) { 147 148 149 slideshow_image_height -= 10 150 151 } 152 153 if ($('#slideshow.split_slideshow').length) { 154 // set height for split slideshow only 155 slideshow_image_height = $('.section-home #slideshow.full_list ul li .image').outerHeight(true) - 60 156 } 157 158 159 $('.section-home #slideshow.full_list .slideshow-pagination-controls').css({ 160 "bottom": "auto", 161 "top": slideshow_image_height 162 }); 163 164 } 165 } 166 167 168 setSlideshowPaginationControlsPosition(); 169 170 $(window).resize(function () { 171 setSlideshowPaginationControlsPosition(); 172 }); 173 174 // Pause slideshow if link inside gets focus 175 $('#slideshow a, #mirror-slideshow a').focusin(function () { 176 $('#slideshow ul, #mirror-slideshow ul').cycle('pause'); 177 }); 178 179 // Slideshow pagination controls 180 if ($('#slideshow .slideshow-pagination-controls').length) { 181 182 $('#slideshow .slideshow-pagination-controls .btn-next').off("click.nextSlideshowSlide"); 183 $('#slideshow .slideshow-pagination-controls .btn-next').on('click.nextSlideshowSlide', function () { 184 $('#slideshow ul, #mirror-slideshow ul').cycle('pause').cycle('next'); 185 }); 186 187 $('#slideshow .slideshow-pagination-controls .btn-prev').off("click.prevSlideshowSlide"); 188 $('#slideshow .slideshow-pagination-controls .btn-prev').on('click.prevSlideshowSlide', function () { 189 $('#slideshow ul, #mirror-slideshow ul').cycle('pause').cycle('prev'); 190 }); 191 } 192 193 if ($('#slideshow .slideshow_pager').length) { 194 $('body').addClass('homepage-slideshow-pagination-enabled'); 195 196 $('#slideshow .slideshow_pager').each(function () { 197 198 var pager = $(this); 199 200 pager.find('.slideshow-pager-item-wrapper:nth-child(1)').addClass('active'); 201 pager.find('.slideshow-pager-item-wrapper').each(function () { 202 var dotwrapper = $(this); 203 204 if (!$('.slideshow-pager-item-wrapper.remain_active').length) { 205 dotwrapper.click(function () { 206 var paged_slideshow = dotwrapper.closest('.paged-slideshow-wrapper').find('ul'); 207 $(paged_slideshow).cycle(parseInt(dotwrapper.attr('data-rel'))); 208 pager.find('.slideshow-pager-item-wrapper').removeClass('active'); 209 dotwrapper.addClass('active'); 210 $(paged_slideshow).cycle('pause'); 211 212 if ($('#mirror-slideshow ul').length) { 213 $('#mirror-slideshow ul').cycle(parseInt(dotwrapper.attr('data-rel'))); 214 $('#mirror-slideshow ul').cycle('pause'); 215 } 216 }); 217 } 218 }); 219 }); 220 } 221 222 // Accessibility - stop any parallax slideshow links from being focusable 223 if ($('#parallax-slideshow a').length) { 224 $('#parallax-slideshow a').attr('tabindex', -1); 225 } 226 227 window.galleries.slideshow.initialized(event, optionHash); 228 }); 229 230 // Function fired directly before the slide has changed 231 $('#slideshow ul, #mirror-slideshow ul').on('cycle-before', function (event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { 232 // $(this).on('cycle-before', function(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { 233 if ($(incomingSlideEl).find('.video_container.active').length) { 234 var plyr_loopcount = parseInt($(incomingSlideEl).attr('data-plyr-index')) - 1; 235 if (!$('#hero_image_responsive').is(':visible')) { 236 window.plyr_video_players[plyr_loopcount].play(); 237 } 238 } 239 240 if ($('#slideshow .slideshow_pager.location_pagination_enabled').length) { 241 var previous_slide_text = ($('.slideshow-pager-item-wrapper.active').attr('aria-label')); 242 var previous_slide_text_edit = previous_slide_text.substring(0, previous_slide_text.indexOf(' (Current slide)')); 243 var new_aria_label = previous_slide_text_edit 244 } else { 245 var previous_slide_number = parseInt($('.slideshow-pager-item-wrapper.active').attr('data-rel')) + 1; 246 var aria_label_title = typeof $('.slideshow-pager-item-wrapper.active').attr('data-button_aria_title') != 'undefined' ? $('.slideshow-pager-item-wrapper.active').attr('data-button_aria_title') : null; 247 var new_aria_label = 'Go to slide ' + previous_slide_number + (aria_label_title ? ', ' + aria_label_title : '') 248 $('.slideshow-pager-item-wrapper.active').removeClass('active').attr('aria-label', new_aria_label); 249 } 250 251 $('.slideshow-pager-item-wrapper.active').removeClass('active').attr('aria-label', new_aria_label); 252 var next_slideshow_item = (optionHash.nextSlide).toString(); 253 var new_slide_aria_label = $('.slideshow-pager-item-wrapper[data-rel=' + next_slideshow_item + ']').attr('aria-label') + ' (Current slide)' 254 255 if ($('.slideshow-pager-item-wrapper[data-rel=' + next_slideshow_item + ']').hasClass('inactive')) { 256 var current_aria_label = $('.slideshow-pager-item-wrapper[data-rel=' + next_slideshow_item + ']').first().text() 257 $('.slideshow-pager-item-wrapper[data-rel=' + next_slideshow_item + ']').prevAll('.slideshow-pager-item-wrapper.remain_active:not(".active"):contains("' + current_aria_label + '")').addClass('active').attr('aria-label', new_slide_aria_label); 258 } else { 259 $('.slideshow-pager-item-wrapper[data-rel=' + next_slideshow_item + ']').addClass('active').attr('aria-label', new_slide_aria_label); 260 } 261 262 window.galleries.slideshow.after(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag); 263 }); 264 265 $(this).on('cycle-after', function (event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { 266 if ($(outgoingSlideEl).find('.video_container.active').length) { 267 var plyr_loopcount = parseInt($(outgoingSlideEl).attr('data-plyr-index')) - 1; 268 window.plyr_video_players[plyr_loopcount].pause(); 269 //console.log('pausing player' + plyr_loopcount); 270 } 271 }); 272 } 273 274 $('#slideshow ul, #mirror-slideshow ul').cycle(mastersettings); 275 276 $(this).closest('#slideshow').find('.slideshow_pagination_prev').off("click.slideshow_pagination_prev").on('click.slideshow_pagination_prev', function () { 277 278 $(this).closest('#slideshow').find('ul').cycle('pause').cycle('prev'); 279 return false;
280 }); 281 282 $(this).closest('#slideshow').find('.slideshow_pagination_next').off("click.slideshow_pagination_next").on('click.slideshow_pagination_next', function () { 283 284 $(this).closest('#slideshow').find('ul').cycle('pause').cycle('next'); 285 return false; 286 }); 287 288 289 $('#slideshow.paused, #mirror-slideshow.paused') 290 .each(function () { 291 pausePlay(); 292 }) 293 ; 294 } 295 window.galleries.slideshow.homepage_slideshow.init(); 296 }); 297 298 if ($('#hero_image_responsive .slide_has_video').length) { 299 var plyr_loopcount = parseInt($('#hero_image_responsive .slide_has_video').attr('data-plyr-index')) - 1; 300 window.plyr_video_players[plyr_loopcount].on('ready', function (event) { 301 if ($('#hero_image_responsive').is(':visible')) { 302 window.plyr_video_players[plyr_loopcount].play(); 303 } 304 }); 305 if ($('#hero_image_responsive').is(':visible')) { 306 window.plyr_video_players[plyr_loopcount].play(); 307 } 308 } 309 310 //this.slideshow_init = true; 311 //console.log("slideshow init change to " + this.slideshow_init); 312 //} 313 }, 314 315 initialized: function (event, optionHash) { 316 317 }, 318 319 after: function (event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) { 320 321 }, 322 323 video_content: function (instance) { 324 325 // instances = {} 326 // plyr_video_players = Plyr.setup('.slide_video', { 327 // captions: { 328 // active: true 329 // }, 330 // muted: true, 331 // loop: { active: true }, 332 // controls: [] //controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'fullscreen'] //['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'] 333 // }); 334 335 //plyr_video_players = Array.from(document.querySelectorAll('.slide_video')).map(player => new Plyr(player)); 336 337 if ($('.slide_has_video', instance).length) { 338 339 var plyr_array = []; 340 341 $('.slide_has_video', instance).each(function () { 342 slideshow.plyr_loopcount_global = parseInt(parseInt(slideshow.plyr_loopcount_global) + parseInt(1)); 343 344 $(this).attr('data-plyr-index', slideshow.plyr_loopcount_global); 345 ////PLAYERS SETUP WAS PREVIOUSLY HERE... WHY? 346 347 const $slide_video = $(this).find('.slide_video'); 348 349 if ($slide_video.length) { 350 $(this).find('.video_container').addClass('active'); 351 plyr_array = [...$slide_video]; 352 } 353 354 const $mobile_video = $(this).find('.mobile_video_inner .slide_video'); 355 356 if ($mobile_video.length) { 357 let timeout; 358 const onResize = () => { 359 clearTimeout(timeout); 360 361 timeout = setTimeout(() => { 362 if (window.plyr_video_players?.length < 2) { 363 return; 364 } 365 366 const video_index = $mobile_video.is(':visible') ? 1 : 0; 367 if (!window.plyr_video_players[video_index].playing) { 368 window.plyr_video_players[video_index].play(); 369 } 370 }, 100); 371 }; 372 addEventListener('resize', onResize); 373 onResize(); 374 } 375 }).promise().done(function () { 376 377 window.plyr_video_players = Plyr.setup(plyr_array, { 378 379 // These seem to replace, not extend the config options supplied in the markup. TBC 380 captions: { 381 active: true 382 }, 383 muted: true, 384 volume: 0, 385 autoplay: false,
386 clickToPlay: false, 387 hideControls: false, 388 controls: [] 389 // ratio: '1:1' 390 }); 391 }); 392 } 393 394 // Click event for video play/pause button 395 $('#slideshow .video_pause_button, #hero_header .video_pause_button').each(function () { 396 $(this).off("click.videoPauseButton"); 397 $(this).on("click.videoPauseButton", function () { 398 if ($(".pause_symbol", this).hasClass('paused')) { 399 var current_status = 'playing'; 400 $(".pause_symbol", this).removeClass("paused"); 401 } else { 402 var current_status = 'paused'; 403 $(".pause_symbol", this).addClass("paused"); 404 } 405 if ($(this).closest('#slideshow').length) { 406 var selector = '#slideshow .fullscreen_slideshow_video video'; 407 var selector_active = '#slideshow .fullscreen_slideshow_video video'; 408 } else { 409 var selector = '#mirror-slideshow .slide_has_video video'; 410 var selector_active = '#mirror-slideshow .slide_has_video.cycle-slide-active video'; 411 } 412 var active_video = $(selector); 413 if (active_video.length) { 414 if (current_status == 'playing') { 415 console.log('play'); 416 console.log($(selector_active)); 417 $(selector_active).each(function () { 418 console.log('each'); 419 $(this).get(0).play(); 420 }); 421 } else { 422 $(selector).each(function () { 423 $(this).addClass('paused'); 424 $(this).get(0).pause(); 425 }); 426 } 427 } else { 428 console.log('Cant find active video'); 429 } 430 }); 431 }); 432 }, 433 434 435 video_content_embed_scale: function (instance) { 436 437 //Simulate object fit for the video inside the iframe, based on the ratio of the video inside 438 439 $(instance).find('.slide_has_video').each(function () { 440 441 var slideindex = parseInt($(this).attr('data-plyr-index')) - 1; 442 var embed_wrapper_height = $(this).find('.plyr__video-embed').closest('.video_container').height(); 443 var embed_wrapper_width = $(this).find('.plyr__video-embed').closest('.video_container').width(); 444 var embed_wrapper_portrait_landscape = ((embed_wrapper_height >= embed_wrapper_width) ? 'portrait' : 'landscape'); 445 if (typeof plyr_video_players[slideindex].config.ratio != 'undefined' && plyr_video_players[slideindex].config.ratio) { 446 var embed_ratio = plyr_video_players[slideindex].config.ratio; 447 } else { 448 var embed_ratio = '16:9' 449 } 450 var ratio_split = embed_ratio.split(':'); 451 452 if (ratio_split.length == 2) { 453 454 var embed_portrait_landscape = ((parseInt(ratio_split[1]) >= parseInt(ratio_split[0])) ? 'portrait' : 'landscape'); 455 var embed_width_to_height_scale = ratio_split[1] / ratio_split[0]; 456 457 if (embed_wrapper_portrait_landscape == 'portrait' && embed_portrait_landscape == 'landscape' || embed_wrapper_portrait_landscape == 'landscape' && embed_portrait_landscape == 'landscape') { 458 459 // Work out the height of the inner embed based on the aspect ratio 460 var embed_video_height = embed_width_to_height_scale * embed_wrapper_width; 461 462 if (embed_video_height <= embed_wrapper_height) { 463 var height_difference_scale = embed_wrapper_height / embed_video_height; 464 $(this).find('.plyr__video-embed').css('transform', 'scale(' + height_difference_scale + ')'); 465 $(this).find('.plyr__video-embed').css('width', 'auto'); 466 } else { 467 $(this).find('.plyr__video-embed').css('transform', 'scale(1.0)'); 468 $(this).find('.plyr__video-embed').css('width', '100%'); 469 } 470 471 } 472 } 473 474 }); 475 }, 476 477 homepage_slideshow: { 478 479 init: function () { 480 //console.log("homepage slideshow init"); 481 if ($('#content #slideshow.fullscreen_slideshow').length) { 482 var header_size = ($('#header:not(.header_transparent)').is(':visible') ? $('#header').outerHeight() : 0); 483 if (!$('.parallax-mirror #slideshow').length && header_size > 0) { 484 485 $(window).on("load", function () { 486 // If the header height has changed after the page 'load' event, update the main_content padding again 487 // e.g. the height may change after webfonts have properly loaded 488 var header_size = $('#header').outerHeight(); 489 if (parseInt($('#slideshow.fullscreen_slideshow').css('top')) > header_size) { 490 $('#slideshow.fullscreen_slideshow').css('top', header_size); 491 window.galleries.slideshow.homepage_slideshow.process(); 492 } 493 }); 494 } 495 $('body').addClass('type-fullscreen'); 496 window.galleries.slideshow.homepage_slideshow.process(); 497 $(window).resize(function () { 498 window.galleries.slideshow.homepage_slideshow.process(); 499 }); 500 501 if ($('#content #slideshow.fullscreen_slideshow').hasClass('fullscreen_video') && !$('#slideshow .fullscreen_slideshow_video').hasClass('initialized')) { 502 $('#slideshow .fullscreen_slideshow_video').addClass('initialized'); 503 var isMobile = window.galleries.device.handheld(); 504 if (!isMobile) { 505 var videobackground_muted = false 506 if ($('#slideshow .fullscreen_slideshow_video').attr('data-muted') == "True") { 507 videobackground_muted = true 508 } 509 var videobackground; 510 Artlogic.import('plugins/backgroundVideo.js').then(function (m) { 511 videobackground = $.backgroundVideo($('#slideshow .fullscreen_slideshow_video'), { 512 "align": "centerX", 513 "width": 1920, 514 "height": 1080, 515 "path": "", 516 "filename": $('#slideshow .fullscreen_slideshow_video').attr('data-video'), 517 "container": "#slideshow .fullscreen_slideshow_video", 518 "muted": videobackground_muted 519 //"types": ["mp4","webm"] 520 }); 521 }) 522 523 if (!videobackground_muted) { 524 // Only unmute video if an interaction has already taken place with the page - this is because certain browsers block video sound if no interactions have taken place 525 // If auto-unmute is not possible, unmute on click 526 $('#slideshow .fullscreen_slideshow_video video').click(function () { 527 $('#slideshow .fullscreen_slideshow_video video')[0].muted = false;
528 }); 529 } 530 if ($.browser.safari) { 531 if ($('#video_background').length) { 532 $('#video_background').get(0).play(); 533 } 534 } 535 } 536 } 537 } 538 539 if ($('#content #slideshow.split_slideshow').length) { 540 $('body').addClass('type-split-slideshow'); 541 header_size = ($('#header:not(.header_transparent)').is(':visible') ? $('#header').outerHeight() : 0); 542 if (!$('.parallax-mirror #slideshow').length && header_size > 0) { 543 544 $(window).on("load", function () { 545 // If the header height has changed after the page 'load' event, update the main_content padding again 546 // e.g. the height may change after webfonts have properly loaded 547 var header_size = $('#header').outerHeight(); 548 if (parseInt($('#slideshow.split_slideshow').css('top')) > header_size) { 549 $('#slideshow.split_slideshow').css('top', header_size); 550 window.galleries.slideshow.homepage_slideshow.process(); 551 } 552 }); 553 } 554 555 window.galleries.slideshow.homepage_slideshow.process(); 556 $(window).resize(function () { 557 // Do not process the homepage slideshow if the page is being scaled within the feature panel editor 558 if (!$('body').hasClass('scale_for_feature_panel_sort')) { 559 window.galleries.slideshow.homepage_slideshow.process(); 560 } 561 }); 562 563 } 564 }, 565 566 process: function () { 567 if ($('#slideshow.fullscreen_slideshow').length) { 568 var cms_toolbar_height = 0; 569 if ($('body').hasClass('cms-frontend-toolbar-active') && $('#cms-frontend-toolbar-container').length) { 570 cms_toolbar_height = $('#cms-frontend-toolbar-container').outerHeight(); 571 } 572 // var header_offset = ($('#header').is(':visible') ? $('#header').outerHeight() : 0); 573 // if ($('#header').css('position') == 'fixed' || $('#header').css('position') == 'absolute') { 574 // var header_offset = 0; 575 // } 576 var slideshow_offset_top = parseInt($('#content #slideshow.fullscreen_slideshow').offset().top); 577 var slideshow_height = $(window).height() - ($('#header').is(':visible') ? slideshow_offset_top : 0); 578 var header_height = $('.header-fixed-wrapper').height(); 579 $('#content #slideshow.fullscreen_slideshow').height(slideshow_height); 580 // debugger; 581 $('#main_content').css('padding-top', $('#content #slideshow.fullscreen_slideshow').outerHeight(true) + (slideshow_offset_top - cms_toolbar_height) - header_height); 582 if (!window.galleries.device.handheld()) { 583 $('.fullscreen_slideshow_parallax').each(function () { 584 //$(this).parallax({imageSrc: $(this).attr('data-image-src')}); 585 }); 586 } 587 } 588 589 if ($('#slideshow.split_slideshow').length) { 590 cms_toolbar_height = 0; 591 if ($('body').hasClass('cms-frontend-toolbar-active') && $('#cms-frontend-toolbar-container').length) { 592 cms_toolbar_height = $('#cms-frontend-toolbar-container').outerHeight(); 593 } 594 // var header_offset = ($('#header').is(':visible') ? $('#header').outerHeight() : 0); 595 // if ($('#header').css('position') == 'fixed' || $('#header').css('position') == 'absolute') { 596 // var header_offset = 0; 597 // } 598 slideshow_offset_top = parseInt($('#content #slideshow.split_slideshow').offset().top); 599 slideshow_height = $(window).height() - ($('#header').is(':visible') ? slideshow_offset_top : 0); 600 header_height = $('.header-fixed-wrapper').height(); 601 $('#content #slideshow.split_slideshow').height(slideshow_height); 602 // debugger; 603 $('#main_content').css('padding-top', $('#content #slideshow.split_slideshow').outerHeight(true) + (slideshow_offset_top - cms_toolbar_height) - header_height); 604 if (!window.galleries.device.handheld()) { 605 // $('.fullscreen_slideshow_parallax').each(function() { 606 // //$(this).parallax({imageSrc: $(this).attr('data-image-src')}); 607 // }); 608 } 609 } 610 611 } 612 613 } 614 615} 616 617window.galleries = window.galleries || {}; 618window.galleries.slideshow = slideshow; 619export default slideshow;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.