PageSourceSearch

https://www.envihaifa.org.il/js/addwat.js?t=1789626388

js envihaifa.org.il collected 2026-10-06 22:09:52 UTC 17,125 bytes, 365 lines download raw bytes

1/**
2 * ADDWAT - Add Website Accessibility Tools
3 *
4 * Copyright (c) 2015 Tyco Interactive ltd.
5 * Author : Eytan Chen
6 *
7 * Set custom AddWat settings for all website pages
8 * It is recommended to check each page with WAVE (web accessibility valuation tools): http://wave.webaim.org
9 *
10 */
11
12$(function() {
13
14	addwat_opt = {
15
16		/**
17		 * unique license key for addwat usage
18		 * the script will not work without a valid license!
19		 */
20		license: _addwat_license,
21
22
23		/**
24		 * lang
25		 *
26		 * set the language for your website.
27		 * current available languages: Hebrew (heb), English (eng)
28		 * you can also pass a variable representing the language
29		 * */
30		lang: _lang,
31
32		/**
33		 * mobile
34		 *
35		 * boolean, if set to false will not load addwat at all if mobile is detected
36		 * default to true
37		 */
38		mobile: true,
39
40		/**
41		 * addwatButtonsOptions
42		 *
43		 * addwat buttons dynamically creates accessibility menu for several accessibility tools
44		 * the tools themselves are set according to their settings (setHighContrast, setFontSizer, setLinksHighlight)
45		 * use addwatButtons setting to enable/disable this menu
46		 *
47		 * default/available options:
48		 *      trigger: {
49         *          button: "auto",     // the element used for the button. to auto create the button, skip this setting or set to "default".
50         *                              // otherwise set the selector for the existing button to be used.
51         *          container: null,    // auto create the button, but inside a specific container and not relative to the accessibility menu.
52         *          position: "top",    // set the position of the button to the menu and page - top / bottom (defaults to top) - only if no custom trigger and no container set
53         *          margin: "0",        // set the margin of the button (percent or pixels) from its position - only if no custom trigger and no container set
54         *          title: false,       // show accessibility menu title aside button
55         *      },
56		 *      side: "left",           // select the side of the screen where the accessibility menu will position. defaults to left
57		 *      theme: "bright",        // select the theme of the menu (bright / dark). can be overridden from website CSS
58		 *      top: 0,                 // top position for the menu itself (ie: open the menu under the header)
59		 *      certificate: null,      // the url to the websites accessibility certificate. shows the accessibility stamp and links to the page.
60		 *      access_statement: "",   // the url to the accessibility statement page
61		 *
62		 *      mobile: {
63         *          // the mobile object can hold all of the above settings, in order to have different settings on mobile
64         *          // if mobile is set to false, the accessibility menu will not show on mobile devices and lower resolutions at all
65         *          // for each setting not stated, the above setting will be used instead
66         *      }
67		 */
68		addwatButtonsOptions: _addwatButtonsOptions, // set on na_scripts dynamically according to selected header template
69
70		/**
71		 * access_menus
72		 *
73		 * set identifiers for the different menus on your page in access_menus array.
74		 * !! it is important to target the top-level ul of the menu, and not its container. you should wrap the ul with a container, which will receive "navigation" role.
75		 * the accessibility plugin will add appropriate area-codes and keyboard navigation options for menus set here
76		 * example: addwat_menus: ["#top_menu", ".side_menu"];
77		 */
78		addwat_menus: ["#mainNav", "#footer_menu",".categories-choose .dropdown-menu",".prd-menu ul.nav"],
79
80		/**
81		 * highContrastOptions
82		 *
83		 * set options for high contrast plugin, if you wish to override the default settings
84		 * default options:
85		 *      button_white: "#highContrast_white"         //identifier for the white contrast button
86		 *      button_black: "#highContrast_black"         //identifier for the black contrast button
87		 *      button_default: "#highContrast_default"     //identifier for the default contrast button
88		 *      prefix_white: "hc_wb"                       //css class prefix for white contrast
89		 *      prefix_black: "hc_bb"                       //css class prefix for black contrast
90		 *      cookie: "addwat_hc"                         //contrast cookie name
91		 *      cookie_expire: 365                          // select the expire time of the cookie. default to one year (365). for session only, pass null
92		 */
93		highContrastOptions: {},
94
95		/**
96		 * fontSizerOptions
97		 *
98		 * set options for font sizer plugin, if you wish to override the default settings
99		 * default options:
100		 *      targetSection: 'body'                       // target section. plugin will run on children of this element.
101		 *      skip: null                                  // identifier for elements to skip. example, to skip all ul / ol elements, pass "ul, ol"
102		 *      button_increase: "#rvfs-increase"           // identifier for font increase button
103		 *      button_decrease: "#rvfs-decrease"           // identifier for font decrease button
104		 *      button_reset: "#rvfs-reset"                 // identifier for font reset button
105		 *      step_up: 2                                  // amount of font increase step
106		 *      step_down: -2                               // amount of font decrease step
107		 *      max_size: 30                                // max font size. if set to percent, will increase all elements to percentage of original size
108		 *      min_size: 11                                // min font size. if set to percent, will decrease all elements to percentage of original size
109		 *      cookie: "addwat_fs"                         // font sizer cookie name
110		 *      cookie_expire: 365                          // select the expire time of the cookie. default to one year (365). for session only, pass null
111		 */
112		fontSizerOptions: {},
113
114		/**
115		 * linksHighlightOptions
116		 *
117		 * set options for links highlight plugin, if you wish to override the default settings
118		 * default options:
119		 *      targetSection: 'body'                       // target section. plugin will run on children of this element.
120		 *      skip: null                                  // identifier for elements to skip. example, to skip all ul / ol elements, pass "ul, ol"
121		 *      button_lh: "#addwat_lh"                     // identifier for link highlight button
122		 *      button_ld: "#addwat_ld"                     // identifier for link reset button
123		 *      highlightType: "text-decoration"            // the css attribute to change for links
124		 *      highlightValue: "underline"                 // the value for the css attribute
125		 *      highlightHover: "none"                 // the value for the css attribute on :hover
126		 *      cookie: "addwat_lh"                         // hightlight links cookie name
127		 *      cookie_expire: 365                          // select the expire time of the cookie. default to one year (365). for session only, pass null
128		 */
129		linksHighlightOptions: {},
130
131		/**
132		 * focusOptions
133		 *
134		 * set the options for focus elements style on website
135		 * default options:
136		 *      type: "box-shadow"                      // css attribute to change when focu
136s in / out
137		 *      focus: "inset 0px 0px 0px 1px #000"     // the css value for focus state
138		 *      out: "none"                             // the css value for blur state
139		 *      black_focus: ""                         // the css value for focus state when site is in dark contrast. if not set, defaults to basic focus settings.
140		 *      black_out: ""                           // the css value for blur state when site is in dark contrast. if not set, defaults to basic blur settings.
141		 *      white_focus: ""                         // the css value for focus state when site is in light contrast. if not set, defaults to basic focus settings.
142		 *      white_out: ""                           // the css value for blur state when site is in dark contrast. if not set, defaults to basic blur settings.
143		 */
144		focusOptions: {},
145
146		/**
147		 * activate or disable addwat buttons, high contrast and font sizer plugins
148		 */
149		addwatButtons: true, // create accessibility toolbar buttons for high contrast and font size control
150		setHighContrast: true, // init high contrast option
151		setFontSizer: true, // init font sizer option
152		setLinksHighlight: true, // init links highlight option
153		hoverToFocus: false, // add focus styling to all hover styling existing
154
155		showTooltips: true, // show special tooltips for alts and titles on page. for specific override of elements, add the "awtt_skip" class to the element.
156
157		/**
158		 * innerLinksOptions
159		 *
160		 * init accessibility hidden navigation to main areas of the page. navigation according to the order set here.
161		 * array of objects, each object consisting of two required properties and two optional:
162		 *      item : jquery identifier for the area container
163		 *      title : the title of the area to show on hidden navigation link
164		 *      type : use to identify main areas of the page. options:
165		 *          "main" : main content area of the page. will add "skip to main content" hidden link after <body> tag
166		 *          "accessibility" : accessibility menu. will add "skip to accessibility menu" hidden link after main content link
167		 *          "footer" : page footer. will only add "complementary" aria role to item
168		 *          "search" : page main search. will only add "search" aria role to item
169		 *      position : optional - whether the hidden link should come before the element or prepend inside it. values: before or prepend (default)
170		 *      offset: offset when scrolling to element. use if there is a sticky header over the top of the page
171		 *      top: top offset for the skip element itself (absolute)
172		 *      behavior: nextNav/nextTab - skip to next shortcut by ENTER, or skip to next TABBABLE with tab, enter with ENTER. defaults to nextNav.
173		 */
174		innerLinksOptions: [
175			{
176				item: ".main",
177				title: _tpl_accessibility.main_section_title,
178				type: "main",
179				offset: 100
180			},
181			{
182				item: ".events-dates",
183				title: _tpl_accessibility.events_dates,
184				behavior: "nextTab",
185				offset: 100,
186				top: -50
187			},
188			{
189				item: ".prd-menu",
190				title: _tpl_accessibility.prd_menu,
191				behavior: "nextTab",
192				offset: 100,
193			},
194			{
195				item: "#footer",
196				title: _tpl_accessibility.footer_section_title,
197				type: "footer",
198				offset: 100
199			}
200		],
201
202		/**
203		 * addwatElements
204		 *
205		 * list of elements you wish to add accessibility options to.
206		 * this should be an array of objects, each object containing:
207		 *      target: the target element identifier (converted to jquery object) - mandatory
208		 *      role: optional - the aria role for this element
209		 *      type: optional - change the type of the element. will attempt to copy the original element css to the new element.
210		 *      tabindex: optional - add or remove tabindex from element
211		 *      title : optional - add title to element
212		 *      ariaLabel : optional - add aria-label attribute to element
213		 *      alt : optional - add alt to element
214		 *      style: optional - add inline style for element
215		 *      text: optional - append text to element
216		 *      hidden: boolean - will add addwat_hidden class to element, and hide it off-screen
217		 *      hiddenText: boolean - will add addwat_hidden_text class to element, and hide its text contents off-screen
218		 */
219		addwatElements: [
220			{
221				target: $(".owl-carousel.show-nav-hover"),
222				focusInClass: "open"
223			},
224			{
225				target: ".owl-next",
226				tabindex: 0,
227				role: "button",
228				ariaLabel: _tpl_accessibility.next_slide
229			},
230			{
231				target: ".owl-prev",
232				tabindex: 0,
233				role: "button",
234				ariaLabel: _tpl_accessibility.prev_slide
235			},
236			{
237				target: ".owl-dot",
238				tabindex: 0,
239				role: "button",
240				title: _tpl_accessibility.show_slide
241			},
242			{
243				target: ".scroll-to-top",
244				title: _tpl_accessibility.scroll_to_top
245			},
246			{
247				target: ".atcb-link",
248				tabindex: 0,
249				role: "button",
250				addClass:"dropdown-toggle"
251			}
252		],
253
254		/**
255		 * clickToEnter
256		 *
257		 * array of dom elements (identifiers) that have on click events binded to them,
258		 * which we wish to apply also by Enter / Space key down on elements.
259		 * Binds the key down listener to the elements, and triggers click when key pressed
260		 */
261		clickToEnter: [".owl-next",".owl-prev", ".owl-dot", "section.toggle label"],
262
263		/**
264		 * addwatLightbox
265		 *
266		 * array of objects referring to lightbox links on page.
267		 * accessibility options for lightboxes include:
268		 *      auto focus to new lightbox layer
269		 *      keyboard navigation limited within lightbox container
270		 *      refocus back to trigger element when lightbox is closed
271		 *
272		 * each object containing:
273		 *      trigger : identifier of the element that triggers the lightbox
274		 *      target : identifier of the lightbox container element, to which we need to focus when popped
275		 *      close : identifier of the close button/link on the lightbox
276		 */
277		addwatLightbox: [
278			{
279				trigger: ".pswp-item",
280				target: ".pswp__scroll-wrap",
281				close:".pswp__button--close"
282			}
283		],
284
285		/**
286		 * add appropriate aria rules and behaviour to expendable elements on your page.
287		 * expandable elements are accordion style elements, where clicking one elements opens another hidden element
288		 * each object containing:
289		 *      trigger: identifier of the element that opens the hidden element
290		 *      expand: the expendable hidden area
291		 */
292		addwatExpendable: [
293			{trigger: "section.toggle label", expand: "section.toggle .toggle-content"}
294		],
295
296
297		/**
298		 * addwatForms
299		 *
300		 * add accessibility options to forms on your website. object can contain multiple object, one for each form on website
301		 * options for each form object:
302		 * - form : required! form element identifier
303		 * - labelType: select label type:
304		 *          - wrap : wrap the current title text in label tag
305		 *          - title : add title attribute to input
306		 *          - aria-label : add aria-label attribute to input
307		 *          - before / after : create a label element before after the input element
308		 * - fields: required, array of fields on form, with settings for each field
309		 *          - elm : field element identifier
310		 *          - title : field title container
311		 *          - required : boolean, true if field is required. default to false
312		 *          - type : the type of the input field, used for changing type (example: change "text" input into "email" input)
313		 *          - desc : container of any extra description/remark for this field
314		 *          - pattern: if html5 set to true, you could add pattern validation
315		 *          - errors: if html5 set to true, you can set the specific error texts for this field, according for each of the error types:
316		 *                  - pattern: error will show in case field pattern mismatch
317		 *                  - type: error will show in case field type mismatch
318		 *                  - empty: error will show in case required field is empty
319		 * - hideTitle : boolean, if true the input current title element will be hidden. use when adding a new label element
320		 * - labelClass : used for adding css class to the label created
321		 * - html5: boolean, true to add html5 to form (such as required)
322		 * - showRequired: boolean, if true will add required symbol to title element of required fields
323		 * - errorClass: add error class to invalid fields. will only work with html5 validation set to true and active.
324		 * - errorContainer: in cases where invalid errors are displayed on screen not as js-alert/html5-errors, set the error container here
325		 */
326
327		addwatForms: [
328			{}
329		],
330
331		// src of main addwat plugin. DO NOT CHANGE!!!!
332		src: 'https://addwat.tycontrol.me/'
333	};
334
335	$.ajax({
336		url: addwat_opt.src + 'addwat.'+addwat_opt.lang+'.js',
337		dataType: "script",
338		async: true,
339		cache: true
340	    });
341	// SPECIFIC ACCESSIBILITY SETTINGS FOR THIS WEBSITE
342	// add all your accessibility code here
343
344	$(".owl-carousel").each(function(){
345		$(this).keydown(function (e) {
346			if (e.keyCode == 37) {
347				(_dir == "rtl") ? $(this).trigger('next.owl.carousel') : $(this).trigger('prev.owl.carousel');
348			} else if (e.keyCode == 39) {
349				(_dir == "ltr") ? $(this).trigger('next.owl.carousel') : $(this).trigger('prev.owl.carousel');
350			}
351		});
352	});
353
354	$(".addtocalendar").focusin(function () {
355		$(this).find(".atcb-list").css({"visibility":"visible"});
356	}).focusout(function (e) {
357		var t = $(this);
358		setTimeout(function() {
359			if (t.has($(document.activeElement)).length < 1) {
360				t.find(".atcb-list").removeAttr("style");
361			}
362		},50);
363	});
364
365});

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.