PageSourceSearch

https://publiekegezondheid.nl/js/main.js?d=20201112

js publiekegezondheid.nl collected 2026-10-07 06:11:11 UTC 9,393 bytes, 286 lines download raw bytes

1/*! AcademisheWerkplaats - v1.0.4 - 2018-10-11 10:55:53 */
2/* StudioSteen Log - v1.0.1  Usage: log("message"/{}); */
3function log(message) {
4    "use strict";
5    if (window.console && typeof message !== "undefined") {
6        if (typeof message === "string") {
7            var date = new Date();
8            window.console.log(date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds() + "." + date.getMilliseconds() + ": " + message);
9        } else {
10            window.console.log(message);
11        }
12    }
13}
14
15$.fn.crossFadeContent = function (content, options) {
16    "use strict";
17    /* jshint unused:true*/
18    /* global TweenLite:true*/
19    var _elem = $(this),
20        o = $.extend({
21            topSelector: ".content",
22            bottomSelector: ".content-bottom",
23            duration: 0.5,
24            ease: TweenLite.defaultEase,
25            animateHeight: true,
26            durationHeight: 0.3,
27            easeHeight: TweenLite.defaultEase
28        }, options),
29        _top = _elem.find(o.topSelector),
30        _bot = _elem.find(o.bottomSelector);
31
32    if (_top.html() !== content) {
33        TweenLite.killTweensOf(_bot);
34        TweenLite.killTweensOf(_top);
35        _bot.html(_top.html());
36        _bot.css("opacity", 1);
37        _top.css("opacity", 0.001);
38        _top.html(content);
39        TweenLite.to(_top, o.duration, {
40            opacity: 1,
41            ease: o.ease
42        });
43
44        if (o.animateHeight) {
45            TweenLite.to(_elem, o.durationHeight, {
46                height: (_top.outerHeight())
47            });
48        }
49        TweenLite.to(_bot, o.duration, {
50            opacity: 0,
51            ease: o.easeHeight
52        });
53    }
54};
55
56$(window).load(function () {
57"use strict";
58    /* globals AdobeEdge */
59    $("#over").find(".vraagstuk,.evalueren,.resultaat,.contact").addClass("hide");
60    if($("#over").length > 0){
61AdobeEdge.loadComposition("anim1", "AW-Anim1", {
62    scaleToFit: "both",
63    centerStage: "both",
64    minW: "320px",
65    maxW: "630px",
66    width: "630px",
67    height: "500px"
68}, {"style":{"${symbolSelector}":{"isStage":"true","rect":["undefined","undefined","630px","500px"]}},"dom":[{"rect":["284","241","62px","18px","auto","auto"],"id":"preloader2","fill":["rgba(0,0,0,0)","../../../img/anim/preloader2.gif","0px","0px"],"type":"image","tag":"img"}]}, {"style":{"${symbolSelector}":{"isStage":"true","rect":["undefined","undefined","630px","500px"]}},"dom":[{"rect":["0","0","630px","500px","auto","auto"],"id":"Poster2","fill":["rgba(0,0,0,0)","../../../img/anim/Poster2.png","0px","0px"],"type":"image","tag":"img"}]});
69    }
70});
71
72
73$.fn.scrollList = function (options) {
74    "use strict";
75    /* jshint unused:true*/
76    /* global Draggable:true*/
77    return this.each(function () {
78        var _elem = $(this),
79            _this = this,
80            o = $.extend({
81                draglist: _elem.find("ul.list"),
82                children: _elem.find("ul.list li"),
83                timeline: _elem,
84                extraDraglistWidth: 500,
85                type: "x",
86                dragableOptions: {
87                    edgeResistance: 0,
88                    throwProps: true
89                },
90                width: 0,
91                debug: false
92            }, options);
93
94        _this.init = function () {
95            o.dragableOptions.type = o.type;
96            o.dragableOptions.bounds = o.timeline;
97            if (o.debug) {
98                log("initializing: scrollList");
99            }
100            o.width = (o.children.length * o.children.width()) + o.extraDraglistWidth;
101            o.draglist.width(o.width);
102
103            Draggable.create(o.draglist, o.dragableOptions);
104        };
105
106        _this.init();
107
108    });
109};
110
111$.fn.setEqual = function (options) {
112    "use strict";
113    /* jshint unused:true */
114    /* global log:true*/
115//    var _elem = $(this),
116//        _this = this,
117    var o = $.extend({
118            property: "height", // height or width
119            smallestValue: false, // Set to true if all elements need to use the smallest value of the elements
120            debug: false
121        }, options),
122        max = Infinity;
123
124    this.css(o.property, "auto");
125
126    if (o.smallestValue === false) {
127        max = Number.NEGATIVE_INFINITY;
128    }
129
130    this.each(function () {
131        var _elem = $(this);
132        if (o.smallestValue === false) {
133            if (o.property === "height") {
134                if (_elem.outerHeight() > max) {
135                    max = _elem.outerHeight();
136                }
137            } else if (o.property === "width") {
138                if (_elem.outerWidth() > max) {
139                    max = _elem.outerWidth();
140                }
141            }
142        } else {
143            if (o.property === "height") {
144                if (_elem.outerHeight() < max) {
145                    max = _elem.outerHeight();
146                }
147            } else if (o.property === "width") {
148                if (_elem.outerWidth() < max) {
149                    max = _elem.outerWidth();
150                }
151            }
152        }
153    });
154
155    if (o.debug) {
156        if (o.smallestValue === false) {
157            log("Set equal maximal " + o.property + "\" of \"" + max + "\" on \"" + this.selector);
158        } else {
159            log("Set equal minimal " + o.property + "\" of \"" + max + "\" on \"" + this.selector);
160        }
161    }
162
163    return this.css(o.property, max + "px");
164};
165
166$(function () {
167    "use strict";
168    /* global TweenLite:true Power2:true, Modernizr:true */
169    var $win = $(window);
170    var $body = $("body");
171    $win = $body;
172
173
174    // medewerkers
175    $('#medewerkers li > a').click(function (e) {
176        e.preventDefault();
177        var _content = $(this).siblings('.content');
178        $('#medewerkers .inner').crossFadeContent(_content.html());
179        $('#medewerkers li > a').removeClass('active');
180        $(this).addClass('active');
181        //log($('#medewerkers .info').position().top);
182        /*TweenLite.to(window, 1, {
183            scrollTo: {
184                y: (($('#medewerkers').position().top + $('#medewerkers .info').position().top )- 80)
185            }
186        });*/
187    });
188
189    //main Navigation
190    /*$("header .menu a").each(function () {
191        var _elem = $(this);
192        log(_elem.text()+" "+_elem.selector);
193        log(_elem);
194        _elem.append($("<span>").text(_elem.text()));
195    });*/
196    $("a[href$=\".pdf\"]").addClass("external");
197    $("header .menu a, a.internal").click(function (e) {
198        var hash = $(this).attr("href");
199        if (hash.charAt(0) === "#") {
200            e.preventDefault();
201
202            hash = hash.replace(/^.*?(#|$)/, "");
203
204            $("header").removeClass("show");
205
206            var addPadding = 0;
207            if (hash === "publicaties") {
208                addPadding = -90;
209            }
210
211            if(hash === 'publicaties'){addPadding = -90;}
212            if(Modernizr.mq('screen and (max-width: 1024px)')){addPadding = -40;}
213            TweenLite.to(window, 1, {
214                scrollTo: {
215                    y: ($("#" + hash).position().top + addPadding)
216                }
217            });
218        }
219    });
220	
221    $('#onderzoeken :button').click(function(){
222				$('#onderzoeken .hiddenItems').addClass('show');
223				$('#onderzoeken :button').remove();
224    });	
225
226    // scrolllist
227    $(".scrollList").scrollList();
228
229
230    //open menu
231    $(".toggle-menu").click(function (event) {
232        event.preventDefault();
233        event.returnValue = false;
234        $("header").toggleClass("show");
235    });
236
237    // pagina on load
238    $(window).load(function () {
239        //log($(".scrollList").o);
240        $("#onderzoeken .scrollList .inner").setEqual();
241        $("#medewerkers li>a").setEqual({
242            property: "width",
243            smallestValue: true
244        });
245
246        $("body > div[id]").waypoint(function (direction) {
247            //log(direction + " on " + $(this).attr("id"));
248            var $links = $("a[href=\"#" + this.id + "]\"");
249            $links.toggleClass("active", direction === "down");
250
251        }, {
252            offset: "100%"
253        }).waypoint(function (direction) {
254            //log(direction + " on " + $(this).attr("id"));
255            var $links = $("a[href=\"#" + this.id + "]\"");
256            $links.toggleClass("active", direction === "up");
257        }, {
258            offset: function () {
259                return -$(this).height();
260            }
261        });
262        $("body > #over").waypoint(function (direction) {
263            //log(direction + " Header!");
264            if (direction === "down") {
265                $("header").addClass("small");
266            }
267            if (direction === "up") {
268                $("header").removeClass("small");
269            }
270        }, {
271            offset: -126
272        });
273
274        //resize
275        $(window).on("throttledresize", function () {
276            $("#onderzoeken .scrollList .inner").setEqual();
277            $("#medewerkers li>a").setEqual({
278                property: "width",
279                smallestValue: true
280            });
281        });
282        $("body").removeClass("loading");
283    });
284});
285
286//# sourceMappingURL=main.js.map

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.