PageSourceSearch

https://cm-beja.pt/templates/home/includes/js/functions.js?v=6.58

js cm-beja.pt collected 2026-10-02 05:39:44 UTC 3,700 bytes, 100 lines download raw bytes

1/* Tabs */
2//$(document).ready(function () { $("ul.tabs li:first").addClass("active").show(), $(".tab_content:first").show(), $("ul.tabs li").click(function () { $("ul.tabs li").removeClass("active"), $(this).addClass("active"), $(".tab_content").hide(); var t = $(this).find("a").attr("href"); return $(t).show(), !1 }), $("ul.tabs li:first-child").css("border-left", "none") });
3
4var cores = new Array("#faa61a", "#cc178a", "#ef4f63", "#00aabc", "#bed630", "#8c63aa", "#1388ca");
5var meses = new Array("Janeiro", "Fevereiro", "Mar\u00e7o", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro");
6$(document).ready(function () {
7    //$('.svgContainer').fadeIn(700);
8    //$('.mod_tourism').show();
9    updateCatColors();
10    //resizeHomeB();
11
12    $(".infoWindowOverlay .close").on("click", function (e) {
13        $(".infoWindowOverlay").hide();
14        $("body").css("overflow", "auto");
15        $(".thumb-video iframe").attr("src", "");
16    });
17
18    /*Hide languages menu*/
19    $('html').click(function (e) {
20
21        if ($(".infoWindowOverlay").is(":visible")) {
22            if ($(e.target).hasClass("ignoreClick") || $(e.target.parentElement).hasClass("ignoreClick")) {
23                return;
24            }
25
26            $(".infoWindowOverlay").hide();
27            $(".thumb-video iframe").attr("src", "");
28        }
29    });
30
31    $(".infoWindowOverlay").show();
32});
33
34$(window).resize(function () {
35    //resizeHomeB();
36});
37
38function resizeHomeB() {
39    var newWidth = $(window).width();
40    var newHeight = $(window).height();
41    var novaLargura = ($(window).width() * 484) / 433;
42
43    /*if (newHeight > 700 && newWidth>768)
44        $(".svgContainer").css({ 'margin-top': '-50px' });
45    else
46        $(".svgContainer").css({ 'margin-top': '0' });*/
47    //console.log(newWidth);
48
49    //$("#Layer_1").css({ 'max-height': novaLargura });
50    //$("#home_Bmenu").height(novaLargura+50);
51
52
53    $("#Layer_1").width(newWidth > 433 ? 433 : newWidth);
54
55    //if (newWidth < 450)
56    //    $("#Layer_1").css({ 'max-height': '350px' });
57
58
59    // (newWidth > 433 ? 484 : 400);
60    //
61    //$("#Layer_1").height(novaLargura);
62}
63
64//actualiza as cores das categorias pela ordem pretendida
65function updateCatColors() {
66    $("#mod_num_clique_home .tableItem .liItem:not(:first)").each(function () {
67        var cor = getColor($(this), "#mod_num_clique_home .tableItem .liItem:not(:first)");
68        //$(this).children("a").css({ "color": cor });
69        $(this).css({ "background-color": cor });
70    });
71}
72
73//de acordo com o index do item pretendido, indica a cor pretendida
74function getColor(el, comparator) {
75    //cores
76    var valor = el.index(comparator);
77    //console.log(valor);
78    var listaIndex = valor % 7;
79    return cores[listaIndex];
80}
81
82function updateThumb(el) {
83    var iframe = $(el);
84    var iframe_src = iframe.attr('data-url');
85    var youtube_video_id = iframe_src.match("^(?:https?:)?//[^/]*(?:youtube(?:-nocookie)?\.com|youtu\.be).*[=/]([-\\w]{11})(?:\\?|=|&|$)").pop();
86
87    if (youtube_video_id.length == 11) {
88        var video_thumbnail = $("<iframe width=\"100%\" height=\"640\" class=\"pull-left\" src=\"https://www.youtube.com/embed/" + youtube_video_id + "\" frameborder=\"0\" allowfullscreen=\"\"></iframe>");
89        //$('<img class="img-responsive" src="/util/imgLoaderUrl.ashx?w=950&amp;h=630&amp;img=http://img.youtube.com/vi/' + youtube_video_id + '/maxresdefault.jpg" >');
90        iframe.append(video_thumbnail);
91    }
92}
93
94$(document).ready(function () {
95
96    $(".thumb-video").each(function () {
97        updateThumb(this);
98    });
99
100});

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.