PageSourceSearch

https://www.rookvrijezorg.com/wp-content/themes/trimbos-base3-child/js/app.js?3&ver=20260928-05-31-03

js rookvrijezorg.com collected 2026-09-29 02:46:53 UTC 30,686 bytes, 1,242 lines download raw bytes

1(function($) {
2
3	$(document).ready(function(){
4
5		///responsivevoice-button
6		if ( $('.responsivevoice-button').length) {
7			if ( $('.responsivevoice-button span').length)  {
8				console.log('voice');
9				$('.responsivevoice-button span').hide();
10				var soundText = '<span><span id="img-icn-accesebillity-read-aloud"></span> Lees voor</span>';
11				
12				setTimeout(function(){
13					$('.responsivevoice-button').append(soundText);
14				}, 1000);
15
16			}
17
18
19		}
20
21
22
23
24
25
26
27
28
29
30		function getWords(str) {
31		    return str.split(/\s+/).slice(0,7).join(" ");
32		}
33
34
35
36
37
38setTimeout(function(){
39		/// .astra-advanced-hook-9547
40		if ( $('.astra-advanced-hook-9547').length) {
41			// looop wp-block-getwid-instagram__wrapper has-1-columns
42			$('.wp-block-getwid-instagram__wrapper').find('.wp-block-getwid-instagram__item').each(function(index, element) {
43            	//var heading = $(element);
44            	//console.log($(element));
45            	// wp-block-getwid-instagram__media-wrapper
46            	var atag = $(element).find('.wp-block-getwid-instagram__media-wrapper').find('.wp-block-getwid-instagram__media-link');
47            	var instUrl = atag.attr('href');
48            	//console.log(instUrl);
49
50            	//img alt
51            	var img = atag.find('.wp-block-getwid-instagram__media');
52            	var alt = getWords( img.attr('alt') );
53            	//console.log(alt);
54            	var imgSrc = img.attr('data-src');
55
56
57
58            	if ( $('.insta-feed').length) {
59					//$('<a class="insta-item" target="_blank" href="'+instUrl+'"><img src="'+imgSrc+'" alt="'+alt+'" >'+alt+'<span>'+instUrl+'</span></a>').appendTo('.insta-feed');
60					$('<a class="insta-item" target="_blank" href="'+instUrl+'"><img src="'+imgSrc+'" alt="'+alt+'" ></a>').appendTo('.insta-feed-wrap');
61            		
62            		
63
64            	}
65
66        	});
67		}
68
69
70}, 1000);
71
72
73
74
75		function setAccessIconPosition() {
76			if ($(".aicon_link").length) {
77				//drugsenuitgaan
78				if ($('body').hasClass('website-37')) {
79					//var searchposition = $("#ast-search-form").offset();	// ast-search-menu-icon slide-search
80					if ($(".ast-above-header .ast-search-menu-icon").length) {
81						console.log('asmi');
82						var searchposition = $(".ast-above-header .ast-search-menu-icon").offset();				
83						var rightPos = ($(window).width() - (searchposition.left + 50 -200 + 90)) * (-1);
84						$(".aicon_link").attr("style", "top: "+(searchposition.top + 1)+"px !important; left:"+rightPos+"px !important;");				
85
86					}
87				}
88				//sva
89				if ($('body').hasClass('website-40')) {
90
91					
92					if ($('body').hasClass('ast-header-break-point')) {
93						var rightPos = -106;
94						$(".aicon_link").attr("style", "top: 0px !important; left:"+rightPos+"px !important;");
95					
96					}else{
97						var pos1 = $("#ast-above-header-navigation-section-2").offset().left;
98						var pos2 = $("#ast-above-header-navigation-section-2").width();
99						var leftPost = pos1 + pos2;
100						var rightPos = ($(window).width() - leftPost) * (-1);
101						
102						
103						$(".aicon_link").attr("style", "top: 0px !important; left:"+rightPos+"px !important;");
104					}
105
106
107					
108
109
110				}
111				/////
112
113
114				/// geweldinjeugdzorginfo.nl
115				if ($('body').hasClass('website-28')) {	
116					
117
118
119
120						//var accessImgPosTop = $('.ast-above-header-wrap .ast-above-header-section .user-select .ast-custom-html').children('img').first().offset().top;
121						//var accessImgPosLeft = $('.ast-above-header-wrap .ast-above-header-section .user-select .ast-custom-html').children('img').first().offset().left;
122
123						var accessImgPosTop = $('.above-header-top-right-icons').find('.access').offset().top;
124						var accessImgPosLeft = $('.above-header-top-right-icons').find('.access').offset().left;  
125						//console.log(accessImgPosLeft);//20
126						accessImgPosLeft = accessImgPosLeft  - $(window).width();
127						//console.log(accessImgPosLeft);//-300
128						var newAccessImg = $('.accessability_container .aicon_link');
129						
130						
131						//$(newAccessImg).css({left: accessImgPosLeft});
132						if (window.innerWidth < 992) {
133							accessImgPosTop = accessImgPosTop - 4;
134							//accessImgPosLeft = accessImgPosLeft - 12;
135							accessImgPosLeft =  -100;
136						}
137						// -312
138						console.log(accessImgPosTop + '/' +accessImgPosLeft);
139
140						
141
142						$(newAccessImg).attr('style', 'top: '+accessImgPosTop+'px !important;right: auto !important; left:'+accessImgPosLeft+'px !important;');
143
144
145
146
147
148
149					
150				}
151
152
153
154
155
156
157
158
159
160
161
162			}
163		}	
164
165
166
167
168
169
170
171function removeUrlFromDate() {
172	if ($(".hp-post-carousel").length) {
173		setTimeout(function(){
174			 $(".hp-post-carousel").find('.slick-slide').each(function(index, element) {
175			 	if ($(element).find('.date-slide-wrapper').length) {
176			 		$(element).find('.date-slide-wrapper').find('.wp-block-getwid-template-post-date').find('time').find('a').replaceWith(function(){
177					    return $('<span/>', {
178					        html: this.innerHTML
179					    })
180					});
181			 	}
182			 });
183		}, 1000);
184	}
185}
186
187
188
189
190
191		
192
193		window.addEventListener('resize', e => {
194			setAccessIconPosition();
195		
196		});
197		setAccessIconPosition();
198		removeUrlFromDate();
199
200
201			/////////
202		//choose-comb
203		
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225if ($('.combinations-wrapper').length) {
226
227    // Ensure localStorage is working correctly
228    if (typeof(Storage) !== "undefined") {
229        // Clear starter in local storage if not empty
230        if (localStorage.getItem('starter') !== "") {
231            localStorage.setItem('starter', "");
232        }
233
234        $('.combinations').find('.drug').click(function() {
235            $('.comb-result').hide();
236            $( ".drug" ).removeClass("act");
237            $(".drug").not($(this)).removeClass('act');
238
239
240            console.log('comb');
241
242            var start = $('.combinations').data('start');
243            var second = $(this).data('drug');
244            var result = start + '-' + second;
245
246            if (start === "no") {
247                // First selection
248                if (localStorage.getItem('starter') !== "") {
249                    if (localStorage.getItem('starter') !== second) {
250                        window.location.href = "https://www.drugsenuitgaan.nl/" + localStorage.getItem('starter') + "/combigebruik#" + second;
251                        console.log(localStorage.getItem('starter') + '-' + second);
252                        localStorage.setItem('starter', "");
253                    }
254                } else {
255                    localStorage.setItem('starter', second);
256                    $(this).addClass("act");
257                }
258            } else {
259                // Second selection or other conditions
260                if ($(this).hasClass('default')) {
261                    if ($(".comb-result").hasClass('show')) {
262                        $(".comb-result.show").show();
263                    } else {
264                        $('.combinations-result').prepend("<div class=\"comb-result show\"><h4>Combinatie: </h4><span>Selecteer hierboven een tweede middel</span></div>");
265                    }
266                } else {
267                    $('#' + result).show();
268                    $(this).addClass("act");
269                    $(".comb-result h3").remove();
270
271                    // Mapping drug names to display names
272                    var startText = getDrugName(start);
273                    var secondText = getDrugName(second);
274
275                    $('#' + result).prepend("<h3>Combinatie: " + startText + " + " + secondText + "</h3>");
276                }
277            }
278        });
279
280        // Handling page load by hash
281        var second2 = $(location).attr('hash').substring(1);
282        if (second2 !== "") {
283            var start2 = $('.combinations').data('start');
284            second2 = normalizeDrugName(second2);
285
286            var result2 = start2 + '-' + second2;
287
288            var ic = 0;
289            $('.combinations').find('.drug').each(function(index, element) {
290                if ($(element).data('drug') === second2) {
291                    $(element).addClass("act");
292
293                    var startText = getDrugName(start2);
294                    var secondText = getDrugName(second2);
295
296                    $('#' + result2).show();
297                    $('#' + result2).prepend("<h3>Combinatie: " + startText + " + " + secondText + "</h3>");
298                    
299                    ic++;
300                }
301            });
302            if (ic === 0) {
303                $('.combinations-result').prepend("<div class=\"comb-result show\"><h4>Combinatie: </h4><span>Selecteer hierboven een tweede middel</span></div>");
304            }
305        } else {
306            $('.combinations-result').prepend("<div class=\"comb-result show\"><h4>Combinatie: </h4><span>Selecteer hierboven een tweede middel</span></div>");
307        }
308    } else {
309        console.error("Local storage is not supported by this browser.");
310    }
311}
312
313// Function to get display name of the drug
314function getDrugName(drug) {
315    switch (drug) {
316        case "ghb": return "GHB";
317        case "lachgas": return "Lachgas";
318        case "alcohol": return "Alcohol";
319        case "weed":
320        case "hasj-en-wiet": return "Hasj/Wiet";
321        case "2cb": return "2C-B";
322        case "xtc":
323        case "xtc-3": return "XTC";
324        case "cocaine": return "Cocaïne";
325        case "speed": return "Speed";
326        case "paddos":
327        case "paddo-s": return "Paddo’s";
328        case "ketamine": return "Ketamine";
329        case "4fa":
330        case "4-fluoramfetamine-4fa": return "4-FA";
331        case "3mmc":
332        case "3-mmc": return "3-MMC";
333        default: return "";
334    }
335}
336
337// Function to normalize drug name from URL hash
338function normalizeDrugName(drug) {
339    switch (drug) {
340        case "4-fluoramfetamine-4fa": return "4fa";
341        case "hasj-en-wiet": return "weed";
342        case "paddo-s": return "paddos";
343        case "xtc-3": return "xtc";
344        case "3-mmc": return "3mmc";
345        default: return drug;
346    }
347}
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370//jeugdzorg
371if ( $('.website-28').length) {
372	setTimeout(function(){
373 $('.site-title').find('a').each(function(index, element) {
374            var heading = $(element);
375            var word_array, last_word, first_part;
376
377            word_array = heading.html().split(' '); 
378            last_word = word_array.slice(-1)[0].toString(); 
379
380            //first_part = word_array.slice(0, -1).toString().replace(',', ' ');  
381            first_part = word_array.slice(0, -1).toString().replace(/,/g , ' ')
382
383
384
385
386            
387
388
389            heading.html(first_part + ' <span class="last-word">'+ last_word+ '</span>');
390        });
391}, 300);
392
393}
394
395
396
397
398
399
400
401
402 //drugsenuitgaan
403	if ( $('.doe-de-test').length) {
404
405
406		setTimeout(function(){
407					
408			$('.doe-de-test .slick-slide').each(function(){
409	        	var slide = $(this);
410	        	var catdiv = slide.find('.wp-block-getwid-template-post-categories');
411	        	if (catdiv.find('a').length) {
412	        		var caturl = catdiv.find('a').attr('href');
413	        		if (caturl != "undefined") {
414						var urlParts = caturl.split("/");
415						var endUrl = urlParts[urlParts.length-1];
416						slide.addClass(endUrl);
417					}
418	        	}
419	        	//
420	        	var hdiv = slide.find('.wp-block-getwid-template-post-title');
421	        	if (hdiv.find('a').length) {
422	        		var hurl = hdiv.find('a').attr('href');
423	        		if (hurl != "undefined") {
424						var hurlParts = hurl.split("/");
425						var hendUrl = hurlParts[hurlParts.length-1];
426						slide.addClass(hendUrl);
427					}
428	        	}
429
430	        	
431				
432				
433				 
434	    });
435
436
437		}, 300);
438		
439		
440
441
442
443
444
445    }
446        ////////////////
447
448
449
450
451
452
453
454  if ( $('.hp-post-carousel').length) {
455			setTimeout(function(){
456					
457				$('.hp-post-carousel').find('.slick-slide').each(function(){
458		        	var slide = $(this);
459		        	if (!slide.find('.wp-block-getwid-template-post-featured-image').length) {
460		        		
461		        		slide.find('.wp-block-getwid-template-post-title').css({paddingTop: '50px'});
462		        	}	
463					 
464		    	});
465
466
467			}, 3000);
468
469    }
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484		/////////
485		//choose-comb
486		if ( $('.choose-comb').length) {
487
488
489			$('.target-drugs').hide();
490	        $('.base-drug').click(function(){
491	        	$('.base-drug').removeClass('act');
492	              $('.target-drugs').hide();
493	              $('#target-'+$(this).attr('target')).show();
494	               $($(this)).addClass('act');
495
496	               $("body,html").animate(
497					      {
498					        scrollTop: $('#target-'+$(this).attr('target')).offset().top - (80)
499					      },
500					      600 
501					    );
502
503
504
505
506	        });
507	        
508    	}
509        ////////
510
511
512
513        /*
514        body.cat-combinaties
515        */
516        if ( $('.cat-combinaties').length) {
517        	if ( $('.has-post-thumbnail').length) {
518        		if ( $('.post-thumb img').length) {
519        			var risicoIMG = $('.post-thumb img').attr('src');
520        			var svgName = risicoIMG.substring(risicoIMG.lastIndexOf('/') + 1);
521        			var textImg;
522
523        			if(svgName == "low-risk.svg"){
524        				textImg = '<p class="risico-img-description reed-more">Niveau 1 van risico:<br><a href="/combinaties/risicos">Serieuze klachten</a>';
525        			}
526        			if(svgName == "Group-295.svg"){
527        				textImg = '<p class="risico-img-description reed-more">Niveau 1 van risico:<br><a href="/combinaties/risicos">Serieuze klachten</a>';
528        			}
529        			else if (svgName == "medium-risk.svg") {
530        				textImg = '<p class="risico-img-description reed-more">Niveau 2 van risico:<br><a href="/combinaties/risicos">Ernstige klachten</a>';
531        			}else if(svgName == "high-risk.svg"){
532        				textImg = '<p class="risico-img-description reed-more">Niveau 3 van risico:<br><a href="/combinaties/risicos">Levensbedreigend</a>';
533        			}
534
535        			$('.post-thumb').append(textImg);
536
537        		}
538
539        	}
540
541        }
542        ////////////////
543
544
545
546
547
548
549
550
551
552        ////////////////////
553        //// category-combinaties.php
554		if ( $('body.archive.category-combinaties').length) {
555			if ( $('#main .ast-row').length) {
556
557				var parentDiv = $('#main .ast-row');
558				
559				$('article.ast-article-post').addClass('swiper-slide');
560				$('article.ast-article-post').wrapAll("<div class='swiper-wrapper' />");
561				$('.swiper-wrapper').wrapAll("<div class='swiper-container' />");
562				$('.swiper-container').append('<div class="swiper-pagination"></div>');
563
564				parentDiv.append('<div class="swiper-button-prev"></div><div class="swiper-button-next"></div>');
565
566
567				setTimeout(function(){
568					var heightSwiper = $('.swiper-wrapper').height() - 3;
569					$('article.ast-article-post').height(heightSwiper);
570					console.log(heightSwiper);
571
572
573				}, 3000);
574
575			}
576		}
577		//
578		if ( $('body.archive.category-combinaties').length) {
579			if ( $('#primary .swiper-container').length) {
580
581				
582
583				setTimeout(function(){
584					var heightSwiper = $('.swiper-wrapper').height() - 3;
585					$('.slide-cont').height(heightSwiper);
586					console.log(heightSwiper);
587
588
589				}, 300);
590
591			}
592		}
593
594		///
595		//if ( $('body.archive.category-combinaties').length) {
596			if ( $('.comb-accordion').length) {
597
598				$('.toggle').click(function(e) {
599				  	e.preventDefault();
600				  
601				    var $this = $(this);
602				  
603				    if ($this.next().hasClass('show')) {
604				        $this.next().removeClass('show');
605				        $this.next().slideUp(350);
606				        $this.removeClass('opened');
607				    } else {
608				        $this.parent().parent().find('li .inner').removeClass('show');
609				        $this.parent().parent().find('li .inner').slideUp(350);
610				        $this.next().toggleClass('show');
611				        $this.next().slideToggle(350);
612				        $this.toggleClass('opened');
613				    }
614				});
615			}
616
617		//}
618
619
620        ///////////////////
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640		///////////////
641		if ( $('.crp_related').length) {
642
643			$('.swiper-slide').each(function(){
644				var slide = $(this);
645				//var link = slide.find('a');
646				var link = slide.find('a').attr('href');
647
648			    slide.append(
649			    	$("<a/>")
650		  			.prop("href", link)
651		  			.addClass("reed-more")
652		  			.text('Lees Meer')
653		  		);
654
655			});
656
657		}
658		///////////////
659
660
661		/////////////////
662		/////////////////
663		if ( $('.ginput_container_select').length) {
664			var x, i, j, selElmnt, a, b, c;
665			/*look for any elements with the class "custom-select":*/
666			x = document.getElementsByClassName("ginput_container_select");
667			for (i = 0; i < x.length; i++) {
668			  selElmnt = x[i].getElementsByTagName("select")[0];
669			  /*for each element, create a new DIV that will act as the selected item:*/
670			  a = document.createElement("DIV");
671			  a.setAttribute("class", "select-selected");
672			  a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
673			  x[i].appendChild(a);
674			  /*for each element, create a new DIV that will contain the option list:*/
675			  b = document.createElement("DIV");
676			  b.setAttribute("class", "select-items select-hide");
677			  for (j = 1; j < selElmnt.length; j++) {
678			    /*for each option in the original select element,
679			    create a new DIV that will act as an option item:*/
680			    c = document.createElement("DIV");
681			    c.innerHTML = selElmnt.options[j].innerHTML;
682			    c.addEventListener("click", function(e) {
683			        /*when an item is clicked, update the original select box,
684			        and the selected item:*/
685			        var y, i, k, s, h;
686			        s = this.parentNode.parentNode.getElementsByTagName("select")[0];
687			        h = this.parentNode.previousSibling;
688			        for (i = 0; i < s.length; i++) {
689			          if (s.options[i].innerHTML == this.innerHTML) {
690			            s.selectedIndex = i;
691			            h.innerHTML = this.innerHTML;
692			            y = this.parentNode.getElementsByClassName("same-as-selected");
693			            for (k = 0; k < y.length; k++) {
694			              y[k].removeAttribute("class");
695			            }
696			            this.setAttribute("class", "same-as-selected");
697			            break;
698			          }
699			        }
700			        h.click();
701			    });
702			    b.appendChild(c);
703			  }
704			  x[i].appendChild(b);
705			  a.addEventListener("click", function(e) {
706			      /*when the select box is clicked, close any other select boxes,
707			      and open/close the current select box:*/
708			      e.stopPropagation();
709			      closeAllSelect(this);
710			      this.nextSibling.classList.toggle("select-hide");
711			      this.classList.toggle("select-arrow-active");
712			    });
713			}
714			function closeAllSelect(elmnt) {
715			  /*a function that will close all select boxes in the document,
716			  except the current select box:*/
717			  var x, y, i, arrNo = [];
718			  x = document.getElementsByClassName("select-items");
719			  y = document.getElementsByClassName("select-selected");
720			  for (i = 0; i < y.length; i++) {
721			    if (elmnt == y[i]) {
722			      arrNo.push(i)
723			    } else {
724			      y[i].classList.remove("select-arrow-active");
725			    }
726			  }
727			  for (i = 0; i < x.length; i++) {
728			    if (arrNo.indexOf(i)) {
729			      x[i].classList.add("select-hide");
730			    }
731			  }
732			}
733			/*if the user clicks anywhere outside the select box,
734			then close all select boxes:*/
735			document.addEventListener("click", closeAllSelect);
736		}
737
738		/////////////////
739		/////////////////
740
741
742
743		if ( $('.swiper-container').length) {			
744
745			var mySwiper = new Swiper ('.swiper-container', {
746			    direction: 'horizontal',
747			    loop: true,
748			    slidesPerView: 1,
749      			spaceBetween: 20,
750      			freeMode: true,
751			    
752
753			    // Navigation arrows
754			    navigation: {
755			      nextEl: '.swiper-button-next',
756			      prevEl: '.swiper-button-prev',
757			    },
758
759			    pagination: {
760				   el: '.swiper-pagination',
761				   type: 'bullets',
762				   clickable: true,
763				},
764
765			    breakpoints: {
766			        480: {
767			          slidesPerView: 1,
768			          spaceBetween: 20,
769			        },
770			        640: {
771			          slidesPerView: 2,
772			          spaceBetween: 20,
773			        },
774			        1004: {
775			          slidesPerView: 3,
776			          spaceBetween: 30,
777			        },
778			      }
779
780
781
782			    
783			});
784
785
786
787
788
789
790
791
792		}
793
794
795
796
797
798
799
800	// START hp-post-carousel
801	// START slick-slide 
802
803		// *** find highest post and setup all to that height 
804		var maxHeight = 0;
805	    $('.slick-slide .is-excerpt').each(function(){
806	       var thisH = $(this).height();
807	       if (thisH > maxHeight) { maxHeight = thisH; }       
808	    });
809		$('.slick-slide .is-excerpt').height(maxHeight);
810		// ***
811		
812		// *** hide tag if is empty
813	    $('.slick-slide .selecteer-type').each(function(){
814	    	
815	       var thisT = $(this).text();
816	       thisT = $.trim(thisT);
817	       if ( thisT.length == 0 ) {
818				$(this).hide();
819			}      
820	    });
821
822    // END slick-slide 
823    // END hp-post-carousel
824
825
826
827
828
829    ///two-columns-text-image wp-block-column
830   $('.img-tag figure img').each(function(){
831	       var imgAlt = $(this).attr("alt");
832
833		    $(this).parent().append(
834	  			$('<div/>')
835	  			.addClass("tag-info")
836	  			.append("<span/>")
837	  			.text(imgAlt)
838	  		);
839
840	});
841
842
843
844
845
846
847
848
849
850
851
852
853   // START .three-posts-grid
854	
855
856
857
858		$('.three-posts-grid').each(function(){
859			var threePostsGrid = $(this);
860			
861			// H3 height 
862			var maxHeightH3 = 0;
863			threePostsGrid.find('h3').each(function(){
864		       var thisH3 = $(this).height();
865		       if (thisH3 > maxHeightH3) { 
866		       	maxHeightH3 = thisH3;
867		       	}       
868		    });
869		    threePostsGrid.find('h3').height(maxHeightH3);
870
871		    // is-excerpt
872		    var maxHeightEx = 0;
873		    threePostsGrid.find('.is-excerpt').each(function(){
874		    	var thisHEx = $(this).height();
875	       		if (thisHEx > maxHeightEx) { maxHeightEx = thisHEx; }       
876	    	});
877	    	threePostsGrid.find('.is-excerpt').height(maxHeightEx);
878	    		            
879	    });
880		
881		
882
883    // END .three-posts-grid 
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
902
903	window.addEventListener('resize', e => { 
904
905		if ( $('#secondary .sidebar-main').length) {
906
907			$('#secondary .sidebar-main').removeClass('ios-bar');
908			var h = window.innerHeight;
909
910			switch(window.orientation) {  
911		      case -90: case 90:
912		        console.log('landscape');
913		        h = window.innerHeight;
914				//console.log(h);
915		        $('#secondary .sidebar-main').removeClass('ios-bar');
916		        break; 
917		      default:
918		        console.log('portrait');
919		        h = window.innerHeight;
920				//console.log('hChange = '+h);
921		       
922		        if ( h < 620 ) {
923		        	$('#secondary .sidebar-main').addClass('ios-bar');
924		        }else{
925		        	$('#secondary .sidebar-main').removeClass('ios-bar');
926		        }
927		        break; 
928		    }
929		}
930
931
932
933	}); 
934}
935
936
937
938
939
940	
941		$('#secondary .widget_nav_menu .widget-title').click(function() {
942			 if (window.innerWidth < 769) {
943			 	$(this).parent().parent().toggleClass('opened');
944			 }
945		});
946	
947
948
949
950
951
952
953
954function setHeightFutureimgSinglepage(){
955	$('.single .entry-header .post-thumb-img-content').each(function(){
956			var postThumbImgContent = $(this);
957			var ptciw = $(this).width();
958		    var ptcih = ptciw /2.36;
959		   	postThumbImgContent.height(ptcih);
960	    });
961}
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976/////////////
977///// START mobile
978function mobileMenuSetup() {
979
980
981		function setTopMenuSwiper() {
982			//var slidesNum = $('#below_header-menu').children('.swiper-slide').size();
983			var slidesNum = $('.secondary').find('.widget_nav_menu').find('.menu').find('.menu-item').size();
984			console.log(slidesNum);
985			var swiper;
986			swiper = new Swiper('.swiper-container', {
987			      //slidesPerView: 2.5,
988			       slidesPerView: "auto",
989			      //slidesPerView: slidesNum,
990			      spaceBetween: 15,
991			      loop: true,
992			      hashNav:true,
993			      visibilityFullFit: true,
994			    });
995			/////
996			
997			
998			
999			////////
1000			/*
1001			swiper.on('click', function (e) {			  			 
1002			  swiper.slideTo(swiper.clickedIndex );			  
1003			});
1004			*/
1005			////////
1006			
1007			$(window).on("resize orientationchange", function(){ 
1008				swiper.detachEvents();
1009		        $('.swiper-wrapper').removeAttr('style');
1010		        $('.swiper-slide').removeAttr('style');
1011					swiper.update();
1012					setTimeout(function(){ 
1013						swiper.attachEvents();
1014					}, 2000);
1015					//console.log('resized!');
1016					//setSubMenuLiHeight();
1017			});
1018			//setSubMenuLiHeight();
1019			
1020		}
1021		////////////
1022
1023
1024
1025
1026			if ( $('.secondary').find('.widget_nav_menu').find('nav').length) {
1027				$('.secondary').find('.widget_nav_menu').find('nav').addClass('swiper-container');
1028				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').addClass('swiper-wrapper');
1029				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').find('.menu-item').addClass('swiper-slide');
1030				setTimeout(function(){ 
1031					setTopMenuSwiper();
1032				}, 2000);
1033		 
1034			}
1035
1036		
1037		
1038	
1039
1040
1041}
1042///////////////
1043//// END mobile  to 991
1044
1045
1046	window.addEventListener('resize', e => {
1047		
1048		if (window.innerWidth > 768) {
1049			$('#secondary .widget_nav_menu .menu').width('auto');
1050			////
1051
1052			$('.secondary').find('.widget_nav_menu').find('nav').addClass('swiper-container');
1053			$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').addClass('swiper-wrapper');
1054			$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').find('.menu-item').addClass('swiper-slide');
1055
1056
1057
1058
1059
1060			if ($('.secondary').find('.widget_nav_menu').find('nav').hasClass('swiper-container')) {
1061				$('.secondary').find('.widget_nav_menu').find('nav').removeClass('swiper-container');
1062				$('.secondary').find('.widget_nav_menu').find('nav').removeClass('swiper-container-initialized');
1063				$('.secondary').find('.widget_nav_menu').find('nav').removeClass('swiper-container-horizontal');
1064				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').removeClass('swiper-wrapper');
1065				
1066				
1067				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').find('.menu-item').removeClass('swiper-slide');
1068				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').find('.menu-item').removeClass('swiper-slide-active');
1069				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').find('.swiper-slide-duplicate').remove();
1070			
1071				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').find('.menu-item').removeAttr("style");
1072				$('.secondary').find('.widget_nav_menu').find('nav').find('.menu').removeAttr("style");
1073			 
1074			}
1075
1076			///
1077		}else{
1078			if (($('body').hasClass('website-43')) || ($('body').hasClass('website-60')) ){}else{
1079				//if (!$('body').hasClass('website-43')) {
1080				mobileMenuSetup();
1081			}
1082		}
1083		setHeightFutureimgSinglepage();
1084		
1085	});
1086
1087	if ($(window).width() < 769){
1088		//if (!$('body').hasClass('website-43')) {
1089			if (($('body').hasClass('website-43')) || ($('body').hasClass('website-60')) ){}else{
1090				mobileMenuSetup();
1091			}
1092	}
1093	
1094	setHeightFutureimgSinglepage();
1095
1096
1097
1098
1099	///////////////////
1100	//////////////////
1101	function setPostGridHeight() {
1102
1103		if ($('.wp-block-getwid-custom-post-type__post').length) {
1104
1105		$('.wp-block-getwid-custom-post-type__post').each(function(){		    
1106			    if (! $(this).find('.wp-block-getwid-template-post-featured-image').length) {
1107			    	if (! $(this).find('.fake-post-featured-image').length) {
1108			    		$( '<div class="fake-post-featured-image"></div>' ).insertAfter($(this).find( '.wp-block-getwid-template-post-date' ));
1109			    	}	
1110			    } 		      
1111			});
1112
1113		if (window.innerWidth > 991) {	
1114
1115			
1116	
1117			setTimeout(function(){
1118				// if fake 40 then add 126-40
1119
1120				var maxHeightPitm = 0;
1121			    $('.post-img-text-more .is-excerpt').each(function(){
1122			      
1123			    	 var thisH = $(this).height();
1124			       
1125
1126			       	if ( $(this).parent().find('.fake-post-featured-image').length) {
1127			       		//thisH = thisH + 86;
1128			       		$(this).parent().find('.reed-more').addClass('no-ftr-img');
1129			       	}
1130			       //	console.log($(this).parent().find('.fake-post-featured-image'));
1131
1132			       
1133
1134			       if (thisH > maxHeightPitm) { maxHeightPitm = thisH; }       
1135			    });
1136				$('.post-img-text-more .is-excerpt').height(maxHeightPitm);
1137				///
1138
1139				var maxHeightTitle = 0;
1140			    $('.post-img-text-more .wp-block-getwid-template-post-title').each(function(){
1141			       var thisTi = $(this).height();
1142			       if (thisTi > maxHeightTitle) { maxHeightTitle = thisTi; }       
1143			    });
1144				$('.post-img-text-more .wp-block-getwid-template-post-title').height(maxHeightTitle);
1145
1146
1147			}, 1000);
1148		}else{
1149
1150
1151
1152			//$('.ast-hide-menu-item').closest('button').next().find('.ast-menu-toggle').addClass('hide-it');
1153			//console.log($('.ast-hide-menu-item').closest('button').next().find('.ast-menu-toggle'));
1154
1155			$('.ast-hide-menu-item').each(function(){
1156				var liOfHiden = $(this).parent();
1157				$(liOfHiden).addClass('hide-border');
1158				//$(btnToggle).hide();
1159				//console.log($(liOfHiden));
1160
1161				//console.log($(this));
1162			});
1163
1164
1165
1166
1167		}
1168
1169
1170		/////////
1171		if ( $('.ast-above-header-wrap').length) {
1172			if ( $('.ast-above-header-wrap .ast-above-header-section .user-select .ast-custom-html').children('img').length ) {
1173				// .ast-above-header-wrap .ast-above-header-section .user-select .ast-custom-html img:first-child
1174				var accessImgPosTop = $('.ast-above-header-wrap .ast-above-header-section .user-select .ast-custom-html').children('img').first().offset().top;
1175				var accessImgPosLeft = $('.ast-above-header-wrap .ast-above-header-section .user-select .ast-custom-html').children('img').first().offset().left;
1176				
1177				accessImgPosLeft = accessImgPosLeft  - $(window).width();
1178				//console.log(accessImgPosTop+'='+accessImgPosLeft);
1179				var newAccessImg = $('.accessability_container .aicon_link');
1180				
1181				
1182				//$(newAccessImg).css({left: accessImgPosLeft});
1183				if (window.innerWidth < 992) {
1184					accessImgPosTop = accessImgPosTop -4;
1185					accessImgPosLeft = accessImgPosLeft - 12;
1186				}
1187
1188				$(newAccessImg).attr('style', 'top: '+accessImgPosTop+'px !important;right: auto !important; left:'+accessImgPosLeft+'px !important;');
1189			}
1190		}
1191
1192		/////////
1193	}
1194	}	
1195	
1196	window.addEventListener('resize', e => { 
1197		setPostGridHeight();
1198	});
1199
1200	setPostGridHeight();
1201	/////////////////
1202	//////////////////
1203
1204
1205
1206
1207
1208	var fulUrl = window.location.href.toString();
1209	var pathName = window.location.pathname.toString(); 
1210	
1211	var singleSocialEmailUrl = 'mailto:?subject=bekijk%20'+fulUrl+'&amp;body=%0A%0A%0A'+fulUrl;
1212	$("#singleSocialEmail").attr("href", singleSocialEmailUrl);  
1213
1214	var singleSocialTwUrl = 'https://twitter.com/intent/tweet?text=tweet%20txt%20%2B%20'+fulUrl;
1215	$("#singleSocialTw").attr("href", singleSocialTwUrl);
1216
1217	var singleSocialLnUrl = 'https://www.linkedin.com/shareArticle?mini=true&amp;url='+fulUrl+'&amp;title='+pathName+'&amp;summary=&amp;source=';
1218	$("#singleSocialLn").attr("href", singleSocialLnUrl);
1219
1220	var singleSocialFbUrl = 'https://www.facebook.com/sharer/sharer.php?u='+fulUrl;
1221	$("#singleSocialFb").attr("href", singleSocialFbUrl);
1222
1223	
1224
1225
1226
1227
1228
1229	$('a').filter(function() {
1230	   return this.hostname && this.hostname !== location.hostname;
1231	}).addClass("external");
1232
1233
1234
1235
1236
1237	
1238
1239	});
1240})(jQuery);
1241
1242

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.