PageSourceSearch

https://www.corraldealmaguer.net/templates/jomi/styles/jomi/js/template.js

js corraldealmaguer.net collected 2026-10-02 14:25:17 UTC 3,780 bytes, 89 lines download raw bytes

1/* Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */
2
3(function ($) {
4
5    $(document).ready(function () {
6
7        var config = $('body').data('config') || {};
8
9        // Accordion menu
10        $('.menu-sidebar').accordionMenu({mode: 'slide'});
11
12        // Dropdown menu
13        $('#menu').dropdownMenu({mode: 'slide', dropdownSelector: 'div.dropdown'});
14
15        // Smoothscroller
16        $('a[href="#page"]').smoothScroller({duration: 500});
17
18        // Social buttons
19        $('article[data-permalink]').socialButtons(config);
20
21    });
22
23    $.onMediaQuery('(min-width: 960px)', {
24        init: function () {
25            if (!this.supported) this.matches = true;
26        },
27        valid: function () {
28            $.matchWidth('grid-block', '.grid-block', '.grid-h').match();
29            $.matchHeight('main', '#maininner, #sidebar-a, #sidebar-b').match();
30            $.matchHeight('top-a', '#top-a .grid-h', '.deepest').match();
31            $.matchHeight('top-b', '#top-b .grid-h', '.deepest').match();
32            $.matchHeight('bottom-a', '#bottom-a .grid-h', '.deepest').match();
33            $.matchHeight('bottom-a1', '#bottom-a1 .grid-h', '.deepest').match();
34            $.matchHeight('bottom-b', '#bottom-b .grid-h', '.deepest').match();
35            $.matchHeight('bottom-c', '#bottom-c .grid-h', '.deepest').match();
36            $.matchHeight('innertop', '#innertop .grid-h', '.deepest').match();
37            $.matchHeight('innerbottom', '#innerbottom .grid-h', '.deepest').match();
38            $('#slideshow .grid-h').matchHeight('.deepest');
39        },
40        invalid: function () {
41            $.matchWidth('grid-block').remove();
42            $.matchHeight('main').remove();
43            $.matchHeight('top-a').remove();
44            $.matchHeight('top-b').remove();
45            $.matchHeight('bottom-a').remove();
46            $.matchHeight('bottom-a1').remove();
47            $.matchHeight('bottom-b').remove();
48            $.matchHeight('bottom-c').remove();
49            $.matchHeight('innertop').remove();
50            $.matchHeight('innerbottom').remove();
51
52        }
53    });
54
55    var pairs = [];
56
57    $.onMediaQuery('(min-width: 480px) and (max-width: 959px)', {
58        valid: function () {
59            $.matchHeight('sidebars', '.sidebars-2 #sidebar-a, .sidebars-2 #sidebar-b').match();
60            pairs = [];
61            $.each(['.sidebars-1 #sidebar-a > .grid-box', '.sidebars-1 #sidebar-b > .grid-box', '#top-a .grid-h', '#top-b .grid-h', '#bottom-a .grid-h', '#bottom-b .grid-h', '#innertop .grid-h', '#innerbottom .grid-h'], function (i, selector) {
62                for (var i = 0, elms = $(selector), len = parseInt(elms.length / 2); i < len; i++) {
63                    var id = 'pair-' + pairs.length;
64                    $.matchHeight(id, [elms.get(i * 2), elms.get(i * 2 + 1)], '.deepest').match();
65                    pairs.push(id);
66                }
67            });
68        },
69        invalid: function () {
70            $.matchHeight('sidebars').remove();
71            $.each(pairs, function () {
72                $.matchHeight(this).remove();
73            });
74        }
75    });
76
77    $.onMediaQuery('(max-width: 767px)', {
78        valid: function () {
79            var header = $('#header-responsive');
80            if (!header.length) {
81                header = $('<div id="header-responsive"/>').prependTo('#header');
82                $('#logo').clone().removeAttr('id').addClass('logo').appendTo(header);
83                $('.searchbox').first().clone().removeAttr('id').appendTo(header);
84                $('#menu').responsiveMenu().next().addClass('menu-responsive').appendTo(header);
85            }
86        }
87    });
88
89})(jQuery);

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.