PageSourceSearch

https://www.helmond.nl/english/smartinstant-framework/design/javascripts/addition.js

js helmond.nl collected 2026-10-02 05:21:34 UTC 5,146 bytes, 135 lines download raw bytes

1/* Write here your custom javascript codes */
2function setCookie(key, value) {
3            var expires = new Date();
4            expires.setTime(expires.getTime() + (1 * 24 * 60 * 60 * 1000));
5            document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();
6        }
7
8        function getCookie(key) {
9            var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
10            return keyValue ? keyValue[2] : null;
11        }
12		
13function correctFooter(){
14  var h = $j("#footer").height();
15  console.log('footer height:' + h);
16  $j("body").css("margin-bottom",h+"px");
17}
18var sitefunctions = {
19   
20	
21    // font resizer
22   textresize : function(){
23      var fontsizeContainer = $j("#FontSize"); // div waar de links in staan
24      $j(fontsizeContainer).css('display','inline-block');
25      var $cookie_name = "LetterFormaat";
26      var originalFontSize = 'originalfont';
27      var smallFontSize = 'smallfont';
28      var bigFontSize = 'bigfont';
29      var biggerFontSize = 'biggerfont';
30      var $getSize = getCookie($cookie_name);
31      if($getSize) {
32            $j("body").addClass($getSize);
33      }
34      // reset link - reset cookie
35      $j(".FontSizeReset", fontsizeContainer).click(function(){
36            $j("body").removeClass("bigfont").removeClass("biggerfont"); 
37            $j.cookie($cookie_name, null,{path: '/'});
38        correctFooter();
39            return false;
40      });
41      // +link
42      $j(".FontSizeInc", fontsizeContainer).click(function(){
43	  $j.cookie("contrastbuttons", null,{path: '/'});
44  		 $j.cookie($cookie_name, bigFontSize,{path: '/'});
45		 $j("body").removeClass("biggerfont").addClass("bigfont");
46        correctFooter();
47         return false;
48      });
49      // ++link
50      $j(".FontSizeIncInc", fontsizeContainer).click(function(){
51		 $j.cookie($cookie_name, biggerFontSize,{path: '/'});
52		 $j("body").removeClass("bigfont").addClass("biggerfont");
53        correctFooter();
54         return false;
55      });
56  },
57  contrast:function() {
58  	// contrastbuttons
59     if ( $j.cookie("contrastbuttons") ) {
60               $j("body").addClass("contrastbody");
61               $j("#hoogcontrast").addClass("contrastactive").find("a").text("Normal contrast");
62     }
63     $j("#hoogcontrast").click(function(e){
64       e.preventDefault();
65                 if ( $j(this).hasClass("contrastactive") ) {
66                      $j(this).removeClass("contrastactive").find("a").text("High contrast");;
67                      $j.cookie("contrastbuttons", null,{path: '/'});
68                      $j("body").removeClass("contrastbody");
69               return false;
70                 }
71                 else {
72                      $j(this).addClass("contrastactive").find("a").text("Normal contrast");
73                      $j.cookie("contrastbuttons", "contrast",{path: '/'});
74                      $j("body").addClass("contrastbody");
75               return false;
76                 }
77			
78     });
79  },
80};
81
82////////////////     ONLOAD     //////////////////////
83
84$j( document ).ready(function() {
85  correctFooter();
86  $j(window).on("resize",function() {correctFooter();});
87  //textimages
88  //$j("img.textimage").wrap("<div class='textimage'></div>").after(function(){return "<span class='altoverlay'>"+$j(this).attr("alt")+"</span>"});
89  $j("img.textimage").closest("a").wrap("<div class='textimagecontainer'></div>").after(function(){return "<span class='altoverlay'>"+$j(this).find("img").attr("alt")+"</span>"});
90  $j("span.altoverlay").on("click",function(e){
91      var url = $j(this).parent().find("a").first().attr("href");
92      window.location=url;
93    });
94  // font resizer
95   $j('#FontSize').show().append(' <span>Text</span> <a class="FontSizeReset" href="#" title="Normaal lettertype">A </a> <a class="FontSizeInc" href="#" title="Groter lettertype">A+</a> <a class="FontSizeIncInc" href="#" title="Grootste lettertype">A++</a>');
96   sitefunctions.textresize();
97   // contrast
98	sitefunctions.contrast();
99	
100   // Activate Carousel
101   $j("#pageCarousel").carousel();
102   $j("#playButton").click(function () {
103     $j("#pageCarousel").carousel('cycle');
104   });
105   $j("#pauseButton").click(function () {
106     $j("#pageCarousel").carousel('pause');
107   }); 
108   
109   $j(".postchange").change(function() {
110     this.form.submit();
111   });
112   
113   $j('#bdsorttitlelink').click(function(){
114     $j('#bdlisttitle').toggle();
115	 $j('#bdlistdate').toggle();
116     return false;
117   });
118   
119   $j('#bdsortdatelink').click(function(){
120     $j('#bdlisttitle').toggle();
121	 $j('#bdlistdate').toggle();
122     return false;
123   });
124   
125// New bug in IE11 -- scrolling position:fixed + background-image elements jitters badly   
126  if(navigator.userAgent.match(/MSIE 10/i) || navigator.userAgent.match(/Trident\/7\./) || navigator.userAgent.match(/Edge\/12\./)) {
127    $j('body').on("mousewheel", function () {
128      event.preventDefault();
129      var wd = event.wheelDelta;
130      var csp = window.pageYOffset;
131      window.scrollTo(0, csp - wd);
132    });
133  }
134   
135});

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.