PageSourceSearch

https://kulturportal.de/media/scripts/page_home.js

js kulturportal.de collected 2026-09-24 22:23:47 UTC 30,958 bytes, 777 lines download raw bytes

1$(document).ready(function () {
2
3    if ($("section").hasClass("landing-page")) {
4
5        var carouselOfferContainer = $('.owl-offer-slider');
6        var carouselOfferItems = carouselOfferContainer.find('.item-video');
7        var carouselVideo = carouselOfferContainer.owlCarousel({
8            margin: 28,
9            nav: true,
10            navText: ['<img src="' + ENV.document_root + '/media/images/icon_arrow-prev.svg">', '<img src="' + ENV.document_root + '/media/images/icon_arrow-next.svg">'],
11            autoplay: false,
12            dots: false,
13            smartSpeed: 400,
14            autoplayTimeout: 1000,
15            autoplayHoverPause: false,
16            autoplaySpeed: 1200,
17            //lazyLoad: true,
18            //lazyLoadEager: 1,
19            center: false,
20            responsive: {
21                0: {
22                    items: 1,
23                    loop: carouselOfferItems.length > 1
24                },
25                768: {
26                    items: 2,
27                    loop: carouselOfferItems.length > 2
28                },
29                1024: {
30                    items: 3,
31                    loop: carouselOfferItems.length > 3
32                }
33            }
34        });
35
36        //customize font size medienbanner text        
37        medienbannerFontSize();
38        $(".owl-next , .owl-prev").click(function () {
39            medienbannerFontSize();
40        });
41
42        function medienbannerFontSize() {
43            var window_width = $(window).width();
44            var max_height_of_description = 200;
45            var media_container_description = $(".owl-item.center .media-container__description");
46            var media_container_description_height = $(media_container_description).height();
47
48            if (window_width >= 768) {
49                if (media_container_description_height > max_height_of_description) {
50                    $(media_container_description).addClass("mcd_resize");
51                }
52            }
53            if (window_width <= 687) {
54                //$(media_container_description).addClass("mcd_resize_mobilew");
55            }
56
57
58            //console.log(media_container_description_height);
59        }
60
61        //add class "stoerer" to 100% width banner
62        if ($(".landing-page-blog-item-text-picture").hasClass("blog-item-size-3")) {
63            $(".landing-page-blog-item-text-picture").addClass("stoerer");
64        }
65        // END
66
67        //add dark background at 50% element on hover
68
69        
70        //set link to blog
71        $('.landing-page-blog-link a').attr("href" , ENV.link_root + '/blog');
72        
73        //dynamic height of 100% banner
74        var window_width = $(window).width();
75
76        if (window_width >= 568) {
77            var height = 0;
78            $(".landing-page-blog-item-text-picture.blog-item-size-8.blog-item-headline-position-8.blog-item-color-5 .article-wrapper").each(function () {
79                height = $(this).height();
80                height = height + 400;
81//                console.log(height);
82                $(this).next().find("img").css("max-height", height).css("object-fit" , "cover");
83            });
84        } else {
85            $(".landing-page-blog-item-text-picture.blog-item-size-8.blog-item-headline-position-8.blog-item-color-5 .article-wrapper").each(function () {
86                height = $(this).height();
87                height = height + 400;
88                /* console.log(height); */
89                $(this).next().find("a").css("min-height", height);
90            });
91        }
92        //END    
93
94        function calculateVideoThumbs() {
95            if ($('.active.video-owl-thumb-item').position()) {
96                var videoContainerHeight = $('.video-media-container').height();
97                var videoThumbsContainerHeight = $('.video-owl-thumbs').height();
98                if (videoThumbsContainerHeight > videoContainerHeight) {
99                    var activeVideothumbPosition = $('.active.video-owl-thumb-item').position().top;
100                    if (activeVideothumbPosition < (videoContainerHeight / 2)) {
101                        $('.video-owl-thumbs').position().top = 0;
102                    } else {
103                        activeVideothumbPosition = activeVideothumbPosition - (videoContainerHeight / 2) - 50;
104                        /** failed on homepage if user resizes window */
105                        //$('.video-owl-thumbs').css({'top': '-' + activeVideothumbPosition + 'px'});
106                    }
107
108                }
109            }
110        }
111
112        var carouselVideoContainer = $('#owl-offer-head-slider');
113        function onChangedCallbackVideo(e) {
114            if ($(e.currentTarget).hasClass('owl-video-slider')) {
115//            $('#video-player-container-offer-head-slider').html(''); // reset open/playing videos
116//            carouselVideoContainer.removeClass('video-playing');
117//            carouselVideoContainer.removeClass('video-slider-playing');
118                calculateVideoThumbs();
119            }
120
121
122        }
123
124        function stopAutoplayVideo() {
125            var carouselVideoContainer = $('#owl-offer-head-slider');
126            carouselVideoContainer.trigger('stop.owl.autoplay');
127        }
128
129        function startAutoplayVideo() {
130//      var carouselVideoContainer = $('#owl-offer-head-slider');
131//      carouselVideoContainer.trigger('play.owl.autoplay');
132        }
133
134        function onLoadedLazyCallbackVideo(event) {
135            carouselVideoContainer.trigger('refresh.owl.carousel');
136        }
137
138        function onInitializedCallbackVideo() {
139            stopAutoplayVideo();
140
141            $('.offer_slider_control .offer_btn_prev_video').unbind('click').on('click', function () {
142                var videoSliderContainer = $(this).closest('.video-slider-container');
143                $(videoSliderContainer).find(".owl-nav .owl-prev").trigger('click');
144            });
145
146            $('.offer_slider_control .offer_btn_next_video').unbind('click').on('click', function () {
147                var videoSliderContainer = $(this).closest('.video-slider-container');
148                $(videoSliderContainer).find(".owl-nav .owl-next").trigger('click');
149            });
150        }
151
152        var carouselVideoItems = carouselVideoContainer.find('.item-video');
153        var carouselVideo = carouselVideoContainer.owlCarousel({
154            margin: 10,
155            nav: true,
156            navText: ['<img src="' + ENV.document_root + '/media/images/icon_arrow-prev.svg">', '<img src="' + ENV.document_root + '/media/images/icon_arrow-next.svg">'],
157            items: 1,
158            autoplay: false,
159            dots: false,
160            smartSpeed: 400,
161            loop: carouselVideoItems.length > 1,
162            autoplayTimeout: 1000,
163            autoplayHoverPause: false,
164            autoplaySpeed: 1200,
165            lazyLoad: true,
166            lazyLoadEager: 1,
167            center: true,
168//      onInitialized: initCounterVideo, //When the plugin has initialized.
169//      onTranslated: mcCounterVideo,
170            responsive: {
171                '(min-width: 1440px)': {
172                    items: 4
173                }
174            },
175            // autoWidth:true,
176            // autoHeight: true,
177            // Enable thumbnails
178            thumbs: true,
179            // When only using images in your slide (like the demo) use this option to dynamicly create thumbnails without using the attribute data-thumb.
180            thumbImage: false,
181            // Enable this if you have pre-rendered thumbnails in your html instead of letting this plugin generate them. This is recommended as it will prevent FOUC
182            thumbsPrerendered: true,
183            // Class that will be used on the thumbnail container
184            thumbContainerClass: 'video-owl-thumbs',
185            // Class that will be used on the thumbnail item's
186            thumbItemClass: 'video-owl-thumb-item',
187            onChanged: onChangedCallbackVideo,
188            onLoadedLazy: onLoadedLazyCallbackVideo,
189            onInitialized: onInitializedCallbackVideo
190        });
191
192        // Append counter to home media container
193        var currentSlide;
194        var totalSlides;
195//   function initCounterVideo(e) {
196//      if ($('.home-mediacontainer-article').length > 0) {
197//         $('.owl-nav').append('<button class="video-owl-counter"></button>');
198//      }
199//      currentSlide = e.item.index + 1;
200//      totalSlides = e.item.count;
201//      $('.video-owl-counter').text(currentSlide + '/' + totalSlides);
202//   }
203//   function mcCounterVideo(e) {
204//      currentSlide = e.item.index + 1;
205//      totalSlides = e.item.count;
206//      $('.video-owl-counter').text(currentSlide + '/' + totalSlides);
207//   }
208
209        $('#owl-offer-head-slider .video-arcticle-slider-play-button-link').on('click', function (e) {
210            e.stopPropagation();
211            e.preventDefault();
212            $(this).closest('.owl-item.active.center').find('.video-button').click();
213            return false;
214        });
215
216        $('body').on('click', '.video-owl-thumb-item', function (e) {
217            if (typeof ENV.lastPlayer !== 'undefined' && ENV.lastPlayer !== null) {
218                var videoContainer = $('#video-player-container-offer-head-slider');
219                $(videoContainer).fadeOut(400, function () {
220                    ENV.lastPlayer.dispose();
221                    ENV.lastPlayer = null;
222                    $(videoContainer).html('');
223                });
224            }
225        });
226
227        $('#owl-offer-head-slider .offer-play-btn-wrapper').unbind('click').on('click', function (e) {
228            var idFilm = $(this).attr('data-video-id');
229            var idOffer = $(this).attr('data-offer-id');
230            var imageFilm = $(this).attr('data-video-image');
231            var videoContainer = $('#video-player-container-offer-head-slider');
232            stopAutoplayVideo();
233
234            if (typeof ENV.lastPlayer !== 'undefined' && ENV.lastPlayer !== null) {
235                ENV.lastPlayer.dispose();
236                $(videoContainer).html('');
237            }
238
239            var idProjectProfile = 11;
240            var urlReferrer = window.location.href;
241            var doPlaytimeCheck30 = false;
242            var statId = null;
243            var lastPlaytime = null;
244
245            function registerPlayTime(playtime, playtimeDiff) {
246                $.ajax({
247                    type: "GET",
248                    url: "/player/api/stream_stat?m=update_playtime&offer_id=" + statId + '&playtime=' + playtime + '&playtime_diff=' + playtimeDiff,
249                    data: {},
250                    success: function () {},
251                    dataType: JSON
252                });
253            }
254
255
256            PLAYER.create({
257                config: 'default',
258                id_offer: idOffer,
259                film: {
260                    id: idFilm,
261                    type: 'film6',
262                    poster: "/player/media/images/black_1920_x_1080.png",
263                },
264                video: {
265                    width: 1280,
266                    height: 720,
267                    autoplay: true
268                }
269            }, function (data) {
270                doPlaytimeCheck30 = true;
271                var layer =
272                        '<div class="film-layer__inner">' +
273                        '<a class="film-layer__video-close icon icon-close" href="#"><img src="' + ENV.document_root + '/media/images/icon_close-white.svg"></a>' +
274                        '</div>';
275
276                $(layer).hide().appendTo(videoContainer);
277                $('.film-layer__inner').show();
278                $(videoContainer).fadeIn(400);
279
280                // player ready
281                var vjs = this;
282                ENV.lastPlayer = vjs;
283
284                $(videoContainer).find('.film-layer__video-close').on('click', function (e) {
285                    e.preventDefault();
286                    e.stopPropagation();
287                    $(carouselVideoContainer).removeClass('video-slider-playing');
288                    $(videoContainer).fadeOut(400, function () {
289                        ENV.lastPlayer.dispose();
290                        ENV.lastPlayer = null;
291                        $(videoContainer).html('');
292                    });
293                    return false;
294                });
295
296                $(vjs.contentEl()).appendTo('.film-layer__inner');
297                vjs.one('play', function () {
298                    $(carouselVideoContainer).addClass('video-slider-playing');
299
300                    function playtimeCheck30() {
301                        if (doPlaytimeCheck30) {
302                            var currentTime = vjs.currentTime();
303                            var playtimeDiff = 30;
304                            if (lastPlaytime === null) {
305                                playtimeDiff = currentTime;
306                            } else if (currentTime >= lastPlaytime) {
307                                playtimeDiff = currentTime - lastPlaytime;
308                                if (playtimeDiff > 30) {
309                                    playtimeDiff = 30;
310                                }
311                            }
312
313                            lastPlaytime += playtimeDiff;
314
315                            registerPlayTime(currentTime, playtimeDiff);
316
317                            setTimeout(function () {
318                                playtimeCheck30();
319                            }, 30000);
320                        }
321                    }
322                    setTimeout(function () {
323                        playtimeCheck30();
324                    }, 30000);
325
326                    function registerPlay() {
327                        var body = {
328                            m: 'play_start',
329                            offer_id: idOffer,
330                            project_profile_id: idProjectProfile,
331                            url_referrer: urlReferrer
332                        };
333
334                        $.get("/player/api/stream_stat", body, function (DataStatId) {
335                            statId = DataStatId;
336                        });
337                    }
338
339                    registerPlay();
340                });
341
342                vjs.one('ended', function () {
343                    doPlaytimeCheck30 = false;
344
345                    var currentTime = vjs.currentTime();
346                    var playtimeDiff = 30;
347                    if (lastPlaytime === null) {
348                        playtimeDiff = currentTime;
349                    } else if (currentTime >= lastPlaytime) {
350                        playtimeDiff = currentTime - lastPlaytime;
351                        if (playtimeDiff > 30) {
352                            playtimeDiff = 30;
353                        }
354                    }
355
356                    lastPlaytime += playtimeDiff;
357
358                    registerPlayTime(currentTime, playtimeDiff);
359
360                    function registerEnded() {
361                        $.ajax({
362                            type: "GET",
363                            url: "/player/api/stream_stat?m=play_ended&offer_id=" + statId,
364                            data: data,
365                            success: function () {},
366                            dataType: JSON
367                        });
368                    }
369
370                    registerEnded();
371                });
372
373                vjs.one('error', function () {
374                    doPlaytimeCheck30 = false;
375                });
376
377                function playVideo() {
378                    if ($(videoContainer).find('.vjs-big-play-button').length > 0) {
379                        $(carouselVideoContainer).addClass('video-slider-playing');
380                        $(videoContainer).find('.vjs-big-play-button').click();
381                    } else {
382                        setTimeout(function () {
383                            playVideo();
384                        }, 333);
385                    }
386                }
387                playVideo();
388
389
390
391                // VIDEO QUALITY start 
392                var selectedBitrate = "auto";
393                var startMinBitrate = 480;
394                var lastPosition = 0;
395                var qLevels = [];
396
397                var srcOptions = {
398                    src: data.source,
399                    type: 'application/x-mpegurl'
400                };
401
402                let qualityLevels = vjs.qualityLevels();
403
404                // disable quality levels with less than 720 horizontal lines of resolution when added
405                // to the list.
406                qualityLevels.on('addqualitylevel', function (event) {
407                    let qualityLevel = event.qualityLevel;
408
409                    if (qualityLevel.height >= startMinBitrate) {
410                        qualityLevel.enabled = true;
411                    } else {
412                        qualityLevel.enabled = false;
413                    }
414                });
415
416                // example function that will toggle quality levels between SD and HD, defining and HD
417                // quality as having 720 horizontal lines of resolution or more
418                let changeQuality = (function () {
419                    return function () {
420                        for (var i = 0; i < qualityLevels.length; i++) {
421                            let qualityLevel = qualityLevels[i];
422                            if (qualityLevel.height === selectedBitrate) {
423                                qualityLevel.enabled = true;
424                            } else {
425                                qualityLevel.enabled = false;
426                            }
427                        }
428                    };
429                })();
430
431                let changeToAutoQuality = (function () {
432                    return function () {
433                        for (var i = 0; i < qualityLevels.length; i++) {
434                            let qualityLevel = qualityLevels[i];
435                            qualityLevel.enabled = true;
436                        }
437                    };
438                })();
439
440
441                let currentSelectedQualityLevelIndex = qualityLevels.selectedIndex; // -1 if no level selected
442
443                // Listen to change events for when the player selects a new quality level
444                qualityLevels.on('change', function () {
445                    console.log('Quality Level changed!');
446                    console.log('New level:', qualityLevels[qualityLevels.selectedIndex]);
447                });
448
449
450                vjs.on("loadedmetadata", function () {
451                    var qualityLevels = vjs.qualityLevels();
452                    console.log(qualityLevels);
453                    for (var i = 0; i < qualityLevels.length; i++) {
454                        var quality = qualityLevels[i];
455
456                        if (quality.height != undefined && $.inArray(quality.height, qLevels) === -1) {
457                            console.log(quality.height);
458                            qLevels.push(parseInt(quality.height));
459
460                            if (!$('.quality_ul').length) {
461                                var h = '<div class="quality_setting vjs-menu-button vjs-menu-button-popup vjs-control vjs-button">' +
462                                        '<button class="vjs-menu-button vjs-menu-button-popup vjs-button" type="button" aria-l
462ive="polite" aria-disabled="false" title="Quality" aria-haspopup="true" aria-expanded="false">' +
463                                        '<span aria-hidden="true" class="vjs-icon-cog"></span>' +
464                                        '<span class="vjs-control-text">Quality</span></button>' +
465                                        '<div class="vjs-menu"><ul class="quality_ul vjs-menu-content" role="menu"></ul></div></div>';
466
467                                $(".vjs-fullscreen-control").before(h);
468                            } else {
469                                $('.quality_ul').empty();
470                            }
471
472                            var j = 0;
473
474                        }
475
476                    }
477
478                    
479
480                    qLevels.sort(function (a, b) {
481                        return a - b;
482                    });
483                    qLevels.reverse();
484
485                    // console.log(qLevels);
486
487                    $('.quality_ul').empty();
488                    $.each(qLevels, function (i, val) {
489                        var isTrue = val == selectedBitrate ? true : false;
490                        var selectedClass = isTrue ? 'vjs-selected' : '';
491                        var valName = val >= 720 ? val + "p HD" : val + "p";
492                        $(".quality_ul").append('<li class="vjs-menu-item ' + selectedClass + '" tabindex="' + i + '" role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="' + isTrue + '" bitrate="' + val +
493                                '"><span class="vjs-menu-item-text">' + valName + '</span></li>');
494
495                        j = i;
496                    });
497
498                    $(".quality_ul").append('<li class="vjs-menu-item" tabindex="' + (j + 1) + '" role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="false" bitrate="auto">' +
499                            '<span class="vjs-menu-item-text">Auto</span></li>');
500
501                    vjs.currentTime(lastPosition);
502
503                    $('.quality_setting .vjs-menu-button').unbind('click').on('click', function (e) {
504                        $('.quality_setting .vjs-menu').toggleClass('vjs-menu-show');
505                    });
506                });
507
508
509                $("body").on("click", ".quality_ul li", function () {
510                    $(".quality_ul li").removeClass("vjs-selected");
511                    $(".quality_ul li").prop("aria-checked", "false");
512
513                    $(this).addClass("vjs-selected");
514                    $(this).prop("aria-checked", "true");
515
516                    var nextBitrate = $(this).attr("bitrate");
517
518                    if (nextBitrate !== "auto") {
519                        selectedBitrate = parseInt(nextBitrate);
520                        changeQuality();
521                    } else {
522                        selectedBitrate = "auto";
523                        changeToAutoQuality();
524                    }
525
526                    $('.quality_setting .vjs-menu').removeClass('vjs-menu-show');
527
528                });
529
530                // allow all qualities on auto after starting video
531                setTimeout(function () {
532                    selectedBitrate = "auto";
533                    changeToAutoQuality();
534                }, 3000);
535
536                // VIDEO QUALITY end
537            });
538        });
539
540        // BIND HEADER FORM
541        $('input[name="search"]').unbind('change').on('change', function () {
542            $('#videos-form').submit();
543        });
544
545        $('select[name="tag"]').unbind('change').on('change', function () {
546            $('#videos-form').submit();
547        });
548
549
550
551        /*    var highest = null;
552         var hi = 0;
553         $(".article-content-wrapper").each(function(){
554         var h = $(this).height();
555         if(h > hi){
556         hi = h;
557         highest = $(this);  
558         }    
559         });
560         //highest now contains the div with the highest so lets highlight it
561         highest.css("background-color", "red");
562         */
563
564
565// blog item height to max-height
566        if (window.matchMedia('(min-width: 768px)').matches) {
567            var maxHeight = 0;
568            $(".landing-page-blog-container.landing-page-blog-container-3 .blog-item-size-1 .article-content-wrapper .article-text").each(function () {
569                if ($(this).outerHeight() > maxHeight) {
570                    maxHeight = $(this).outerHeight();
571                }
572            }).height(maxHeight);
573        }
574
575
576
577
578        if (window.matchMedia('(min-width: 768px)').matches) {
579            var maxHeight = 0;
580            $(".landing-page-blog-container .item-height").each(function () {
581                if ($(this).outerHeight() > maxHeight) {
582                    maxHeight = $(this).outerHeight();
583                }
584            }).height(maxHeight);
585        }
586
587
588
589        //touch gradient layer 
590        if (window_width <= 1023) {
591            $('.landing-page-blog-item-text-picture.blog-item-size-2').bind('touchstart', function () {
592                $(this).find(".gradient-layer").addClass("touch-gradient");
593            }).bind('touchend', function () {
594                $(this).find(".gradient-layer").removeClass("touch-gradient");
595            });
596        }
597
598        $(function () {
599            var divCount = $(".landing-page-blog-container-3").children(".blog-item-size-2").length;
600
601            $(".landing-page-blog-container-3 .blog-item-size-2:even").addClass("half-size-left");
602            $(".landing-page-blog-container-3 .blog-item-size-2:odd").addClass("half-size-right");
603        });
604
605
606        // NEW BS CAROUSEL TEST
607
608        if ($('.carousel').length > 0) {
609
610            var os = getOS();
611
612            $('.carousel').carousel({
613                interval: 60000,
614                touch: true,
615                ride: false
616            });
617
618            var players = [];
619            var playerActive = null;
620            $.each($('.carousel .video-js'), function (index, item) {
621                var playerID = item.id;
622                console.log(playerID);
623                if (os !== "iOS" && os !== "iPad OS") {
624                    players[playerID] = videojs("#" + playerID);
625                }
626            });
627
628            function pauseActivePlayer() {
629                if (os !== "iOS" && os !== "iPad OS") {
630                    if ($(".carousel-item.active .video-js")[0]) {
631                        var playerActiveId = $(".carousel-item.active .video-js")[0].id;
632                        playerActive = players[playerActiveId];
633
634                        if (playerActive.paused() === true) {
635                            console.log("PLAYER pause");
636                        } else {
637                            console.log("PLAYER already pausing");
638                            playerActive.pause();
639                        }
640
641                        playerActive.pause();
642                    }
643                }
644            }
645
646            function playActivePlayer(callback) {
647                if (os !== "iOS" && os !== "iPad OS") {
648                    if ($(".carousel-item.active .video-js")[0]) {
649                        var playerActiveId = $(".carousel-item.active .video-js")[0].id;
650                        playerActive = players[playerActiveId];
651
652                        if (typeof callback === "function") {
653                            playerActive.one("play", function () {
654                                callback();
655                            });
656                        }
657
658                        if (playerActive.paused() === true) {
659                            playerActive.play();
660
661                            if (playerActive.paused() === true) {
662                                setTimeout(function () {
663                                    playActivePlayer(callback);
664                                }, 100);
665                            }
666                        } else {
667//                            console.log("PLAYER already playing");
668                        }
669                    }
670                }
671            }
672
673            function getOS() {
674                var userAgent = window.navigator.userAgent,
675                        platform = window.navigator?.userAgentData?.platform || window.navigator.platform,
676                        macosPlatforms = ['Macintosh', 'MacPPC', 'Mac68K'],
677                        macosIntelPlatform = ['MacIntel'],
678                        windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'],
679                        iosPlatforms = ['iPhone', 'iPad', 'iPod'],
680                        os = null;
681
682                if (macosIntelPlatform.indexOf(platform) !== -1) {
683                    if (navigator.maxTouchPoints > 1) {
684                        os = 'iPad OS';
685                    } else {
686                        os = 'Mac OS';
687                    }
688                } else if (macosPlatforms.indexOf(platform) !== -1) {
689                    os = 'Mac OS';
690                } else if (iosPlatforms.indexOf(platform) !== -1) {
691                    os = 'iOS';
692                } else if (windowsPlatforms.indexOf(platform) !== -1) {
693                    os = 'Windows';
694                } else if (/Android/.test(userAgent)) {
695                    os = 'Android';
696                } else if (/Linux/.test(platform)) {
697                    os = 'Linux';
698                }
699
700                return os;
701            }
702
703            function carouselFontSize() {
704                var window_width = $(window).width();
705                var max_height_of_description = 200;
706                var media_container_description = $(".carousel-item.active .media-container__description");
707                var media_container_description_height = $(media_container_description).height();
708
709                if (window_width >= 768) {
710                    if (media_container_description_height > max_height_of_description) {
711                        $(media_container_description).addClass("mcd_resize");
712                    }
713                }
714                if (window_width <= 687) {
715                    //$(media_container_description).addClass("mcd_resize_mobilew");
716                }
717
718
719                //console.log(media_container_description_height);
720            }
721
722            $('.carousel').on('slide.bs.carousel', function (data) {
723                pauseActivePlayer();
724            });
725
726            $('.carousel').on('slid.bs.carousel', function (data) {
727                carouselFontSize();
728                if ($('.carousel-item.active:hover').length != 0 || (os === "Android" || os === "iOS" == os === "iPad OS")) {
729                    playActivePlayer();
730                }
731            });
732
733            $("body").on("mouseenter", ".carousel-item.active", function () {
734                playActivePlayer();
735            });
736
737            $("body").on("mouseleave", ".carousel-item.active", function () {
738                pauseActivePlayer();
739            });
740
741            carouselFontSize();
742
743            if (os !== "Android" && os !== "iOS" && os !== "iPad OS") {
744                pauseActivePlayer();
745                playActivePlayer(function () {
746                    setTimeout(function () {
747                        if (os !== "Android" && os !== "iOS" && os !== "iPad OS") {
748                            pauseActivePlayer();
749                        }
750                    }, 0);
751                });
752            } 
753            
754        }
755
756    }
757
758});
759
760$(document).ready(function() {
761    function setImageHeightToTextHeight() {
762        $('.blog-item-size-8.blog-item-headline-position-8').each(function() {
763            var textHeight = $(this).find('.article-text').outerHeight();
764            $(this).find('.image-wrapper img').height(textHeight + 240) ;
765        });
766    }
767
768    setImageHeightToTextHeight();
769
770    $(window).resize(function() {
771        setImageHeightToTextHeight();
772    });
773
774
775
776});
777

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.