PageSourceSearch

https://www.bcd.es/wp-content/themes/sevenapp/js/functions.js?ver=20150715

js bcd.es collected 2026-10-02 04:02:46 UTC 54,162 bytes, 1,561 lines download raw bytes

1var lastScrollTop = 0;
2var myWidth = 0;
3var myHeight = 0;
4var timerID = 0;
5var colorSite = readCookie("color_bcd");
6if (!colorSite) {
7  colorSite = "rgb(0, 0, 0)";
8}
9var rellax;
10var rellax2;
11
12//(function($) {
13var tag = document.createElement("script");
14
15tag.src = "https://www.youtube.com/iframe_api";
16var firstScriptTag = document.getElementsByTagName("script")[0];
17firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
18
19var players = new Array();
20
21function onYouTubeIframeAPIReady() {
22  $(".wide-container li.video-slide iframe.youtube-player").each(
23    function (i, obj) {
24      var idIframe = $(this).attr("id");
25      var curplayer = new YT.Player(idIframe, {});
26      players[i] = curplayer;
27    },
28  );
29}
30//})(jQuery);
31
32function createCookie(name, value, days) {
33  if (days) {
34    var date = new Date();
35    date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
36    var expires = "; expires=" + date.toGMTString();
37  } else var expires = "";
38  document.cookie = name + "=" + value + expires + "; path=/";
39}
40
41function readCookie(name) {
42  var nameEQ = name + "=";
43  var ca = document.cookie.split(";");
44  for (var i = 0; i < ca.length; i++) {
45    var c = ca[i];
46    while (c.charAt(0) == " ") c = c.substring(1, c.length);
47    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
48  }
49  return null;
50}
51
52function eraseCookie(name) {
53  createCookie(name, "", -1);
54}
55
56function getAbsolutePath() {
57  var loc = window.location;
58  var pathName = loc.pathname.substring(0, loc.pathname.lastIndexOf("/") + 1);
59  return loc.href.substring(
60    0,
61    loc.href.length -
62      ((loc.pathname + loc.search + loc.hash).length - pathName.length),
63  );
64}
65
66function Medidas() {
67  if (typeof window.innerWidth == "number") {
68    //Non-IE
69    myWidth = window.innerWidth;
70    myHeight = window.innerHeight;
71  } else if (document.documentElement) {
72    if (
73      document.documentElement.clientWidth ||
74      document.documentElement.clientHeight
75    ) {
76      IE = true;
77      //IE 6+ in 'standards compliant mode'
78      myWidth = document.documentElement.clientWidth;
79      myHeight = document.documentElement.clientHeight;
80    }
81  } else if (document.body) {
82    if (document.body.clientWidth || document.body.clientHeight) {
83      //IE 4 compatible
84      myWidth = document.body.clientWidth;
85      myHeight = document.body.clientHeight;
86    }
87  }
88}
89
90function findSize(el, size) {
91  /* size must be 'width' or ' height' */
92  return window.getComputedStyle
93    ? getComputedStyle(el, null).getPropertyValue(size)
94    : el["client" + size.substr(0, 1).toUpperCase() + size.substr(1)] + "px";
95}
96
97function animateCSS(element, animationName, callback) {
98  const node = document.querySelector(element);
99  node.classList.add("animated", animationName);
100
101  function handleAnimationEnd() {
102    node.classList.remove("animated", animationName);
103    node.removeEventListener("animationend", handleAnimationEnd);
104
105    if (typeof callback === "function") callback();
106  }
107
108  node.addEventListener("animationend", handleAnimationEnd);
109}
110
111function inView(element, fullHeightInView) {
112  var $element = $(element);
113  var $window = $(window);
114  var docViewTop = $window.scrollTop();
115  var docViewBottom = docViewTop + $window.height();
116  var elemTop = $element.offset().top;
117  var elemBottom;
118
119  if (fullHeightInView) {
120    elemBottom = elemTop + $element.height();
121  } else {
122    elemBottom = elemTop;
123  }
124
125  return (
126    elemBottom >= docViewTop &&
127    elemTop <= docViewBottom &&
128    elemBottom <= docViewBottom &&
129    elemTop >= docViewTop
130  );
131}
132
133function getViewportOffset(element) {
134  var $element = $(element),
135    $window = $(window);
136
137  var scrollLeft = $window.scrollLeft(),
138    scrollTop = $window.scrollTop(),
139    offset = $element.offset();
140
141  return {
142    left: offset.left - scrollLeft,
143    top: offset.top - scrollTop,
144  };
145}
146
147function changeColorSite(colorRgb) {
148  /*if(colorRgb === 'rgb(0, 0, 0)'){
149		if($('body').hasClass('cluster')){
150			$('body, .bg-cluster').css('background-color', colorRgb);
151			$('.site-footer .info-footer').css('background-color', colorRgb);
152			//$('body.cluster .site-header .right-menu-icons .item-contact .info-contact:after, body.cluster .site-header .right-menu-icons .item-search .info-search:after').css('border-bottom', '9px solid #000');
153			//$('.icon-color').css('background-color', 'rgb(255, 255, 255)');
154			//$('.site-footer .info-footer').css('color', 'rgb(255, 255, 255)');
155			//$('.site-footer .info-footer .icon-color').css('background-color', 'rgb(255, 255, 255)');
156		}else{
157			$('body').css('color', 'rgb(0, 0, 0)');
158			$('.site-footer .info-footer').css('background-color', 'rgb(0, 0, 0)');
159			$('.site-header .icon-color, .headline-page .icon-color, .site-content .icon-color, .sponsors-footer .icon-color').css('background-color', 'rgb(0, 0, 0)');
160			//$('.site-footer .info-footer').css('color', 'rgb(255, 255, 255)');
161			//$('.site-footer .info-footer .icon-color').css('background-color', 'rgb(255, 255, 255)');
162		}
163	}else{
164		if($('body').hasClass('cluster')){
165			$('body, .bg-cluster').css('background-color', colorRgb);
166			$('.site-footer .info-footer').css('background-color', colorRgb);
167			//$('body.cluster .site-header .right-menu-icons .item-contact .info-contact:after, body.cluster .site-header .right-menu-icons .item-search .info-search:after').css('border-bottom', '9px solid '+colorRgb);
168		}else{
169			$('body').css('color', colorRgb);
170			$('.site-header .icon-color, .headline-page .icon-color, .site-content .icon-color, .sponsors-footer .icon-color').css('background-color', colorRgb);
171			$('.site-footer .info-footer').css('background-color', colorRgb);
172			//$('.site-footer .info-footer .icon-color').css('background-color', colorRgb);
173		}
174	}*/
175  if ($("body").hasClass("cluster")) {
176    $("body, .bg-cluster").css("background-color", colorRgb);
177    $(".site-footer .info-footer").css("background-color", colorRgb);
178    $(
179      ".languages-info-footer .content-icon-info-footer li, .button-cookie",
180    ).css("color", colorRgb);
181    $(
182      ".share-info-footer .content-icon-info-footer a, .hover-item-change-color",
183    ).css("background-color", colorRgb);
184    $(
185      ".site-header a, .site-content a, .list-header-sponsors a, .headline-page a",
186    ).css("color", "#ffffff");
187    $(".mc-primary-nav .menu-contextual").css("background-color", colorRgb);
188  } else {
189    $(
190      "body, .site-footer .languages-info-footer .content-icon-info-footer li",
191    ).css("color", colorRgb);
192    $(
193      ".overlay-form-newsletter.icon-color, .site-header .icon-color, .headline-page .icon-color, .site-content .icon-color, .sponsors-footer .icon-color, .site-footer .share-info-footer .content-icon-info-footer a",
194    ).css("background-color", colorRgb);
195    $(".site-footer .info-footer, .button-cookie").css(
196      "background-color",
197      colorRgb,
198    );
199    $(
200      ".site-header a, .site-content a, .list-header-sponsors a, .headline-page a",
201    ).css("color", colorRgb);
202    $(".mc-primary-nav .menu-contextual").css("background-color", colorRgb);
203  }
204  colorSite = colorRgb;
205  createCookie("color_bcd", colorRgb, 7);
206
207  var srcIframe = "formulario";
208  if (colorSite == "#000000") {
209    //black
210    srcIframe = "formulario";
211  } else if (colorSite == "#5bca41") {
212    //green
213    srcIframe = "formulariov";
214  } else if (colorSite == "#0000ff") {
215    //blue
216    srcIframe = "formularioa";
217  } else if (colorSite == "#ff0000") {
218    //red
219    srcIframe = "formularior";
220  }
221  $(".form-join-us iframe").attr(
222    "src",
223    "https://bcd.timtul.es/" + srcIframe + "/?lang=" + lang_post,
224  );
225
226  var srcIframeSubs = "subs";
227  if (colorSite == "#000000") {
228    //black
229    srcIframeSubs = "subs";
230  } else if (colorSite == "#5bca41") {
231    //green
232    srcIframeSubs = "subs-verde";
233  } else if (colorSite == "#0000ff") {
234    //blue
235    srcIframeSubs = "subs-azul";
236  } else if (colorSite == "#ff0000") {
237    //red
238    srcIframeSubs = "subs-rojo";
239  }
240  $(".home iframe.newsletter").attr(
241    "src",
242    "https://bcd.timtul.es/" + srcIframeSubs + "/?lang=" + lang_post,
243  );
244  $(".form-newsletter .form iframe").attr(
245    "src",
246    "https://bcd.timtul.es/" + srcIframeSubs + "/?lang=" + lang_post,
247  );
248  $("iframe.newsletter").attr(
249    "src",
250    "https://bcd.timtul.es/" + srcIframeSubs + "/?lang=" + lang_post,
251  );
252}
253
254(function ($) {
255  $(document).ready(function () {
256    resizeContent();
257    /*Medidas();*/
258    var winwidth = parseInt($(window).width());
259    var winheight = parseInt($(window).height());
260    var content = $(".site-content");
261    var headerHeight = parseInt($(".site-header").outerHeight(true));
262
263    if (winwidth >= 1440) {
264      headerHeight = 84;
265    } else if (winwidth >= 768) {
266      headerHeight = 84;
267    }
268
269    var contentHeight = myHeight - headerHeight;
270
271    $(".button-menu-item-burguer").on("click", function () {
272      $(".site-header").addClass("notransition");
273      $(".mc-primary-nav").children(".menu-contextual").addClass("is-menu");
274      $(".mc-primary-nav")
275        .children(".menu-contextual")
276        .toggleClass("is-visible");
277      var $header = $(".site-header");
278      $header.toggleClass("menu-open");
279    });
280
281    $(
282      ".mc-primary-nav .menu-contextual .column-menu .title-menu ul > li",
283    ).hover(
284      function () {
285        $(".mc-primary-nav .menu-contextual .column-menu").addClass(
286          "active-menu",
287        );
288      },
289      function () {
290        $(".mc-primary-nav .menu-contextual .column-menu").removeClass(
291          "active-menu",
292        );
293      },
294    );
295
296    $(".info-footer-mobile .icons-info-footer > ul > li").on(
297      "click",
298      function () {
299        var is_active = 0;
300        if ($(this).hasClass("active")) {
301          is_active = 1;
302        }
303        $(".info-footer-mobile .icons-info-footer > ul > li").each(
304          function (i, obj) {
305            $(this).removeClass("active");
306          },
307        );
308        if (is_active == 1) {
309          $(this).removeClass("active");
310        } else {
311          $(this).addClass("active");
312        }
313      },
314    );
315
316    /*$('.content-page .sidebar-column .section-sidebar ul li a.link-newsletter, a.link-newsletter').click(function(){
317		$('.form-newsletter').removeClass('hidden');
318		$('.overlay-form-newsletter').removeClass('hidden');
319		$('.form-newsletter').fadeIn('slow');
320		$('.overlay-form-newsletter').fadeIn('slow');
321	});*/
322    //$('.overlay-form-newsletter').click(function(){
323    /*$('.form-newsletter').fadeOut( "slow", function() {
324	    $('.form-newsletter').addClass('hidden');
325		});
326		$('.overlay-form-newsletter').fadeOut( "slow", function() {
327	    $('.overlay-form-newsletter').addClass('hidden');
328		});*/
329    //$('.form-newsletter').addClass('hidden');
330    //$('.overlay-form-newsletter').addClass('hidden');
331    //});
332
333    $(".wide-container li .button-video-sound").click(function () {
334      var iframePosition = $(this).attr("data-video");
335      $(this).toggleClass("disabled");
336      //if(Modernizr.video) {
337      if ($(this).hasClass("disabled")) {
338        //$(".wide-container li iframe").prop('muted', true);
339        //$(".wide-container li iframe").mute();
340        //$(".wide-container li iframe")[0].src += "&mute=1";
341        players[iframePosition].mute();
342        //document.getElementById("ytplayer").volume = 0;
343      } else {
344        //$(".wide-container li iframe").prop('muted', false);
345        //$(".wide-container li iframe").unMute();
346        //$(".wide-container li iframe")[0].src += "&mute=0";
347        players[iframePosition].unMute();
348        //document.getElementById("ytplayer").volume = 0.5;
349      }
350      //}
351    });
352
353    $(
354      ".list-registration-plans .item-plan .content-item-plan .button-form-join-us a",
355    ).click(function () {
356      $(".form-join-us").fadeIn("slow");
357      var headerHeight = parseInt($(".site-header").outerHeight(true));
358      $("body,html")
359        .stop(true, true)
360        .animate(
361          {
362            scrollTop: $(".form-join-us").offset().top - headerHeight * 2,
363          },
364          1000,
365        );
366    });
367
368    $(".cluster .headline-page .item-filter").click(function () {
369      /*var heightTitle = parseInt($('.cluster .headline-page .title-members').outerHeight(true));
370		var heightFilter = parseInt($('.cluster .filter-list-disciplines .list-disciplines').outerHeight(true));
371		var heightHeadline = heightTitle + heightFilter + 12.5;
372		$('.cluster .headline-page').css('height', heightHeadline);*/
373      $("body.cluster .headline-page").toggleClass("active-disciplines");
374    });
375
376    $(
377      ".cluster .filter-list-disciplines .list-disciplines li.item-discipline",
378    ).click(function () {
379      $(this).toggleClass("selected");
380    });
381
382    $(
383      ".cluster .filter-list-disciplines .list-disciplines li.button-discipline",
384    ).click(function () {
385      $("body.cluster .headline-page").removeClass("active-disciplines");
386      var filter = "";
387      $(
388        ".cluster .filter-list-disciplines .list-disciplines li.item-discipline.selected",
389      ).each(function (i, obj) {
390        if (i == 0) {
391          filter = filter + $(this).attr("data-id");
392        } else {
393          filter = filter + "-" + $(this).attr("data-id");
394        }
395      });
396      if (filter != "") {
397        var url = getAbsolutePath() + "?filter=" + filter;
398        location.href = url;
399      } else {
400        var url = getAbsolutePath();
401        location.href = url;
402      }
403    });
404
405    /*$('body.cluster .list-partners.list-az .item-partner').mouseover(function(){
406		var icon_width = 17+24;
407		var count_icons = $(this).find(".icons-partner").lenght;
408		var move = count_icons * icon_width;
409		$(this).find(".title-partner").css('padding-left', move+'px');
410		$(this).find(".read-more-partner").css('width', move);
411	});*/
412    $("body.cluster .list-partners.list-az .item-partner")
413      .mouseenter(function () {
414        var icon_width = 17 + 24;
415        var count_icons = $(this).find(".icons-partner a").length;
416        var move = count_icons * icon_width;
417        $(this)
418          .find(".title-partner")
419          .css("padding-left", move + "px");
420        $(this).find(".read-more-partner").css("width", move);
421      })
422      .mouseleave(function () {
423        $(this)
424          .find(".title-partner")
425          .css("padding-left", 0 + "px");
426        $(this).find(".read-more-partner").css("width", 0);
427      });
428
429    $(".col-color .item-color").click(function () {
430      var color = $(this).attr("data-color");
431      changeColorSite(color);
432      /*var color = $('.site-footer .info-footer').css('background-color');
433		if(color == "rgb(0, 0, 0)"){
434			changeColorSite('rgb(91, 202, 65)');
435		}else if(color == "rgb(91, 202, 65)"){
436			changeColorSite('rgb(0, 0, 255)');
437		}else if(color == "rgb(0, 0, 255)"){
438			changeColorSite('rgb(255, 0, 0)');
439		}else{
440			changeColorSite('rgb(0, 0, 0)');
441		}*/
442    });
443
444    /*var colorSite = readCookie('color_bcd');
445	if(!colorSite){
446		colorSite = 'rgb(0, 0, 0)';
447	}*/
448    changeColorSite(colorSite);
449
450    $("body.cluster .list-partners.list-images .item-partner").hover(
451      function () {
452        $(this).find(".info-partner").css("background-color", colorSite);
453      },
454      function () {
455        $(this).find(".info-partner").css("background-color", "transparent");
456      },
457    );
458
459    $(".list-participants .item-participant").hover(
460      function () {
461        $(this).find(".info-participant").css("background-color", colorSite);
462      },
463      function () {
464        $(this)
465          .find(".info-participant")
466          .css("background-color", "transparent");
467      },
468    );
469
470    /*$('.single-post .related-single-post').click(function(){
471		$('.single-post').addClass('load-related');
472		var nextPost = $('.single-post .related-single-post').attr('data-page');
473		$('body,html').stop(true,true).animate({
474			scrollTop: $('.site-content').offset().top - 58
475		},700, 'ease-in-out', function() {
476			location.href = nextPost;
477		});
478		return false;
479	});*/
480
481    // Copy url share
482    var client = new ZeroClipboard(document.getElementById("copy-button"));
483    client.on("ready", function (readyEvent) {
484      // alert( "ZeroClipboard SWF is ready!" );
485      client.on("aftercopy", function (event) {
486        // `this` === `client`
487        // `event.target` === the element that was clicked
488        //event.target.style.display = "none";
489        //alert("Copied text to clipboard: " + event.data["text/plain"] );
490      });
491    });
492
493    $(".program .wide-container li .caption .read-more-post").on(
494      "click",
495      function (e) {
496        var headerHeight = parseInt($(".site-header").outerHeight(true));
497        $("body,html")
498          .stop(true, true)
499          .animate(
500            {
501              scrollTop:
502                $(".program .content-page").offset().top - headerHeight * 2,
503            },
504            1000,
505          );
506      },
507    );
508
509    $(
510      ".list-registration-plans .item-plan .content-item-plan .advantages-plan .item-advantages-plan .title-advantage-plan",
511    ).on("click", function (e) {
512      $(
513        ".list-registration-plans .item-plan .content-item-plan .advantages-plan .item-advantages-plan",
514      ).removeClass("active");
515      $(this).parent().addClass("active");
516    });
517    $(
518      ".list-registration-plans .item-plan .content-item-plan .advantages-plan .item-advantages-plan .description-advantage-plan .close",
519    ).on("click", function (e) {
520      $(
521        ".list-registration-plans .item-plan .content-item-plan .advantages-plan .item-advantages-plan",
522      ).removeClass("active");
523      //$(this).parent().removeClass('active');
524    });
525    $(document).on("click", function (e) {
526      var container = $(".list-registration-plans");
527      if (
528        !container.is(e.target) &&
529        $(e.target).closest(container).length == 0
530      ) {
531        $(
532          ".list-registration-plans .item-plan .content-item-plan .advantages-plan .item-advantages-plan",
533        ).removeClass("active");
534      } else {
535      }
536    });
537
538    if (slide == 1) {
539      $("#slides").superslides({
540        inherit_width_from: ".wide-container",
541        inherit_height_from: ".wide-container",
542        play: 5000,
543        /*play: 0,*/
544        animation: "fade",
545        animation_speed: "normal",
546        pagination: false,
547        hashchange: false,
548      });
549
550      var id_slides = document.getElementById("slides");
551      /*$('#slides').swipe( {
552			swipeLeft:function() {
553				$('#slides').data('superslides').animate('next');
554			},
555			swipeRight:function() {
556				$(this).superslides('animate', 'prev');
557			}
558		});*/
559
560      $("#slides li.video-slide").each(function (i, obj) {
561        var slideVideoNo = $(this).attr("data-slide");
562        if (slideVideoNo == 0) {
563          $("#slides").superslides("stop");
564        }
565      });
566
567      $("#slides").on("animated.slides", function () {
568        var slideNo = $("#slides").superslides("current");
569        var slideSize = $("#slides").superslides("size");
570
571        $("#slides li.video-slide .button-video-sound").each(function (i, obj) {
572          $(this).addClass("disabled");
573        });
574
575        $("#slides li.video-slide").each(function (i, obj) {
576          var slideVideoNo = $(this).attr("data-slide");
577          if (slideNo == slideVideoNo) {
578            var me = this;
579            $("#slides").superslides("stop");
580            $("iframe", this)[0].src += "&autoplay=1";
581          } else {
582            $("iframe", this)[0].contentWindow.postMessage(
583              '{"event":"command","func":"' + "stopVideo" + '","args":""}',
584              "*",
585            );
586          }
587        });
588      });
589
590      /*$('.gallery .slides-scroll-down').on('click', function(){
591					$('body,html').stop(true,true).animate({
592          		scrollTop: $('.div-scroll').offset().top + 36
593						},1000);
594					return false;
595		});
596		$('.no-gallery .slides-scroll-down').on('click', function(){
597					headerGeneralHeight = parseInt($('.header-general').outerHeight(true));
598					$('body,html').stop(true,true).animate({
599          		scrollTop: $('.div-scroll').offset().top - headerGeneralHeight
600						},1000);
601					return false;
602		});*/
603    }
604
605    if (slide_footer == 1) {
606      $(".sponsors-footer-slide #slides-sponsors-slide")
607        .superslides({
608          inherit_width_from: ".sponsors-footer-slide",
609          inherit_height_from: ".sponsors-footer-slide",
610          play: 4000,
611          animation: "fade",
612          animation_speed: 500,
613          pagination: false,
614          hashchange: false,
615        })
616        .on("animating.slides", function () {
617          $(".sponsors-footer.sponsors-footer-slide .header-sponsors").addClass(
618            "animated",
619          );
620        })
621        .on("animated.slides", function () {
622          var current_index = $(this).superslides("current");
623          $(".sponsors-footer-slide .slides-pagination a").removeClass(
624            "current",
625          );
626          $(".sponsors-footer-slide .slides-pagination a")
627            .eq(current_index)
628            .addClass("current");
629          $(".sponsors-footer-slide .current-slide").html(current_index + 1);
630          $(
631            ".sponsors-footer.sponsors-footer-slide .header-sponsors",
632          ).removeClass("animated");
633        });
634
635      $(".sponsors-footer-slide .slides-pagination a").on(
636        "click",
637        function (e) {
638          var PosicionEnlace = $(this).attr("href").indexOf("#");
639          var SlideSeleccionado = $(this).attr("href");
640          if (PosicionEnlace == 0) {
641            SlideSeleccionado = SlideSeleccionado.substring(1);
642          }
643          SlideSeleccionado = SlideSeleccionado - 1;
644          var CurrentSlide = $("#slides-sponsors-slide").superslides("current");
645          if (CurrentSlide == SlideSeleccionado) {
646          } else {
647            $("#slides-sponsors-slide").superslides(
648              "animate",
649              SlideSeleccionado,
650            );
651          }
652        },
653      );
654      // Start 50 years
655      /*$('.sponsors-footer-50years #slides-sponsors-50years').superslides({
656			inherit_width_from: '.sponsors-footer-50years',
657			inherit_height_from: '.sponsors-footer-50years',
658			play: 4000,
659			animation: 'fade',
660			animation_speed: 500,
661			pagination: false,
662			hashchange: false
663		}).on('animating.slides', function() {
664      $('.sponsors-footer.sponsors-footer-50years .header-sponsors').addClass('animated');
665    }).on('animated.slides', function() {
666      var current_index = $(this).superslides('current');
667      $('.sponsors-footer-50years .slides-pagination a').removeClass('current');
668      $('.sponsors-footer-50years .slides-pagination a').eq(current_index).addClass('current');
669      $('.sponsors-footer-50years .current-slide').html(current_index+1);
670      $('.sponsors-footer.sponsors-footer-50years .header-sponsors').removeClass('animated');
671    });
672
673    $('.sponsors-footer-50years .slides-pagination a').on('click', function(e) {
674      var PosicionEnlace = $(this).attr('href').indexOf('#');
675      var SlideSeleccionado = $(this).attr('href');
676	    if(PosicionEnlace == 0){
677        SlideSeleccionado = SlideSeleccionado.substring(1);
678      }
679      SlideSeleccionado = SlideSeleccionado - 1;
680      var CurrentSlide = $('#slides-sponsors-50years').superslides('current');
681      if(CurrentSlide == SlideSeleccionado){
682      }else{
683        $('#slides-sponsors-50years').superslides('animate', SlideSeleccionado)
684      }
685    });*/
686      // End 50 years
687    }
688
689    $(
690      ".content-page .main-column .dropdowns-main .list-dropdowns .item-dropdown .title-item-dropdown",
691    ).on("click", function () {
692      var is_active = 0;
693      if ($(this).parent().hasClass("active")) {
694        is_active = 1;
695      }
696      /*var widthFiles = parseInt($('.content-page .main-column .dropdowns-main .list-dropdowns').outerWidth(true));
697		widthFiles = ((widthFiles-32)/3)+16;
698		$('.files-content .item-files').css('height', widthFiles);*/
699
700      $(
701        ".content-page .main-column .dropdowns-main .list-dropdowns .item-dropdown",
702      ).each(function (i, obj) {
703        $(this).removeClass("active");
704        $(this)
705          .find(".content-item-dropdown")
706          .slideUp("slow", function () {
707            var widthSidebar = parseInt(
708              $(".content-page .sidebar-column").outerWidth(false),
709            );
710            $(".content-page .sidebar-column .content-sidebar-column").css(
711              "width",
712              widthSidebar,
713            );
714            var heightSidebar = parseInt(
715              $(".content-page .main-column").outerHeight(true),
716            );
717            $(".content-page .sidebar-column").css("height", heightSidebar);
718          });
719      });
720      if (is_active == 1) {
721        $(this).parent().removeClass("active");
722        $(this)
723          .parent()
724          .find(".content-item-dropdown")
725          .slideUp("slow", function () {
726            var widthSidebar = parseInt(
727              $(".content-page .sidebar-column").outerWidth(false),
728            );
729            $(".content-page .sidebar-column .content-sidebar-column").css(
730              "width",
731              widthSidebar,
732            );
733            var heightSidebar = parseInt(
734              $(".content-page .main-column").outerHeight(true),
735            );
736            $(".content-page .sidebar-column").css("height", heightSidebar);
737          });
738      } else {
739        $(this).parent().addClass("active");
740        $(this)
741          .parent()
742          .find(".content-item-dropdown")
743          .slideDown("slow", function () {
744            var widthSidebar = parseInt(
745              $(".content-page .sidebar-column").outerWidth(false),
746            );
747            $(".content-page .sidebar-column .content-sidebar-column").css(
748              "width",
749              widthSidebar,
750            );
751            var heightSidebar = parseInt(
752              $(".content-page .main-column").outerHeight(true),
753            );
754            $(".content-page .sidebar-column").css("height", heightSidebar);
755          });
756      }
757
758      var headerHeight = parseInt($(".site-header").outerHeight(true));
759      $("body,html")
760        .stop(true, true)
761        .animate(
762          {
763            scrollTop:
764              $(".content-page .main-column .dropdowns-main").offset().top -
765              headerHeight * 2,
766          },
767          1000,
768        );
769
770      /*if(winwidth >= 768){
771			var widthFiles = parseInt($('.content-page .main-column .dropdowns-main .list-dropdowns').outerWidth(true));
772			widthFiles = ((widthFiles-32)/3)+16;
773			$('.files-content .item-files').css('height', widthFiles);
774		}else{
775			var widthFiles = parseInt($('.content-page .main-column .dropdowns-main .list-dropdowns').outerWidth(true));
776			widthFiles = ((widthFiles-20)/2)+10;
777			$('.files-content .item-files').css('height', widthFiles);
778		}*/
779      resizeContent();
780    });
781
782    $(
783      ".content-page .sidebar-column .section-sidebar ul li.items-sidebar.type-text",
784    ).on("click", function () {
785      //$('.content-page .main-column .info-main').fadeOut(1400);
786      $(".content-page .main-column .info-main").addClass("fade-out");
787      $(
788        ".content-page .sidebar-column .section-sidebar ul li.items-sidebar",
789      ).removeClass("active");
790      var number_item = $(this).attr("data_item");
791      var post_id = $("article").attr("id");
792      post_id = post_id.replace("post-", "");
793      //var lang_post = 'es';
794      var ajaxurl = "/wp-admin/admin-ajax.php";
795      $.get(
796        ajaxurl,
797        {
798          action: "get_content_sidebar",
799          item: number_item,
800          post: post_id,
801          lang: lang_post,
802        },
803        function (msg) {
804          var $newContent = $(msg.response);
805          $(".content-page .main-column .info-main").html($newContent);
806          //$('.content-page .main-column .info-main').delay(1400).fadeIn(1400);
807          $(
808            ".content-page .sidebar-column .section-sidebar ul li.items-sidebar.item-" +
809              number_item,
810          ).addClass("active");
811          $(".content-page .main-column .info-main").removeClass("fade-out");
812
813          rellax2 = new Rellax(".overlapping-images li", {
814            speed: 1,
815            center: false,
816            wrapper: null,
817            round: true,
818            vertical: true,
819            horizontal: false,
820          });
821
822          $("body,html")
823            .stop(true, true)
824            .animate(
825              {
826                scrollTop: $("#page").offset().top,
827              },
828              1000,
829            );
830
831          resizeContent();
832        },
833        "json",
834      );
835    });
836
837    $(
838      ".content-page .sidebar-column .section-sidebar ul li.items-sidebar.type-edition",
839    ).on("click", function () {
840      //$('.content-page .main-column .info-main').fadeOut(1400);
841      $(".content-page .main-column .info-main").addClass("fade-out");
842      $(
843        ".content-page .sidebar-column .section-sidebar ul li.items-sidebar",
844      ).removeClass("active");
845      var number_item = $(this).attr("data_item");
846      var post_id = $("article").attr("id");
847      post_id = post_id.replace("post-", "");
848      //var lang_post = 'es';
849      var ajaxurl = "/wp-admin/admin-ajax.php";
850      $.get(
851        ajaxurl,
852        {
853          action: "get_content_edition",
854          item: number_item,
855          post: post_id,
856          lang: lang_post,
857        },
858        function (msg) {
859          var $newContent = $(msg.response);
860          $(".content-page .main-column .info-main").html($newContent);
861          //$('.content-page .main-column .info-main').delay(1400).fadeIn(1400);
862          $(
863            ".content-page .sidebar-column .section-sidebar ul li.items-sidebar.item-" +
864              number_item,
865          ).addClass("active");
866          $(".content-page .main-column .info-main").removeClass("fade-out");
867          resizeContent();
868
869          $("body,html")
870            .stop(true, true)
871            .animate(
872              {
873                scrollTop: $("#page").offset().top,
874              },
875              1000,
876            );
877
878          $(".list-participants .item-participant").hover(
879            function () {
880              $(this)
881                .find(".info-participant")
882                .css("background-color", colorSite);
883            },
884            function () {
885              $(this)
886                .find(".info-participant")
887                .css("background-color", "transparent");
888            },
889          );
890        },
891        "json",
892      );
893    });
894
895    /*$('.cluster .more-items-cluster').on('click', function(){
896		var ajaxurl2 = "/wp-admin/admin-ajax.php";
897		$.get( ajaxurl2, {
898			action: 'get_more_items_cluster',
899			items: partners,
900			lang: lang_post
901		}, function(msg){
902			var $newContent = msg.response;
903			partners = msg.partners;
904
905			$('.cluster .list-partners').append($newContent);
906			resizeContent();
907			if($newContent == ''){
908				$('.cluster .more-items-cluster').hide('slow');
909			}
910		}, 'json');
911	});*/
912
913    // Takes the gutter width from the bottom margin of .post
914    var gutter = "20%";
915    var container = $(".grid-featured-posts");
916
917    // Creates an instance of Masonry on #posts
918    container.imagesLoaded(function () {
919      container.isotope({
920        itemSelector: ".item-post",
921        stagger: 0,
922        animationEngine: "css",
923        transitionDuration: 0,
924        layoutMode: "packery",
925        packery: {
926          isAnimated: false,
927          /*gutter: '.gutter-sizer'*/
928        },
929        percentPosition: false,
930        resize: false,
931      });
932    });
933
934    /*container.on( 'arrangeComplete',
935		  function( event, filteredItems ) {
936
937			}
938		);
939		container.on( 'layoutComplete',
940		  function( event, laidOutItems ) {
941
942		  }
943		);*/
944    //container.isotope();
945
946    $(".featured-posts-home .item-post")
947      .addClass("hidden-element")
948      .waypoint({
949        handler: function () {
950          $(this.element).addClass("visible-element animated fadeIn");
951        },
952        offset: "70%",
953      });
954    $(".featured-posts-home .item-page").waypoint({
955      handler: function () {
956        //$(this.element).addClass("visible-element animated fadeIn");
957
958        $(this.element)
959          .find(".title-post")
960          .addClass("animate__animated animate__fadeInUp")
961          .css("animation-delay", ".3s");
962        $(this.element)
963          .find(".image-post")
964          .addClass("animate__animated animate__fadeInUp")
965          .css("animation-delay", ".5s");
966        $(this.element)
967          .find(".description-post")
968          .addClass("animate__animated animate__fadeInUp")
969          .css("animation-delay", ".8s");
970        $(this.element)
971          .find(".read-more-post")
972          .addClass("animate__animated animate__fadeIn")
973          .css("animation-delay", "1.2s");
974      },
975      offset: "70%",
976    });
977
978    //var rellax = new Rellax('.home .item-post');
979    rellax = new Rellax(
980      ".home .item-post, .target .related-posts .item-post, .program .related-posts .item-post, .page-projects .related-posts .item-post, .single .related-posts .item-post, .single-project .related-posts .item-post",
981      {
982        speed: 1,
983        center: false,
984        wrapper: null,
985        round: true,
986        vertical: true,
987        horizontal: false,
988      },
989    );
990    rellax2 = new Rellax(".overlapping-images li", {
991      speed: 1,
992      center: false,
993      wrapper: null,
994      round: true,
995      vertical: true,
996      horizontal: false,
997    });
998
999    rellax3 = new Rellax(".program .content-page .info-main .item-block", {
1000      speed: 1,
1001      center: false,
1002      wrapper: null,
1003      round: true,
1004      vertical: true,
1005      horizontal: false,
1006    });
1007
1008    $(".featured-posts-home .item-post").hover(
1009      function () {
1010        $(this).css("animation", "none");
1011      },
1012      function () {
1013        $(this).css("animation", "initial");
1014      },
1015    );
1016
1017    $("#page, .home .featured-posts-home").addClass("visible");
1018
1019    $(".featured-posts-home .item-page.item-1")
1020      .find(".title-post")
1021      .addClass("animate__animated animate__fadeInUp")
1022      .css("animation-delay", "1.6s");
1023    $(".featured-posts-home .item-page.item-1")
1024      .find(".image-post")
1025      .addClass("animate__animated animate__fadeInUp")
1026      .css("animation-delay", "1.8s");
1027    $(".featured-posts-home .item-page.item-1")
1028      .find(".description-post")
1029      .addClass("animate__animated animate__fadeInUp")
1030      .css("animation-delay", "2.1s");
1031    $(".featured-posts-home .item-page.item-1")
1032      .find(".read-more-post")
1033      .addClass("animate__animated animate__fadeIn")
1034      .css("animation-delay", "2.5s");
1035
1036    $(".featured-posts-home .item-page.item-2")
1037      .find(".image-post")
1038      .addClass("animate__animated animate__fadeInUp")
1039      .css("animation-delay", "2.8s");
1040
1041    /*$('.mc-primary-nav .menu-contextual .column-menu ul.sub-menu > li').hover(
1042		function() {
1043	    //$(this).find('.image-menu-item').addClass('animate__animated animate__fadeInUp');
1044	    //$(this).find('.image-menu-item').removeClass('animate__fadeInDown');
1045	  }, function() {
1046	    //$(this).find('.image-menu-item').addClass('animate__animated animate__fadeInDown');
1047	    //$(this).find('.image-menu-item').removeClass('animate__fadeInUp');
1048	  }
1049	);*/
1050  });
1051
1052  $(window).scroll(function (event) {
1053    var winwidth = parseInt($(window).width());
1054    var winheight = parseInt($(window).height());
1055
1056    var headerHeight = parseInt($(".site-header").outerHeight(true));
1057
1058    if (winwidth >= 1440) {
1059      headerHeight = 160;
1060    } else if (winwidth >= 768) {
1061      headerHeight = 164;
1062    }
1063
1064    var slideHeight = parseInt($(".wide-container").outerHeight(true));
1065    var footerHeight = parseInt($(".site-footer").outerHeight(true));
1066
1067    var top = 1;
1068    var y = $(this).scrollTop();
1069    if (y >= top) {
1070      if (winwidth < 768) {
1071        $(".site-header").addClass("fixed");
1072        $(".headline-page").addClass("fixed");
1073      } else {
1074        $(".site-header").addClass("fixed");
1075        $(".headline-page").addClass("fixed");
1076      }
1077    } else {
1078      if (winwidth < 768) {
1079        $(".site-header").removeClass("fixed");
1080        $(".headline-page").removeClass("fixed");
1081      } else {
1082        $(".site-header").removeClass("fixed");
1083        $(".headline-page").removeClass("fixed");
1084      }
1085    }
1086
1087    var featuredPostsHeight = parseInt(
1088      $(".home .featured-posts-home").outerHeight(true),
1089    );
1090    var top2 = featuredPostsHeight;
1091    var y2 = $(this).scrollTop();
1092    if (y2 >= top2) {
1093      $(".home .site-header .site-branding .site-title").addClass("active");
1094    } else {
1095      $(".home .site-header .site-branding .site-title").removeClass("active");
1096    }
1097
1098    var infoClusterHeight = parseInt(
1099      $("body.cluster .info-cluster").outerHeight(true),
1100    );
1101    var top3 = infoClusterHeight + 2;
1102    var y3 = $(this).scrollTop();
1103    if (y3 >= top3) {
1104      $("body.cluster .headline-page, body.cluster .headline-page").addClass(
1105        "fixed-top",
1106      );
1107      $("body.cluster .partners-cluster, body.cluster .list-az").addClass(
1108        "fixed-top",
1109      );
1110    } else {
1111      $("body.cluster .headline-page, body.cluster .headline-page").removeClass(
1112        "fixed-top",
1113      );
1114      $("body.cluster .partners-cluster, body.cluster .list-az").removeClass(
1115        "fixed-top",
1116      );
1117    }
1118
1119    // Scroll in Single page
1120    /*var contentHeight = parseInt($('.page .entry-content').outerHeight(true));
1121		var differenceContentHeight = winheight - 309 - 51 - 58;
1122		var top2 = contentHeight - differenceContentHeight;
1123	    var y2 = $(this).scrollTop();
1124		if (y2 >= top2) {
1125			$('.related-posts .bg-title-whats-on').addClass('fixed');
1126		} else {
1127			$('.related-posts .bg-title-whats-on').removeClass('fixed');
1128		}*/
1129
1130    /*var pageHeight = parseInt($('#page').outerHeight(true));
1131		var articleHeight = parseInt($('#page article').outerHeight(true));
1132		var differenceContentHeight = pageHeight - articleHeight;
1133		var top3 = articleHeight - differenceContentHeight;
1134	    var y3 = $(this).scrollTop();
1135		if (y3 >= top3) {
1136			$('.related-posts .bg-title-whats-on').addClass('fixed-bottom');
1137		} else {
1138			$('.related-posts .bg-title-whats-on').removeClass('fixed-bottom');
1139		}*/
1140
1141    if ($("body").hasClass("home")) {
1142      var target = document.querySelector(".home .info-home"),
1143        windowHeight = $(window).height();
1144
1145      //Si el elemento es visible al realizar scroll
1146      if (inView(target)) {
1147        var offset = getViewportOffset(target);
1148        //Si el elemento aparece por la parte de abajo de la ventana
1149        /*if (windowHeight > offset.top) {
1150	            //Desplazo otro elemento de la página los mismos pixeles que el
1151	            //element .my.selector ha entrado en el viewport al realizar el scroll
1152	            $('.element-selector').css({
1153	                top: (windowHeight - offset.top)
1154	            });
1155	        }*/
1156        if (windowHeight > offset.top) {
1157          $(".home .bg-title-home").removeClass("fixed");
1158          //$('.home .site-header .site-branding .site-title').addClass('active');
1159        }
1160      } else {
1161        $(".home .bg-title-home").addClass("fixed");
1162        //$('.home .site-header .site-branding .site-title').removeClass('active');
1163      }
1164
1165      if ($(".related-posts").length > 0) {
1166        var target2 = document.querySelector(".related-posts"),
1167          windowHeight = $(window).height();
1168        var whatsOnHeight = parseInt(
1169          $(".related-posts .bg-title-whats-on").outerHeight(true),
1170        );
1171        var relatedPostsHeight = parseInt(
1172          $(".related-posts").outerHeight(true),
1173        );
1174        var relatedPostsMargin = parseInt(
1175          $(".related-posts").css("margin-top"),
1176        );
1177        var topVisibleWhatsOn = windowHeight - (whatsOnHeight + 80);
1178        var differenceRelatedBottom =
1179          windowHeight + relatedPostsMargin - relatedPostsHeight;
1180
1181        var offset2 = getViewportOffset(target2);
1182        if (inView(target2)) {
1183          if (
1184            offset2.top <= topVisibleWhatsOn &&
1185            offset2.top > differenceRelatedBottom
1186          ) {
1187            $(".related-posts .bg-title-whats-on").addClass("fixed");
1188            $(".related-posts .bg-title-whats-on").removeClass("fixed-bottom");
1189          } else {
1190            if (offset2.top <= differenceRelatedBottom) {
1191              $(".related-posts .bg-title-whats-on").addClass("fixed-bottom");
1192            } else {
1193              $(".related-posts .bg-title-whats-on").removeClass(
1194                "fixed-bottom",
1195              );
1196            }
1197            $(".related-posts .bg-title-whats-on").removeClass("fixed");
1198          }
1199          $(".home .bg-title-home").removeClass("fixed");
1200        } else {
1201          if (
1202            offset2.top <= topVisibleWhatsOn &&
1203            offset2.top > differenceRelatedBottom
1204          ) {
1205            $(".related-posts .bg-title-whats-on").addClass("fixed");
1206            $(".related-posts .bg-title-whats-on").removeClass("fixed-bottom");
1207            $(".home .bg-title-home").removeClass("fixed");
1208          } else {
1209            if (offset2.top <= differenceRelatedBottom) {
1210              $(".related-posts .bg-title-whats-on").addClass("fixed-bottom");
1211              $(".home .bg-title-home").removeClass("fixed");
1212            } else {
1213              $(".related-posts .bg-title-whats-on").removeClass(
1214                "fixed-bottom",
1215              );
1216            }
1217            $(".related-posts .bg-title-whats-on").removeClass("fixed");
1218          }
1219        }
1220        //console.log(offset.top + ' - ' + differenceRelatedBottom);
1221      }
1222    } else {
1223      if ($(".related-posts").length > 0) {
1224        var target = document.querySelector(".related-posts"),
1225          windowHeight = $(window).height();
1226        var whatsOnHeight = parseInt(
1227          $(".related-posts .bg-title-whats-on").outerHeight(true),
1228        );
1229        var relatedPostsHeight = parseInt(
1230          $(".related-posts").outerHeight(true),
1231        );
1232        var relatedPostsMargin = parseInt(
1233          $(".related-posts").css("margin-top"),
1234        );
1235        var topVisibleWhatsOn = windowHeight - (whatsOnHeight + 80);
1236        var differenceRelatedBottom =
1237          windowHeight + relatedPostsMargin - relatedPostsHeight;
1238
1239        var offset = getViewportOffset(target);
1240        if (inView(target)) {
1241          if (
1242            offset.top <= topVisibleWhatsOn &&
1243            offset.top > differenceRelatedBottom
1244          ) {
1245            $(".related-posts .bg-title-whats-on").addClass("fixed");
1246            $(".related-posts .bg-title-whats-on").removeClass("fixed-bottom");
1247          } else {
1248            if (offset.top <= differenceRelatedBottom) {
1249              $(".related-posts .bg-title-whats-on").addClass("fixed-bottom");
1250            } else {
1251              $(".related-posts .bg-title-whats-on").removeClass(
1252                "fixed-bottom",
1253              );
1254            }
1255            $(".related-posts .bg-title-whats-on").removeClass("fixed");
1256          }
1257        } else {
1258          if (
1259            offset.top <= topVisibleWhatsOn &&
1260            offset.top > differenceRelatedBottom
1261          ) {
1262            $(".related-posts .bg-title-whats-on").addClass("fixed");
1263            $(".related-posts .bg-title-whats-on").removeClass("fixed-bottom");
1264          } else {
1265            if (offset.top <= differenceRelatedBottom) {
1266              $(".related-posts .bg-title-whats-on").addClass("fixed-bottom");
1267            } else {
1268              $(".related-posts .bg-title-whats-on").removeClass(
1269                "fixed-bottom",
1270              );
1271            }
1272            $(".related-posts .bg-title-whats-on").removeClass("fixed");
1273          }
1274        }
1275        //console.log(offset.top + ' - ' + differenceRelatedBottom);
1276      }
1277
1278      if ($(".content-page .sidebar-column").length > 0) {
1279        var target2 = document.querySelector(".main-column"),
1280          windowHeight = $(window).height();
1281
1282        var headerPageMargin = 58 * 3;
1283        /*if($('body').hasClass('target')){
1284			    headerPageMargin = 58*2;
1285		    }*/
1286
1287        var mainHeight = parseInt($(".main-column").outerHeight(true));
1288        var sidebarHeight = parseInt(
1289          $(
1290            ".content-page .sidebar-column .content-sidebar-column",
1291          ).outerHeight(true),
1292        );
1293        var differenceMainHeight =
1294          sidebarHeight - mainHeight + headerPageMargin;
1295
1296        var offset2 = getViewportOffset(target2);
1297        if (inView(target2)) {
1298          //var offset2 = getViewportOffset(target2);
1299          if (
1300            offset2.top <= headerPageMargin &&
1301            offset2.top > differenceMainHeight
1302          ) {
1303            $(".content-page .sidebar-column").addClass("fixed");
1304            $(".content-page .sidebar-column").removeClass("fixed-bottom");
1305          } else {
1306            if (offset2.top <= differenceMainHeight) {
1307              $(".content-page .sidebar-column").addClass("fixed-bottom");
1308            } else {
1309              $(".content-page .sidebar-column").removeClass("fixed-bottom");
1310            }
1311            $(".content-page .sidebar-column").removeClass("fixed");
1312          }
1313        } else {
1314          if (
1315            offset2.top <= headerPageMargin &&
1316            offset2.top > differenceMainHeight
1317          ) {
1318            $(".content-page .sidebar-column").addClass("fixed");
1319            $(".content-page .sidebar-column").removeClass("fixed-bottom");
1320          } else {
1321            if (offset2.top <= differenceMainHeight) {
1322              $(".content-page .sidebar-column").addClass("fixed-bottom");
1323            } else {
1324              $(".content-page .sidebar-column").removeClass("fixed-bottom");
1325            }
1326            $(".content-page .sidebar-column").removeClass("fixed");
1327          }
1328          //$('.content-page .sidebar-column').removeClass('fixed');
1329        }
1330        //console.log(offset2.top+ " "+ differenceMainHeight);
1331      }
1332    }
1333  });
1334
1335  function resizeContent() {
1336    Medidas();
1337    var winwidth = parseInt($(window).width());
1338    var winheight = parseInt($(window).height());
1339    var content = $(".site-content");
1340    var siteheaderHeight = parseInt($(".site-header").outerHeight(true));
1341    var subscribeHeight = parseInt($(".subscribe-form").outerHeight(true));
1342
1343    headerHeight = siteheaderHeight;
1344    /*if($('body').hasClass('target')){
1345		headerHeight = siteheaderHeight;
1346	}*/
1347
1348    if (winwidth >= 768) {
1349      var plusWidthText = 7;
1350      $(
1351        ".main-navigation .menu li, .category .headline-page li a, .single-post .headline-page li a, .site-header .right-menu-icons .item-contact",
1352      ).each(function (i, obj) {
1353        $(this).attr("style", "width: auto !important;");
1354        var widthText = $(this).width() + plusWidthText;
1355        $(this).attr("style", "width:" + widthText + "px !important;");
1356      });
1357    } else {
1358      $(
1359        ".main-navigation .menu li, .headline-page li a, .site-header .right-menu-icons .item-contact",
1360      ).each(function (i, obj) {
1361        $(this).attr("style", "width: auto");
1362      });
1363    }
1364
1365    /*$('.featured-posts-home').attr('style', 'width: 100% !important;');
1366	var widthContainer = $('.entry-content').width();
1367	$('.featured-posts-home').attr('style', 'width:' + widthContainer + 'px !important;');*/
1368
1369    if ($("body").hasClass("single-post")) {
1370      subscribeHeight = 0;
1371    }
1372    var contentHeight = myHeight - headerHeight;
1373    //var heightSlide = ((winwidth-168)*1080)/1920;
1374    var heightSlide = contentHeight - 72;
1375    if (winwidth >= 768) {
1376      $(".wide-container").css("height", heightSlide);
1377      //$('.overlapping-images .overlapping-images-container').css('height', heightSlide);
1378      $(".site-content").css("min-height", contentHeight - subscribeHeight);
1379    } else {
1380      $(".wide-container").css("height", heightSlide);
1381      //$('.overlapping-images .overlapping-images-container').css('height', heightSlide);
1382      $(".site-content").css("min-height", "auto");
1383    }
1384
1385    var widthSidebar = parseInt(
1386      $(".content-page .sidebar-column").outerWidth(false),
1387    );
1388    $(".content-page .sidebar-column .content-sidebar-column").css(
1389      "width",
1390      widthSidebar,
1391    );
1392    var heightMain = parseInt(
1393      $(".content-page .main-column").outerHeight(true),
1394    );
1395    var heightSidebar = parseInt(
1396      $(".content-page .sidebar-column .content-sidebar-column").outerHeight(
1397        true,
1398      ),
1399    );
1400    if (heightMain >= heightSidebar) {
1401      $(".content-page .sidebar-column").css("height", heightMain);
1402    } else {
1403      $(".content-page .main-column").css("min-height", heightSidebar);
1404      $(".content-page .sidebar-column").css("height", heightSidebar);
1405    }
1406
1407    var widthVideoRow = parseInt(
1408      $(".video-row .div-video-row .video-background").outerWidth(true),
1409    );
1410    var heightVideoRow = (widthVideoRow * 1080) / 1920;
1411    if (winwidth >= 768) {
1412      $(".video-row").css("height", parseInt(heightVideoRow));
1413    } else {
1414      $(".video-row").css("height", parseInt(heightVideoRow));
1415    }
1416
1417    /*var widthInfoItem = parseInt($('.featured-posts-home .item-post.type-horizontal_image .info-post').outerWidth(true));
1418	var heightInfoItem = parseInt($('.featured-posts-home .item-post.type-horizontal_image .info-post').outerHeight(true));*/
1419
1420    /*var paddingItem = 42;
1421	var widthItemH = parseInt($('.featured-posts-home').outerWidth(true)) - (4*paddingItem);
1422	var heightItemH = parseInt($('.featured-posts-home .item-post.type-horizontal_image .info-post').outerHeight(true));
1423
1424	var widthItemV = heightItemH;
1425	var heightItemV = widthItemH;
1426
1427	var widthItemSquare = heightItemH;
1428	$('.featured-posts-home .item-post.type-horizontal .info-post').css('height', heightInfoItem);
1429	$('.featured-posts-home .item-post.type-horizontal .info-post').css('height', heightInfoItem);
1430
1431	$('.featured-posts-home .item-post.type-vertical .info-post').css('height', heightInfoItem);
1432	$('.featured-posts-home .item-post.type-vertical .info-post').css('height', heightInfoItem);
1433
1434	$('.featured-posts-home .item-post.type-square .').css('height', heightInfoItem);
1435	$('.featured-posts-home .item-post.type-square .info-post').css('height', heightInfoItem);*/
1436
1437    /*$('.featured-posts-home .item-post.type-full_screen_image .info-post').css('width', widthInfoItem);
1438	$('.featured-posts-home .item-post.type-full_screen_image .info-post').css('height', heightInfoItem);*/
1439
1440    var widthMarquee = parseInt(
1441      $(
1442        ".subscribe-form .layer-animate .title-layer-animate .title-1",
1443      ).outerWidth(true),
1444    );
1445    widthMarquee = widthMarquee * 2 + 4;
1446    $(".subscribe-form .layer-animate .title-layer-animate").css(
1447      "width",
1448      widthMarquee,
1449    );
1450
1451    /*var widthSponsors = 0;
1452	$('.sponsors-footer .list-sponsor-types .item-term').each(function(i, obj) {
1453    var widthItemSponsor = parseInt($(this).width());
1454		widthSponsors += widthItemSponsor;
1455	});
1456	$('.sponsors-footer .list-sponsor-types').css('width', widthSponsors);*/
1457
1458    //var widthFiles = parseInt($('.files-content .item-files').outerWidth(true));
1459    if (winwidth >= 768) {
1460      var widthFiles = parseInt(
1461        $(
1462          ".content-page .main-column .dropdowns-main .list-dropdowns",
1463        ).outerWidth(true),
1464      );
1465      widthFiles = (widthFiles - 32) / 3 + 16;
1466      $(".files-content .item-files").css("height", widthFiles);
1467    } else {
1468      var widthFiles = parseInt(
1469        $(
1470          ".content-page .main-column .dropdowns-main .list-dropdowns",
1471        ).outerWidth(true),
1472      );
1473      widthFiles = (widthFiles - 20) / 2 + 10;
1474      $(".files-content .item-files").css("height", widthFiles);
1475    }
1476
1477    var widthItemCluster = parseInt(
1478      $("body.cluster .list-partners.list-images .item-partner").outerWidth(
1479        true,
1480      ),
1481    );
1482    //widthItemCluster = ((widthItemCluster)/3)+16;
1483    $("body.cluster .list-partners.list-images .item-partner").css(
1484      "height",
1485      widthItemCluster,
1486    );
1487
1488    var slideVideoHeight = parseInt($("#slides").outerHeight(true));
1489    var slideVideoWidth = parseInt((slideVideoHeight * 1920) / 1080);
1490    $(".wide-container li .video-background").css("height", slideVideoHeight);
1491    $(".wide-container li .video-background").css("width", slideVideoWidth);
1492
1493    if (winwidth < 470) {
1494      var navigatorHeaders = false;
1495      if (winwidth > 375 && winheight > 690) {
1496        navigatorHeaders = true;
1497      } else if (winwidth <= 375 && winwidth > 340 && winheight > 600) {
1498        navigatorHeaders = true;
1499      } else if (winwidth <= 340 && winheight > 440) {
1500        navigatorHeaders = true;
1501      }
1502
1503      if (navigatorHeaders) {
1504        $("body").addClass("navigator-headers");
1505      } else {
1506        $("body").removeClass("navigator-headers");
1507      }
1508    } else {
1509      $("body").removeClass("navigator-headers");
1510    }
1511
1512    var height_max = 0;
1513    $(".list-registration-plans .item-plan .content-item-plan").each(
1514      function (i, obj) {
1515        $(this).attr("style", "height: auto !important;");
1516        if (height_max < $(this).outerHeight(true)) {
1517          height_max = $(this).outerHeight(true);
1518        }
1519      },
1520    );
1521    if (winwidth <= 1140) {
1522      $(".list-registration-plans .item-plan .content-item-plan").attr(
1523        "style",
1524        "height: auto !important;",
1525      );
1526    } else {
1527      $(".list-registration-plans .item-plan .content-item-plan").attr(
1528        "style",
1529        "height:" + height_max + "px !important;",
1530      );
1531    }
1532  }
1533
1534  $(window).bind("resize", function () {
1535    resizeContent();
1536    //rellax.refresh();
1537  });
1538
1539  $(window).load(function () {
1540    var winwidth = parseInt($(window).width());
1541    var winheight = parseInt($(window).height());
1542
1543    var isOpera =
1544      (!!window.opr && !!opr.addons) ||
1545      !!window.opera ||
1546      navigator.userAgent.indexOf(" OPR/") >= 0;
1547    var isFirefox = typeof InstallTrigger !== "undefined";
1548    var isSafari = Object.prototype.toString
1549      .call(window.HTMLElement)
1550      .indexOf("Constructor 0");
1551    var isIE = /*@cc_on!@*/ false || !!document.documentMode;
1552    var isEdge = !isIE && !!window.StyleMedia;
1553    var isChrome = !!window.chrome && !!window.chrome.webstore;
1554    var isBlink = (isChrome || isOpera) && !!window.CSS;
1555
1556    //if(isSafari && !isChrome){
1557    $(window).trigger("resize");
1558    window.dispatchEvent(new Event("resize"));
1559    //}
1560  });
1561})(jQuery);

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.