PageSourceSearch

https://cloverhillwinery.com/wp-content/plugins/sogo-accessibility…/js/sogo-accessibility-public.js?ver=1.0.5

js cloverhillwinery.com collected 2026-10-02 19:37:50 UTC 8,607 bytes, 276 lines download raw bytes

1(function ($) {
2    'use strict';
3
4    $(document).ready(function () {
5
6        var body = $('body');
7        if (readCookie('sogo_accessibility')) {
8            body.addClass('sogo_accessibility');
9            $('.accessibility_menu').setup_navigation();
10        }
11
12        if (readCookie('sogo_bnc')) {
13            body.addClass('sogo_blank_white');
14        }
15
16        if (readCookie('sogo_sogo_readable_font')) {
17            body.addClass('sogo_readable_font');
18        }
19
20        if (readCookie('sogo_underline_links')) {
21            body.addClass('sogo_underline_links');
22        }
23
24        if (readCookie('sogo_contrasts')) {
25            body.addClass('sogo_contrasts');
26            var file = $('#contrasts').data('css');
27            loadjscssfile(file, 'css', 'sogo_contrasts_css');
28        }
29
30        if (readCookie('sogo_contrasts_white')) {
31            body.addClass('sogo_contrasts_white');
32            var file = $('#contrasts_white').data('css');
33            loadjscssfile(file, 'css','sogo_contrasts_css_white');
34        }
35
36        if (readCookie('sogo_font_2')) {
37            body.addClass('sogo_font_2');
38        }
39
40        if (readCookie('sogo_font_3')) {
41            body.addClass('sogo_font_3');
42        }
43
44        sogo_change_fonts();
45
46        // open socgoacc
47        $('.toggle_sogoacc').click(function () {
48            $('#sogoacc').slideToggle();
49            body.addClass('sogo_accessibility');
50           setTimeout(function(){  $('#b_n_c').focus(); }, 500);
51        });
52
53        $('a[href="#sogo_access_statement"]').click(function(e){
54            $('#sogo_access_statement').show();
55            $('#sogo_overlay').show();
56        });
57        $('#close_sogo_access_statement').click(function(){
58            $('#sogo_access_statement').hide();
59            $('#sogo_overlay').hide();
60        });
61
62        $('#sogo_accessibility').click(function () {
63            if (body.hasClass('sogo_accessibility')) {
64                eraseSogoCookie();
65
66                location.reload();
67                return false;
68            } else {
69                //createCookie('sogo_accessibility', 'true', 365);
70                //sogo_set_accessibility();
71            }
72            //body.addClass('sogo_accessibility');
73
74        });
75
76        $('#b_n_c').click(function () {
77            if (body.hasClass('sogo_blank_white')) {
78                eraseCookie('sogo_bnc');
79            } else {
80                createCookie('sogo_bnc', 'true', 365);
81            }
82            body.toggleClass('sogo_blank_white');
83            $('#sogoacc').slideUp();
84
85        });
86
87
88
89        $('#contrasts').click(function () {
90            var id = $('#sogo_contrasts_css');
91            if (id.length > 0) {
92                eraseCookie('sogo_contrasts');
93                id.remove();
94            } else {
95                createCookie('sogo_contrasts', 'true', 365);
96                var file = $(this).data('css');
97                loadjscssfile(file, 'css','sogo_contrasts_css');
98            }
99            body.toggleClass('sogo_contrasts');
100            $('#sogoacc').slideUp();
101        });
102
103        $('#contrasts_white').click(function () {
104            var id = $('#sogo_contrasts_css_white');
105            if (id.length > 0) {
106                eraseCookie('sogo_contrasts_white');
107                id.remove();
108            } else {
109                createCookie('sogo_contrasts_white', 'true', 365);
110                var file = $(this).data('css');
111                loadjscssfile(file, 'css','sogo_contrasts_css_white');
112            }
113            body.toggleClass('sogo_contrasts_white');
114            $('#sogoacc').slideUp();
115        });
116        $('#animation_off').click(function () {
117            if (body.hasClass('sogo_blank_white')) {
118                eraseCookie('sogo_animation_off');
119            } else {
120                createCookie('sogo_animation_off', 'true', 365);
121            }
122            body.toggleClass('sogo_animation_off');
123            $('#sogoacc').slideUp();
124        });
125
126        $('#readable_font').click(function () {
127            if (body.hasClass('sogo_readable_font')) {
128                eraseCookie('sogo_readable_font');
129            } else {
130                createCookie('sogo_readable_font', 'true', 365);
131            }
132            body.toggleClass('sogo_readable_font');
133            $('#sogoacc').slideUp();
134        });
135        $('#underline_links').click(function () {
136            if (body.hasClass('sogo_underline_links')) {
137                eraseCookie('sogo_underline_links');
138            } else {
139                createCookie('sogo_underline_links', 'true', 365);
140            }
141            body.toggleClass('sogo_underline_links');
142            $('#sogoacc').slideUp();
143        });
144
145
146
147
148        $('#sogo_a1').click(function () {
149            eraseCookie('sogo_font_increase');
150            eraseCookie('sogo_font_2');
151            eraseCookie('sogo_font_3');
152            location.reload();
153        });
154
155        $('#sogo_a2').click(function () {
156            createCookie('sogo_font_2', 'true', 365);
157            eraseCookie('sogo_font_3');
158            sogo_change_font_cookie($(this).data('size'));
159
160        });
161
162        $('#sogo_a3').click(function () {
163            createCookie('sogo_font_3', 'true', 365);
164            eraseCookie('sogo_font_2');
165            sogo_change_font_cookie($(this).data('size'));
166        });
167
168        function sogo_change_font_cookie(increase){
169            var storeVal = readCookie('sogo_font_increase');
170            if (storeVal && storeVal == increase) {
171                return false;
172            }
173            createCookie('sogo_font_increase', increase, 365);
174            location.reload();
175        }
176
177        function sogo_change_fonts() {
178            var increase = readCookie('sogo_font_increase');
179            if(increase){
180                $('p,span,a,h1,h2,h3,h4,h5,h6').each(function () {
181                    var fontsize;
182                    fontsize = parseInt($(this).css('font-size')) * increase;
183                    $(this).css({
184                        'font-size': fontsize + "px"
185                    });
186                });
187            }
188        }
189
190        function sogo_set_accessibility(){
191
192
193            // Thanks to WebAIM.org
194            if (document.location.hash && document.location.hash != '#') {
195                var anchorUponArrival = document.location.hash;
196                setTimeout(function () {
197                    $(anchorUponArrival).scrollTo({duration: 1500});
198                    $(anchorUponArrival).focus();
199                }, 100);
200            }
201        }
202
203
204
205
206
207
208    });
209    $(window).load(function(){
210        // set image alt
211        $("img").each(function () {
212            var img = $(this);
213            if (!img.attr("alt") )
214                img.attr("alt", "");
215        });
216
217    });
218
219})(jQuery);
220
221
222// load file js/css via js
223function loadjscssfile(filename, filetype, id ) {
224    if (filetype == "js") { //if filename is a external JavaScript file
225        // alert('called');
226        var fileref = document.createElement('script')
227        fileref.setAttribute("type", "text/javascript")
228        fileref.setAttribute("src", filename)
229    }
230    else if (filetype == "css") { //if filename is an external CSS file
231        var fileref = document.createElement("link")
232        fileref.setAttribute("id", id)
233        fileref.setAttribute("rel", "stylesheet")
234        fileref.setAttribute("type", "text/css")
235        fileref.setAttribute("href", filename)
236    }
237    if (typeof fileref != "undefined")
238        document.getElementsByTagName("head")[0].appendChild(fileref)
239}
240
241function createCookie(name, value, days) {
242    if (days) {
243        var date = new Date();
244        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
245        var expires = "; expires=" + date.toGMTString();
246    } else
247        var expires = "";
248    document.cookie = name + "=" + value + expires + "; path=/";
249}
250
251function readCookie(name) {
252    var nameEQ = name + "=";
253    var ca = document.cookie.split(';');
254    for (var i = 0; i < ca.length; i++) {
255        var c = ca[i];
256        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
257        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
258    }
259    return null;
260}
261function eraseSogoCookie( ) {
262    var nameEQ = name + "=";
263    var ca = document.cookie.split(';');
264    for (var i = 0; i < ca.length; i++) {
265        var c = ca[i];
266        if(c.indexOf('sogo') > 0){
267            var e = c.indexOf('=');
268            eraseCookie(c.substring(0,e));
269        }
270    }
271    return null;
272}
273function eraseCookie(name) {
274    // createCookie(name, "", -1);
275    createCookie(name, "");
276}

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.