PageSourceSearch

https://keralaprisons.gov.in/assets/js/main.js?v=19

js keralaprisons.gov.in collected 2026-10-02 12:54:45 UTC 41,816 bytes, 952 lines download raw bytes

1(function ($) {
2
3    "use strict";
4
5    //Update Header Style and Scroll to Top
6    function headerStyle() {
7        if ($('.header-section').length) {
8            var windowpos = $(window).scrollTop();
9            var siteHeader = $('.header-section');
10            var scrollLink = $('.scroll-top');
11            if (windowpos >= 110) {
12                siteHeader.addClass('fixed-header');
13                scrollLink.addClass('open');
14            } else {
15                siteHeader.removeClass('fixed-header');
16                scrollLink.removeClass('open');
17            }
18        }
19    }
20
21    headerStyle();
22
23    //Submenu Dropdown Toggle
24    if ($('.header-section li.dropdown ul').length) {
25        $('.header-section .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fas fa-angle-down"></span></div>');
26
27    }
28
29    //Mobile Nav Hide Show
30    if ($('.mobile-menu').length) {
31
32        //$('.mobile-menu .menu-box').mCustomScrollbar();
33
34        var mobileMenuContent = $('.header-section .menu-area .main-menu').html();
35        $('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent);
36        $('.sticky-header .main-menu').append(mobileMenuContent);
37
38        //Dropdown Button
39        $('.mobile-menu li.dropdown a').on('click', function () {
40            $(this).toggleClass('open');
41            $(this).next('ul').slideToggle(500);
42        });
43        //Dropdown Button
44        //$('.mobile-menu li.dropdown .dropdown-btn').on('click', function () {
45        //    $(this).prev('.megamenu').slideToggle(900);
46        //});
47        //Menu Toggle Btn
48        $('.mobile-nav-toggler').on('click', function () {
49            $('body').addClass('mobile-menu-visible');
50        });
51
52        //Menu Toggle Btn
53        $('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function () {
54            $('body').removeClass('mobile-menu-visible');
55        });
56    }
57
58
59    if ($('.scroll-to-target').length) {
60        $(".scroll-to-target").on('click', function () {
61            var target = $(this).attr('data-target');
62            $('html, body').animate({
63                scrollTop: $(target).offset().top
64            }, 1000);
65
66        });
67    }
68
69    (function () {
70        var $gallery1 = new SimpleLightbox('.gallery-slider a', {});
71
72        //Photo gallery page
73        //var $gallery2 = new SimpleLightbox('.photo-gallery a', {});
74    })();
75
76    if ($('.banner-carousel').length) {
77        $('.banner-carousel').owlCarousel({
78            loop: true,
79            margin: 0,
80            nav: true,
81            animateOut: 'fadeOut',
82            animateIn: 'fadeIn',
83            active: true,
84            smartSpeed: 1000,
85            autoplay: 6000,
86            navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>'],
87            responsive: {
88                0: {
89                    items: 1
90                },
91                600: {
92                    items: 1
93                },
94                800: {
95                    items: 1
96                },
97                1024: {
98                    items: 1
99                }
100            }
101        });
102    }
103
104    if ($('.latest-updates-carousel').length) {
105        $('.latest-updates-carousel').owlCarousel({
106            loop: true,
107            margin: 0,
108            nav: true,
109            smartSpeed: 1000,
110            autoplay: 500,
111            navText: ['<span class="fas fa-arrow-left"></span>', '<span class="fas fa-arrow-right"></span>'],
112            responsive: {
113                0: {
114                    items: 1
115                },
116                480: {
117                    items: 1
118                },
119                600: {
120                    items: 1
121                },
122                800: {
123                    items: 1
124                },
125                1024: {
126                    items: 1
127                }
128            }
129        });
130    }
131
132    if ($('.gallery-slider').length) {
133        $('.gallery-slider').owlCarousel({
134            loop: true,
135            margin: 0,
136            nav: true,
137            smartSpeed: 3000,
138            autoplay: true,
139            navText: ['<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>'],
140            responsive: {
141                0: {
142                    items: 1
143                },
144                480: {
145                    items: 2
146                },
147                600: {
148                    items: 3
149                },
150                800: {
151                    items: 4
152                },
153                1200: {
154                    items: 4
155                }
156
157            }
158        });
159    }
160
161    $(window).on('scroll', function () {
162        headerStyle();
163    });
164})(window.jQuery);
165
166/*--------------------------------- Set div height same ---------------------------------*/
167
168$(document).ready(function () {
169    var highestBox = 0;
170
171    $('.team-section .lower-content', this).each(function () {
172
173        if ($(this).height() > highestBox) {
174            highestBox = $(this).height();
175        }
176
177    });
178
179    $('.team-section .lower-content', this).height(highestBox);
180
181
182    var highestBox2 = 0;
183
184    $('.eprison-section .inner', this).each(function () {
185
186        if ($(this).height() > highestBox2) {
187            highestBox2 = $(this).height();
188        }
189
190    });
191
192    $('.eprison-section .inner', this).height(highestBox2);
193
194    var highestBox3 = 0;
195
196    $('.cmd-dg-section .lower-content', this).each(function () {
197
198        if ($(this).height() > highestBox3) {
199            highestBox3 = $(this).height();
200        }
201
202    });
203
204    $('.cmd-dg-section .lower-content', this).height(highestBox3);
205});
206
207
208/*--------------------------------- Photo Gallery ---------------------------------*/
209
210$(window).on("load", function () { // makes sure the whole site is loaded
211    $('#status').fadeOut(); // will first fade out the loading animation
212    $('#preloader').delay(50).fadeOut(100); // will fade out the white DIV that covers the website.
213    $('body').delay(50).css({ 'overflow': 'visible' });
214})
215
216function SwitchToMalayalam() {
217    var currentUrl = window.location.pathname;
218    window.location.href = 'malayalam' + currentUrl;
219}
220
221/*--------------------------------- Slide image onclick open in new tab ---------------------------------*/
222
223$(".slide-section .owl-carousel .slide-item").on("click", function (e) {
224
225    var url = $(this).find('.image-layer').attr("data-url");
226
227    if (url !== undefined) {
228        var win = window.open(url, '_blank');
229        if (win) {
230            //Browser has allowed it to be opened
231            win.focus();
232        } else {
233            //Browser has blocked it
234            alert('Please allow popups for this website');
235        }
236    }
237
238    //var bg_url = $(this).find('.image-layer').css('background-image');
239
240    //bg_url = /^url\((['"]?)(.*)\1\)$/.exec(bg_url);
241    //bg_url = bg_url ? bg_url[2] : ""; 
242
243    //var win = window.open(bg_url, '_blank');
244    //if (win) {
245    //    //Browser has allowed it to be opened
246    //    win.focus();
247    //} else {
248    //    //Browser has blocked it
249    //    alert('Please allow popups for this website');
250    //}
251});
252
253
254/*--------------------------------- All Photo gallery popup ---------------------------------*/
255
256$(document).ready(function () {
257    $("area[rel^='prettyPhoto']").prettyPhoto();
258
259    $(".gallery-container:first a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'normal', theme: 'light_square', slideshow: 3000, autoplay_slideshow: false });
260    $(".gallery-container:gt(0) a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'fast', slideshow: 10000, hideflash: true });
261});
262
263
264/*--------------------------------- Show date and time ---------------------------------*/
265
266$(document).ready(function () {
267    ShowDateTime();
268    setInterval(ShowDateTime, 10000);
269});
270
271function ShowDateTime() {
272    var now = dateFormat(new Date(), "dddd, mmmm dS, yyyy, h:MM TT");
273    $('#current_time').html(now);
274}
275
276
277/*--------------------------------- Find an Institution ---------------------------------*/
278
279$(document).ready(function () {
280    var districtJsonList = {
281        "districtTable":
282            [
283                { "districtID": "1", "district": "Thiruvananthapuram" },
284                { "districtID": "2", "district": "Kollam" },
285                { "districtID": "3", "district": "Pathananthitta" },
286                { "districtID": "4", "district": "Alappuzha" },
287                { "districtID": "5", "district": "Kottayam" },
288                { "districtID": "6", "district": "Iduki" },
289                { "districtID": "7", "district": "Ernakulam" },
290                { "districtID": "8", "district": "Thrissur" },
291                { "districtID": "9", "district": "Palakkad" },
292                { "districtID": "10", "district": "Malappuram" },
293                { "districtID": "11", "district": "Kozhikode" },
294                { "districtID": "12", "district": "Wayanad" },
295                { "districtID": "13", "district": "Kannur" },
296                { "districtID": "14", "district": "Kasaragod" },
297            ]
298    };
299    var institutionJsonList = {
300        "Thiruvananthapuram":
301            [
302                { "institution": "DIG(SZ) Office & SICA, Thiruvananthapuram", "pageUrl": "dig-office.html" },
303                { "institution": "Central Prison & Correctional Home,Thiruvananthapuram", "pageUrl": "central-prison-poojappura.html" },
304                { "institution": "Open Prison & Correctional Home, Nettukalthery", "pageUrl": "open-prison-nettukaltheri.html" },
305                { "institution": "District Jail, Thiruvananthapuram", "pageUrl": "district-jail-thiruvananthapuram.html" },
306                { "institution": "Women Prison & Correctional Home, Thiruvananathapuram", "pageUrl": "women-prison-thiruvananthapuram.html" },
307                { "institution": "Women Open Prison & Correctional Home, Thiruvananathapuram", "pageUrl": "womens-open-prison-poojappura.html" },
308                { "institution": "Special Sub Jail, Thiruvananthapuram", "pageUrl": "special-sub-jail-thiruvananthapuram.html" },
309                { "institution": "Special Sub Jail, Neyyattinkara", "pageUrl": "special-sub-jail-neyyattinkara.html" },
310                { "institution": "Sub Jail, Attingal", "pageUrl": "sub-jail-attingal.html" },
311            ],
312        "Kollam":
313            [
314                { "institution": "District Jail, Kollam", "pageUrl": "district-jail-kollam.html" },
315                { "institution": "Special Sub Jail, Kottarakkara", "pageUrl": "special-sub-jail-kottarakkara.html" },
316            ],
317        "Pathananthitta":
318            [
319                { "institution": "District Jail, Pathanamthitta", "pageUrl": "district-jail-pathanamthitta.html" },
320            ],
321        "Alappuzha":
322            [
323                { "institution": "District Jail, Alappuzha", "pageUrl": "district-jail-alapuzha.html" },
324                { "institution": "Special Sub Jail, Mavelikkara", "pageUrl": "special-sub-jail-mavelikkara.html" },
325                { "institution": "Sub Jail, Alappuzha", "pageUrl": "sub-jail-alapuzha.html" },
326            ],
327        "Kottayam":
328            [
329                { "institution": "District Jail, Kottayam", "pageUrl": "district-jail-kottayam.html" },
330                { "institution": "Special Sub Jail, Ponkunnam", "pageUrl": "special-sub-jail-ponkunnam.html" },
331                { "institution": "Sub Jail, Pala", "pageUrl": "sub-jail-meenachil.html" },
332            ],
333        "Iduki":
334            [
335                { "institution": "District Jail, Iduki (Muttom)", "pageUrl": "district-jail-idukki.html" },
336                { "institution": "Special Sub Jail, Devikulam", "pageUrl": "special-sub-jail-devikulam.html" },
337                { "institution": "Sub Jail, Peerumed", "pageUrl": "sub-jail-peerumade.html" },
338            ],
339        "Ernakulam":
340            [
341                { "institution": "District Jail, Ernakulam", "pageUrl": "district-jail-ernakulam.html" },
342                { "institution": "Special Sub Jail, Moovattupuzha", "pageUrl": "special-sub-jail-muvattupuzha.html" },
343                { "institution": "Borstal School, Thikkakkara", "pageUrl": "borstal-school.html" },
344                { "institution": "Sub Jail, Ernakulam", "pageUrl": "sub-jail-ernakulam.html" },
345                { "institution": "Sub Jail, Aluva", "pageUrl": "sub-jail-aluva.html" },
346                { "institution": "Sub Jail, Mattancherry", "pageUrl": "sub-jail-mattancherry.html" },
347            ],
348        "Thrissur":
349            [
350                { "institution": "DIG(CZ) Office, Viyyur", "pageUrl": "dig-office.html" },
351                { "institution": "Central Prison & Correctional Home, Viyyur", "pageUrl": "central-prison-viyyur.html" },
352                { "institution": "High Security Prison, Viyyur", "pageUrl": "high-security-prison-viyyur.html" },
353                { "institution": "District Jail, Viyyur", "pageUrl": "district-jail-thrissur.html" },
354                { "institution": "SICA Extension centre, Viyyur", "pageUrl": "sica.html" },
355                { "institution": "Women Prison & Correctional Home, Viyyur", "pageUrl": "women-prison-viyyur.html" },
356                { "institution": "Special Sub Jail, Irinjalakkuda", "pageUrl": "special-sub-jail-irinjalakkuda.html" },
357                { "institution": "Sub Jail, Viyyur", "pageUrl": "sub-jail-viyyur.html" },
358                { "institution": "Sub Jail, Chavakkad", "pageUrl": "sub-jail-chavakkad.html" },
359            ],
360        "Palakkad":
361            [
362                { "institution": "District Jail, Palakkad (Malambuzha)", "pageUrl": "district-jail-palakkad.html" },
363                { "institution": "Special Sub Jail, Chittur", "pageUrl": "special-sub-jail-chittoor.html" },
364                { "institution": "Sub Jail, Alathur", "pageUrl": "sub-jail-alathur.html" },
365                { "institution": "Sub Jail, Ottapalam", "pageUrl": "sub-jail-ottappalam.html" },
366            ],
367        "Malappuram":
368            [
369                { "institution": "Central Prison & Correctional Home, Tavanur", "pageUrl": "central-prison-thavanoor.html" },
370                { "institution": "Special Sub Jail, Manjeri", "pageUrl": "special-sub-jail-manjeri.html" },
371                { "institution": "Sub Jail, Perinthalmanna", "pageUrl": "sub-jail-perinthalmanna.html" },
372                { "institution": "Sub Jail, Tirur", "pageUrl": "sub-jail-tirur.html" },
373                { "institution": "Sub Jail, Ponnani", "pageUrl": "sub-jail-ponnani.html" },
374            ],
375        "Kozhikode":
376            [
377                { "institution": "DIG (NZ) Office, Kozhikode", "pageUrl": "dig-office.html" },
378                { "institution": "District Jail, Kozhikode", "pageUrl": "district-jail-kozhikkode.html" },
379                { "institution": "Special Sub Jail, Kozhikode", "pageUrl": "special-sub-jail-kozhikkode.html" },
380                { "institution": "Sub Jail, Koilandy", "pageUrl": "sub-jail-koyilandy.html" },
381                { "institution": "Sub Jail, Vatakara", "pageUrl": "sub-jail-vadakara.html" },
382            ],
383        "Wayanad":
384            [
385                { "institution": "District Jail, Wayanad (Mananthavadi)", "pageUrl": "district-jail-wayanad.html" },
386                { "institution": "Special Sub Jail, Vythiri", "pageUrl": "special-sub-jail-vythiri.html" },
387            ],
388        "Kannur":
389            [
390                { "institution": "Central Prison & Correctional Home, Kannur", "pageUrl": "central-prison-kannur.html" },
391                { "institution": "District Jail, Kannur", "pageUrl": "district-jail-kannur.html" },
392                { "institution": "Women Prison & Correctional Home, Kannur", "pageUrl": "women-prison-kannur.html" },
393                { "institution": "SICA Extension Centre, Kannur", "pageUrl": "sica.html" },
394                { "institution": "Special Sub Jail, Thalaserry", "pageUrl": "special-sub-jail-thalaserry.html" },
395                { "institution": "Special Sub Jail, Kannur", "pageUrl": "special-sub-jail-kannur.html" },
396                { "institution": "Special Sub Jail, Koothuparambu", "pageUrl": "special-sub-jail-Koothuparambu.html" },
397                { "institution": "Sub Jail, Kannur", "pageUrl": "sub-jail-kannur.html" },
398            ],
399        "Kasaragod":
400            [
401                { "institution": "Open Prison & Correctional Home, Cheemeni", "pageUrl": "open-prison-cheemeni.html" },
402                { "institution": "District Jail, Hosdurg, Kasargod", "pageUrl": "district-jail-kasaragod.html" },
403                { "institution": "Special Sub Jail, Kasaragod", "pageUrl": "special-sub-jail-kasaragod.html" },
404            ],
405    };
406
407    var DistrictListItems = "";
408    DistrictListItems += "<option value='0'>Select district</option>";
409
410    for (var i = 0; i < districtJsonList.districtTable.length; i++) {
411        DistrictListItems += "<option value='" + districtJsonList.districtTable[i].districtID + "'>" + districtJsonList.districtTable[i].district + "</option>";
412    }
413
414    $("#ddlDistrict").html(DistrictListItems);
415
416    var populateInstitutionDropdown = function (district) {
417        var listItems = "";
418        listItems += "<option value=''>Select institution</option>";
419
420        if (institutionJsonList[district] !== undefined) {
421            for (var i = 0; i < institutionJsonList[district].length; i++) {
422                listItems += "<option value='" + institutionJsonList[district][i].pageUrl + "'>
422" + institutionJsonList[district][i].institution + "</option>";
423            }
424        }
425
426        $("select#ddlInstitution").html(listItems);
427    }
428
429    $("select#ddlDistrict").on('change', function () {
430        var district = $('#ddlDistrict option:selected').text();
431        populateInstitutionDropdown(district);
432    });
433
434    $("select#ddlInstitution").on('change', function () {
435        var url = $('#ddlInstitution option:selected').val();
436
437        if (url !== '') {
438            window.location.href = url;
439        }
440    });
441});
442
443//Implemented as per UO Note KPCS/6227/2025-E1 dated 19-01-2026
444//Accessibility options as pr persons with disabilities
445(function () {
446    // Prevent duplicate loading
447    if (document.getElementById("uw-main")) return;
448
449    // Load UX4G CSS
450    function loadCSS(href) {
451        var link = document.createElement("link");
452        link.rel = "stylesheet";
453        link.href = href;
454        document.head.appendChild(link);
455    }
456
457    loadCSS("https://img1.digitallocker.gov.in/ux4g/UX4G-CDN-accessibility/css/accesibility-style-v2.1.css");
458
459    // Create container
460    var container = document.createElement("div");
461    container.innerHTML = `<!-- accessibility panel -->
462<div class="uwaw uw-light-theme gradient-head uwaw-initial paid_widget" id="uw-main">
463    <div class="relative second-panel">
464        <h3>Accessibility options by UX4G</h3>
465        <div class="uwaw-close"></div>
466    </div>
467    <div class="uwaw-body">
468        <div class="h-scroll">
469            <div class="uwaw-features">
470                <div class="uwaw-features__item reset-feature" id="featureItem_sp">
471                    <button id="speak"
472                            class="uwaw-features__item__i"
473                            data-uw-reader-content="Enable the UserWay screen reader"
474                            aria-label="Enable the UserWay screen reader"
475                            aria-pressed="false">
476                        <span class="uwaw-features__item__icon">
477                            <span class="ux4g-icon icon-speaker"> </span>
478                        </span>
479                        <span class="uwaw-features__item__name">Text To Speech</span>
480                        <span class="tick-active uwaw-features__item__enabled reset-tick"
481                              id="tickIcon_sp"
482                              >
483                        </span>
484                    </button>
485                </div>
486                <div class="uwaw-features__item reset-feature" id="featureItem">
487                    <button id="btn-s9"
488                            class="uwaw-features__item__i"
489                            data-uw-reader-content="Enable the UserWay screen reader"
490                            aria-label="Enable the UserWay screen reader"
491                            aria-pressed="false">
492                        <span class="uwaw-features__item__icon">
493                            <span class="ux4g-icon icon-bigger-text"> </span>
494                        </span><span class="uwaw-features__item__name">Bigger Text</span>
495                        <div class="uwaw-features__item__steps reset-steps"
496                             id="featureSteps">
497                            <!-- Steps span tags will be dynamically added here -->
498                        </div>
499                        <span class="tick-active uwaw-features__item__enabled reset-tick"
500                              id="tickIcon"
501                              >
502                        </span>
503                    </button>
504                </div>
505                <div class="uwaw-features__item reset-feature" id="featureItem-st">
506                    <button id="btn-small-text"
507                            class="uwaw-features__item__i"
508                            data-uw-reader-content="Enable the UserWay screen reader"
509                            aria-label="Enable the UserWay screen reader"
510                            aria-pressed="false">
511                        <span class="uwaw-features__item__icon">
512                            <span class="ux4g-icon icon-small-text"> </span>
513                        </span><span class="uwaw-features__item__name">Small Text</span>
514                        <div class="uwaw-features__item__steps reset-steps"
515                             id="featureSteps-st">
516                            <!-- Steps span tags will be dynamically added here -->
517                        </div>
518                        <span class="tick-active uwaw-features__item__enabled reset-tick"
519                              id="tickIcon-st"
520                              >
521                        </span>
522                    </button>
523                </div>
524                <div class="uwaw-features__item reset-feature" id="featureItem-lh">
525                    <button id="btn-s12"
526                            class="uwaw-features__item__i"
527                            data-uw-reader-content="Enable the UserWay screen reader"
528                            aria-label="Enable the UserWay screen reader"
529                            aria-pressed="false">
530                        <span class="uwaw-features__item__icon">
531                            <span class="ux4g-icon icon-line-hight"> </span>
532                        </span>
533                        <span class="uwaw-features__item__name">Line Height</span>
534                        <div class="uwaw-features__item__steps reset-steps"
535                             id="featureSteps-lh">
536                            <!-- Steps span tags will be dynamically added here -->
537                        </div>
538                        <span class="tick-active uwaw-features__item__enabled reset-tick"
539                              id="tickIcon-lh"
540                              >
541                        </span>
542                    </button>
543                </div>
544                <div class="uwaw-features__item reset-feature" id="featureItem-ht">
545                    <button id="btn-s10"
546                            class="uwaw-features__item__i"
547                            data-uw-reader-content="Enable the UserWay screen reader"
548                            aria-label="Enable the UserWay screen reader"
549                            aria-pressed="false">
550                        <span class="uwaw-features__item__icon">
551                            <span class="ux4g-icon icon-highlight-links"> </span>
552                        </span>
553                        <span class="uwaw-features__item__name">Highlight Links</span>
554                        <span class="tick-active uwaw-features__item__enabled reset-tick"
555                              id="tickIcon-ht"
556                              >
557                        </span>
558                    </button>
559                </div>
560                <div class="uwaw-features__item reset-feature" id="featureItem-ts">
561                    <button id="btn-s13"
562                            class="uwaw-features__item__i"
563                            data-uw-reader-content="Enable the UserWay screen reader"
564                            aria-label="Enable the UserWay screen reader"
565                            aria-pressed="false">
566                        <span class="uwaw-features__item__icon">
567                            <span class="ux4g-icon icon-text-spacing"> </span>
568                        </span>
569                        <span class="uwaw-features__item__name">Text Spacing</span>
570                        <div class="uwaw-features__item__steps reset-steps"
571                             id="featureSteps-ts">
572                            <!-- Steps span tags will be dynamically added here -->
573                        </div>
574                        <span class="tick-active uwaw-features__item__enabled reset-tick"
575                              id="tickIcon-ts"
576                              >
577                        </span>
578                    </button>
579                </div>
580                <div class="uwaw-features__item reset-feature" id="featureItem-df">
581                    <button id="btn-df"
582                            class="uwaw-features__item__i"
583                            data-uw-reader-content="Enable the UserWay screen reader"
584                            aria-label="Enable the UserWay screen reader"
585                            aria-pressed="false">
586                        <span class="uwaw-features__item__icon">
587                            <span class="ux4g-icon icon-dyslexia-font"> </span>
588                        </span>
589                        <span class="uwaw-features__item__name">Dyslexia Friendly</span>
590                        <span class="tick-active uwaw-features__item__enabled reset-tick"
591                              id="tickIcon-df"
592                              >
593                        </span>
594                    </button>
595                </div>
596                <div class="uwaw-features__item reset-feature" id="featureItem-hi">
597                    <button id="btn-s11"
598                            class="uwaw-features__item__i"
599                            data-uw-reader-content="Enable the UserWay screen reader"
600                            aria-label="Enable the UserWay screen reader"
601                            aria-pressed="false">
602                        <span class="uwaw-features__item__icon">
603                            <span class="ux4g-icon icon-hide-images"> </span>
604                        </span>
605                        <span class="uwaw-features__item__name">Hide Images</span>
606                        <span class="tick-active uwaw-features__item__enabled reset-tick"
607                              id="tickIcon-hi"
608                              >
609                        </span>
610                    </button>
611                </div>
612                <div class="uwaw-features__item reset-feature"
613                     id="featureItem-Cursor">
614                    <button id="btn-cursor"
615                            class="uwaw-features__item__i"
616                            data-uw-reader-content="Enable the UserWay screen reader"
617                            aria-label="Enable the UserWay screen reader"
618                            aria-pressed="false">
619                        <span class="uwaw-features__item__icon">
620                            <span class="ux4g-icon icon-cursor"> </span>
621                        </span>
622                        <span class="uwaw-features__item__name">Cursor</span>
623                        <span class="tick-active uwaw-features__item__enabled reset-tick"
624                              id="tickIcon-cursor"
625                              >
626                        </span>
627                    </button>
628                </div>
629                <div class="uwaw-features__item reset-feature"
630                     id="featureItem-ht-dark">
631                    <button id="dark-btn"
632                            class="uwaw-features__item__i"
633                            data-uw-reader-content="Enable the UserWay screen reader"
634                            aria-label="Enable the UserWay screen reader"
635                            aria-pressed="false">
636                        <span class="uwaw-features__item__name">
637                            <span class="light_dark_icon">
638                                <input type="checkbox"
639                                       class="light_mode uwaw-featugres__item__i"
640                                       id="checkbox" />
641                                <label for="checkbox" class="checkbox-label">
642                                    <!-- <i class="fas fa-moon-stars"></i> -->
643                                    <i class="fas fa-moon-stars">
644                                        <span class="ux4g-icon icon-moon"></span>
645                                    </i>
646                                    <i class="fas fa-sun">
647                                        <span class="ux4g-icon icon-sun"></span>
648                                    </i>
649                                    <span class="ball"></span>
650                                </label>
651                            </span>
652                            <span class="uwaw-features__item__name">Light-Dark</span>
653                        </span>
654                        <span class="tick-active uwaw-features__item__enabled reset-tick"
655                              id="tickIcon-ht-dark"
656                              >
657                        </span>
658                    </button>
659                </div>
660                <!-- Invert Colors Widget -->
661                <div class="uwaw-features__item reset-feature" id="featureItem-ic">
662                    <button id="btn-invert"
663                            class="uwaw-features__item__i"
664                            data-uw-reader-content="Enable the UserWay screen reader"
665                            aria-label="Enable the UserWay screen reader"
666                            aria-pressed="false">
667                        <span class="uwaw-features__item__icon">
668                            <span class="ux4g-icon icon-invert"> </span>
669                        </span>
670                        <span class="uwaw-features__item__name">Invert Colors</span>
671                        <span class="tick-active uwaw-features__item__enabled reset-tick"
672                              id="tickIcon-ic"
673                              >
674                        </span>
675                    </button>
676                </div>
677            </div>
678        </div>
679        <!-- Reset Button -->
680    </div>
681    <div class="reset-panel">
682        <!-- copyright accessibility bar -->
683        <div class="copyrights-accessibility">
684            <button class="btn-reset-all" id="reset-all">
685                <span class="reset-icon"> </span>
686                <span class="reset-btn-text">Reset All Settings</span>
687            </button>
688            <a href="https://www.ux4g.gov.in" target="_blank" class="copyright-text" contenteditable="false">
689                <span class="uwaw-features__item__name ux4g-copy ux4g-copyright">Created by</span>
690                <img src="/assets/images/ux4g-logo.png" alt="logo" loading="lazy">
691            </a>
692        </div>
693    </div>
694</div>
695<button id="uw-widget-custom-trigger"
696        class="uw-widget-custom-trigger"
697        aria-label="Accessibility Widget"
698        data-uw-trigger="true"
699        aria-haspopup="dialog">
700    <img src="data:image/svg+xml,%0A%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_1_1506)'%3E%3Cpath d='M16 7C15.3078 7 14.6311 6.79473 14.0555 6.41015C13.4799 6.02556 13.0313 5.47894 12.7664 4.83939C12.5015 4.19985 12.4322 3.49612 12.5673 2.81719C12.7023 2.13825 13.0356 1.51461 13.5251 1.02513C14.0146 0.535644 14.6383 0.202301 15.3172 0.0672531C15.9961 -0.0677952 16.6999 0.00151652 17.3394 0.266423C17.9789 0.53133 18.5256 0.979934 18.9101 1.55551C19.2947 2.13108 19.5 2.80777 19.5 3.5C19.499 4.42796 19.1299 5.31762 18.4738 5.97378C17.8176 6.62994 16.928 6.99901 16 7Z' fill='white'/%3E%3Cpath d='M27 7.05L26.9719 7.0575L26.9456 7.06563C26.8831 7.08313 26.8206 7.10188 26.7581 7.12125C25.595 7.4625 19.95 9.05375 15.9731 9.05375C12.2775 9.05375 7.14313 7.67875 5.50063 7.21188C5.33716 7.14867 5.17022 7.09483 5.00063 7.05063C3.81313 6.73813 3.00063 7.94438 3.00063 9.04688C3.00063 10.1388 3.98188 10.6588 4.9725 11.0319V11.0494L10.9238 12.9081C11.5319 13.1413 11.6944 13.3794 11.7738 13.5856C12.0319 14.2475 11.8256 15.5581 11.7525 16.0156L11.39 18.8281L9.37813 29.84C9.37188 29.87 9.36625 29.9006 9.36125 29.9319L9.34688 30.0112C9.20188 31.0206 9.94313 32 11.3469 32C12.5719 32 13.1125 31.1544 13.3469 30.0037C13.5813 28.8531 15.0969 20.1556 15.9719 20.1556C16.8469 20.1556 18.6494 30.0037 18.6494 30.0037C18.8838 31.1544 19.4244 32 20.6494 32C22.0569 32 22.7981 31.0162 22.6494 30.0037C22.6363 29.9175 22.6206 29.8325 22.6019 29.75L20.5625 18.8294L20.2006 16.0169C19.9387 14.3788 20.1494 13.8375 20.2206 13.7106C20.2225 13.7076 20.2242 13.7045 20.2256 13.7013C20.2931 13.5763 20.6006 13.2963 21.3181 13.0269L26.8981 11.0763C26.9324 11.0671 26.9662 11.0563 26.9994 11.0438C27.9994 10.6688 28.9994 10.15 28.9994 9.04813C28.9994 7.94625 28.1875 6.73813 27 7.05Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1_1506'%3E%3Crect width='32' height='32' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A">
701    <span>Accessibility Options</span>
702</button>
703<!-- accessibility panel end-->`;
704
705    document.body.appendChild(container);
706
707    // Load UX4G scripts
708    var s1 = document.createElement("script");
709    s1.src = "https://img1.digitallocker.gov.in/ux4g/UX4G-CDN-accessibility/js/weights-v1.js";
710    document.body.appendChild(s1);
711
712    var s2 = document.createElement("script");
713    s2.src = "https://cdn.ux4g.gov.in/[email protected]/js/ux4g.min.js";
714    document.body.appendChild(s2);
715
716})();
717
718$(document).ready(function () {
719
720    // Close panel
721    $(document).on("click", ".uwaw-close", function () {
722        closeMain();
723    });
724
725    // Highlight Links
726    $(document).on("click", "#btn-s10", function () {
727        highlightLinks();
728    });
729
730    // Text Spacing
731    $(document).on("click", "#btn-s13", function () {
732        increaseAndReset();
733    });
734
735    // Dyslexia Friendly
736    $(document).on("click", "#btn-df", function () {
737        toggleFontFeature();
738    });
739
740    // Hide Images
741    $(document).on("click", "#btn-s11", function () {
742        toggleImages();
743    });
744
745    // Cursor
746    $(document).on("click", "#btn-cursor", function () {
747        toggleCursorFeature();
748    });
749
750    // Reset All
751    $(document).on("click", "#reset-all", function () {
752        resetAll();
753    });
754
755});
756
757if (typeof chartData != 'undefined') {
758    var genderData = chartData.GenderData;
759    $('.chart-total-population').html(chartData.TotalPopulation);
760    $('.as-on-date').html(chartData.Date);
761
762    var genderList = [],
763        genderCountList = [],
764        sum = 0;
765
766    for (var i = 0; i < genderData.length; i++) {
767        genderList.push(genderData[i]['Gender'])
768        genderCountList.push(genderData[i]['Count'])
769
770        sum += genderData[i]['Count'];
771    }
772
773    var textInside = sum.toString();
774
775    var myChart = new Chart(document.getElementById('mychart'), {
776        type: 'doughnut',
777        animation: {
778            animateScale: true
779        },
780        data: {
781            labels: genderList,
782            datasets: [{
783                label: 'Visitor',
784                data: genderCountList,
785                backgroundColor: [
786                    "#a2d6c4",
787                    "#36A2EB",
788                    "#ff6384"
789                ]
790            }]
791        },
792        options: {
793            elements: {
794                center: {
795                    text: textInside
796                }
797            },
798            responsive: true,
799            legend: false,
800            legendCallback: function (chart) {
801                var legendHtml = [];
802                legendHtml.push('<ul>');
803                var item = chart.data.datasets[0];
804                for (var i = 0; i < item.data.length; i++) {
805                    legendHtml.push('<li>');
806                    legendHtml.push('<span class="chart-legend donut-chart-color-' + i + '"></span>');
807                    legendHtml.push('<span class="chart-legend-label-text">' + chart.data.labels[i] + ': ' + item.data[i] + '</span>');
808                    legendHtml.push('</li>');
809                }
810
811                legendHtml.push('</ul>');
812                return legendHtml.join("");
813            },
814            tooltips: {
815                enabled: true,
816                mode: 'label',
817                callbacks: {
818                    label: function (tooltipItem, data) {
819                        var indice = tooltipItem.index;
820                        return data.labels[indice] + ": " + data.datasets[0].data[indice];
821                    }
822                }
823            },
824        }
825    });
826
827    $('#my-legend-con').html(myChart.generateLegend());
828
829
830    var prisonerTypeData = chartData.PrisonerTypeData;
831
832    var prisonerTypeList = [],
833        prisonerCountList = [],
834        sum = 0;
835
836    for (var i = 0; i < prisonerTypeData.length; i++) {
837        prisonerTypeList.push(prisonerTypeData[i]['PrisonerType'])
838        prisonerCountList.push(prisonerTypeData[i]['Count'])
839
840        sum += prisonerTypeData[i]['Count'];
841    }
842
843    var ctx = document.getElementById("bar-chart");
844    var myChart2 = new Chart(ctx, {
845        type: 'bar',
846        data: {
847            labels: prisonerTypeList,
848            datasets: [{
849                label: 'Total',
850                data: prisonerCountList,
851                backgroundColor: [
852                    'rgba(255, 99, 132, 1)',
853                    'rgba(54, 162, 235, 1)',
854                    'rgba(255, 206, 86, 1)',
855                    'rgba(75, 192, 192, 1)',
856                    'rgba(153, 102, 255, 1)',
857                    'rgba(255, 159, 64, 1)',
858                ],
859                borderWidth: 1
860            }]
861        },
862        options: {
863            responsive: true,
864            legend: false,
865            legendCallback: function (chart) {
866                var legendHtml = [];
867                legendHtml.push('<ul>');
868                var item = chart.data.datasets[0];
869                for (var i = 0; i < item.data.length; i++) {
870                    legendHtml.push('<li>');
871                    legendHtml.push('<span class="chart-legend bar-chart-color-' + i + '"></span>');
872                    legendHtml.push('<span class="chart-legend-label-text">' + chart.data.labels[i] + ': ' + item.data[i] + '</span>');
873                    legendHtml.push('</li>');
874                }
875
876                legendHtml.push('</ul>');
877                return legendHtml.join("");
878            },
879            scales: {
880                xAxes: [{
881                    gridLines: {
882                        offsetGridLines: true // à rajouter
883                    }
884                },
885                ],
886                yAxes: [{
887                    ticks: {
888                        beginAtZero: true
889                    }
890                }]
891            }
892        }
893    });
894
895    $('#my-legend-con-2').html(myChart2.generateLegend());
896}
897
898$(function () {
899    if ($('#medalTabContent').length) {
900        var filterList = {
901            init: function () {
902                $('#medalTabContent').mixItUp({
903                    selectors: {
904                        target: '.tab-content-item',
905                        filter: '.filter'
906                    }
907                });
908            }
909        };
910
911        filterList.init();
912        $('#filters li:first span').addClass('active');
913    }
914});
915
916function handleLangSwitch(lang) {
917    let path = window.location.pathname;
918
919    if (path.endsWith('/')) {
920        path = path + 'index.html';
921    }
922
923    if (lang === 'ml') {
924        if (!path.startsWith('/malayalam/')) {
925            window.location.href = '/malayalam' + path;
926        }
927    } else {
928        if (path.startsWith('/malayalam/')) {
929            let newPath = path.replace('/malayalam', '');
930            window.location.href = newPath;
931        }
932    }
933}
934
935// Attach click events
936document.querySelectorAll('.lang-switch-ml').forEach(el => {
937    el.onclick = () => handleLangSwitch('ml');
938});
939
940document.querySelectorAll('.lang-switch-en').forEach(el => {
941    el.onclick = () => handleLangSwitch('en');
942});
943
944$(window).on('load', function () {
945    handlePreloader();
946});
947
948function handlePreloader() {
949    if ($('.loader-wrap').length) {
950        $('.loader-wrap').delay(300).fadeOut(500);
951    }
952}

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.