PageSourceSearch

https://www.dsau.dp.ua/js/main.js

js dsau.dp.ua collected 2026-10-02 18:32:44 UTC 5,427 bytes, 160 lines download raw bytes

1$(function () {
2
3    $('#main-menu').smartmenus({
4        subMenusSubOffsetX: 1,
5        subMenusSubOffsetY: -8,
6        showFunction: function ($ul, complete) { $ul.fadeIn(150, complete); }
7    });
8
9    // Hide submenu with no items inside.
10    $('#main-menu').on('beforeshow.smapi', function(e, menu) {
11        return $('a', menu).length > 0;
12    });
13
14    // smooth scroll to anchors/bookmarks
15    // Select all links with hashes
16    $('a[href*="#"]')
17        // Remove links that don't actually link to anything
18        .not('[href="#"]')
19        .not('[href="#0"]')
20        .click(function (event) {
21            // On-page links
22            if (
23                location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
24                &&
25                location.hostname == this.hostname
26            ) {
27                // Figure out element to scroll to
28                var target = $(this.hash);
29                target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
30                // Does a scroll target exist?
31                if (target.length) {
32                    // Only prevent default if animation is actually gonna happen
33                    event.preventDefault();
34                    $('html, body').animate({
35                        scrollTop: target.offset().top
36                    }, 1000, function () {
37                        // Callback after animation
38                        // Must change focus!
39                        var $target = $(target);
40                        $target.focus();
41                        if ($target.is(":focus")) { // Checking if the target was focused
42                            return false;
43                        } else {
44                            $target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable
45                            $target.focus(); // Set focus again
46                        }
47                    });
48                }
49            }
50        });
51
52
53    // scroll to top
54    $.fn.liScrollToTop = function () {
55        return this.each(function () {
56            var scrollUp = $(this);
57            scrollUp.hide();
58            if ($(window).scrollTop() > 0) scrollUp.fadeIn("slow");
59            $(window).scroll(function () {
60                if ($(window).scrollTop() <= 0) scrollUp.fadeOut("slow");
61                else scrollUp.fadeIn("slow")
62            });
63            scrollUp.click(function () {
64                $("html, body").animate({ scrollTop: 0 }, "slow")
65            })
66        });
67    };
68    $(function () {
69        $('.scrollUp').liScrollToTop();
70    });
71
72
73    // jcarousel autorotate & swipe (!not initialization!)
74    $('.jcarousel1')
75        .jcarouselAutoscroll({
76            interval: 6000,
77            target: '+=1',
78            autostart: true,
79            vertical: false
80        })
81        .jcarouselSwipe();
82
83    $('.jcarousel2')
84        .jcarouselAutoscroll({
85            interval: 6500,
86            target: '+=1',
87            autostart: true,
88            vertical: false
89        })
90        .jcarouselSwipe();
91
92
93    $('[placeholder]')
94        .focus(function () {
95            var input = $(this);
96            if (input.val() === input.attr('placeholder')) {
97                input.val('').removeClass('placeholder');
98                //$(this).css("color", "#FFCB07"); // ���� ������ ������ input �� ������ / �����
99            }
100        })
101        .blur(function () {
102            var input = $(this);
103            if (input.val() === '' || input.val() === input.attr('placeholder')) {
104                input.addClass('placeholder').val(input.attr('placeholder'));
105                $(this).css("color", "#959595");		// ���� ������������� �� ���������
106                // ����� �� ������ ��� ������ ����
107            }
108        })
109        .blur()
110        .parents('form').submit(function () {	// ����� �� ���������� ����� ������������ ��� �������� ������
111            $(this).find('[placeholder]').each(function () {
112                var input = $(this);
113                if (input.val() === input.attr('placeholder')) {
114                    input.val('');
115                }
116            });
117        });
118});
119
120$(function () {
121
122    if ($('.announce-wrap').length) {
123        $('.ann-title').ellipsis({
124            row: 2,
125            onlyFullWords: true
126        });
127        $('.ann-body').ellipsis({
128            row: 6,
129            onlyFullWords: true
130        });
131    }
132
133
134    // node images that take more then 50% of content width
135    var node_content = $('.page-body');
136    if (node_content.length) {
137        var images = node_content.find('img');
138        images.each(function () {
139            var an_img = $(this);
140            if (node_content.width() / an_img.prop('naturalWidth') < 2) {
141                an_img.parent('.img-wrap').addClass('big_image');
142                an_img.parent('.img-wrap').parent().addClass('big-image-wrap');
143            }
144        });
145    }
146
147}); // jQuery.ellipsis:
148
149
150$(function () {
151
152});
153
154// IE11 detection css class
155var h = document.documentElement,
156    isIE11 = !!window.MSInputMethodContext && !!document.documentMode,
157    c = 'IE11';
158if (isIE11 == true) {
159    h.className += ' ' + c;
160}

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.