PageSourceSearch

https://parintinsamazonas.com.br/js/da.js

js parintinsamazonas.com.br collected 2026-10-02 13:59:44 UTC 8,442 bytes, 259 lines download raw bytes

1$(function () {
2
3    $('.fecha').click(function () {
4        $(".modal").css("display",'none');
5    });
6
7
8    $('form[name="busca"]').submit(function () {
9        var busca = $('input[name="busca"]').val();
10        if(busca == ''){
11            alert('Informe um Título para busca');
12            return false;
13        }else{
14            window.location.replace("https://parintinsamazonas.com.br/pesquisa/"+slugify(busca));
15            return false;
16        }
17    });
18
19
20    function slugify(str) {
21
22        // Converte o texto para caixa baixa:
23        str = str.toLowerCase();
24
25        // Remove qualquer caractere em branco do final do texto:
26        str = str.replace(/^\s+|\s+$/g, '');
27
28        // Lista de caracteres especiais que serão substituídos:
29        const from = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;";
30
31        // Lista de caracteres que serão adicionados em relação aos anteriores:
32        const to   = "aaaaaeeeeeiiiiooooouuuunc-------";
33
34        // Substitui todos os caracteres especiais:
35        for (let i = 0, l = from.length; i < l; i++) {
36            str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
37        }
38
39        // Remove qualquer caractere inválido que possa ter sobrado no texto:
40        str = str.replace(/[^a-z0-9 -]/g, '');
41
42        // Substitui os espaços em branco por hífen:
43        str = str.replace(/\s+/g, ' ');
44
45        return str;
46    };
47
48
49    $('.bmenu').click(function () {
50        $('.box-menu ').slideToggle();
51        $(this).toggleClass('ativo');
52        return false;
53
54    });
55    $('.lupa').click(function () {
56        $('.box-search ').slideToggle();
57        $(this).toggleClass('ativo');
58        return false;
59
60    });
61
62
63    function Alert(tipo, content) {
64        var classe = (tipo == 'accept' ? 'alert-info' : (tipo == 'error' ? 'alert-danger' : (tipo == 'alerta' ? 'alert-alert' : 'null')));
65        $('.modal-alerta').html(
66            '<div class="alert ' + classe + '">' + content + '</div>'
67        ).fadeIn('fast');
68    }
69
70
71    var slideAuto = setInterval(slideGo, 6000);
72
73    $('.slide_nav_item.g').click(function () {
74        clearInterval(slideAuto);
75        slideGo();
76
77    });
78    $('.slide_nav_item.b').click(function () {
79        clearInterval(slideAuto);
80        slideBack();
81
82    });
83
84    $('.slide_pager span').click(function () {
85        clearInterval(slideAuto);
86        if (!$(this).hasClass('act')) {
87            var goto = $(this).attr('id');
88            $('.slide_item.first').fadeOut(400, function () {
89                $('.slide_item').fadeOut().removeClass('first');
90                $('.slide_item:eq(' + goto + ')').fadeIn().addClass('first ');
91                slideMark();
92            });
93        }
94    });
95    function slideGo() {
96        if ($('.slide_item.first').next('.slide_item').size()) {
97            $('.slide_item.first').fadeOut(800, function () {
98                $('.slide_item').fadeOut().removeClass('first');
99                $(this).next().fadeIn().addClass('first ');
100                slideMark();
101            });
102        } else {
103            $('.slide_item.first').fadeOut(800, function () {
104                $('.slide_item').removeClass('first ');
105                $('.slide_item:eq(0)').fadeIn().addClass('first ');
106                slideMark();
107            });
108        }
109
110    }
111
112    function slideBack() {
113        if ($('.slide_item.first').index() > 1) {
114            $('.slide_item.first').fadeOut(400, function () {
115                $('.slide_item').fadeOut().removeClass('first');
116                $(this).prev().fadeIn().addClass('first');
117                slideMark();
118            });
119        } else {
120            $('.slide_item.first').fadeOut(400, function () {
121                $('.slide_item').removeClass('first');
122                $('.slide_item:last-of-type').fadeIn().addClass('first');
123                slideMark();
124            });
125        }
126    }
127
128    function slideMark() {
129        var slideThis = $('.slide_item.first').index() - 1;
130        $('.slide_pager span').removeClass('act');
131        $('.slide_pager span:eq(' + slideThis + ' )').addClass('act');
132    }
133
134
135    $('.j_votar').click(function () {
136        $(this).unbind('click');
137    });
138
139    $('.j_button').click(function () {
140        $('.votar').fadeOut('fast', function () {
141            $('.res').fadeIn('fast');
142        });
143    });
144
145    $('.voltar').click(function () {
146        $('.res').fadeOut('fast', function () {
147            $('.votar').fadeIn('fast');
148        });
149    });
150
151    function enquete() {
152        $('form[name="enquete"]').submit(function () {
153            var forma = $(this);
154            var dados = $(this).serialize() + '&acao=enquete_vota';
155            $.ajax({
156                url: 'enquete.php',
157                data: dados,
158                type: 'POST',
159                beforeSend: function () {
160                    forma.find('.load').fadeIn('fast');
161                },
162                success: function (datas) {
163//                alert(datas);
164                    if (datas == '1') {
165                        alert('Escolha uma opcão para votar');
166
167                    } else if (datas == '2') {
168                        alert('Voce ja votou nessa enquete');
169
170                    } else if (datas == 'ip') {
171                        alert('Identificamos que você está tentando votar por várias vezes. Por favor volte mais tarde ');
172
173
174                    } else {
175                        alert('Seu voto foi Computado com sucesso. Obrigado');
176                        $('#enquete').fadeTo(500, '0.2', function () {
177                            $(this).html(datas);
178                            enquete();
179                            $('.j_votar').click(function () {
180                                $(this).unbind('click');
181                            });
182
183                            $('.j_button').click(function () {
184                                $('.votar').fadeOut('fast', function () {
185                                    $('.res').fadeIn('fast');
186                                });
187                            });
188
189                            $('.voltar').click(function () {
190                                $('.res').fadeOut('fast', function () {
191                                    $('.votar').fadeIn('fast');
192                                });
193                            });
194                            $(this).queue(function () {
195                                $(this).fadeTo(500, '1');
196                            });
197                            $(this).dequeue();
198                        });
199                    }
200                },
201                complete: function () {
202                    forma.find('.load').fadeOut('fast');
203                }
204
205            });
206            return false;
207
208        });
209
210    }
211    enquete();
212
213
214    $('.box-act-menu').click(function () {
215        if (!$(this).hasClass('actives')) {
216            $(this).addClass('actives');
217            $('.menu').animate({'left': '0px'}, 300);
218        } else {
219            $(this).removeClass('actives');
220            $('.menu').animate({'left': '-100%'}, 300);
221        }
222    });
223
224    $('.socialshare_item a').click(function () {
225        var url = $(this).attr('href');
226        var width = 600;
227        var height = 600;
228
229        var leftPosition, topPosition;
230        leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
231        topPosition = (window.screen.height / 2) - ((height / 2) + 100);
232        window.open(url, "Window2",
233            "status=no,height=" + height + ",width=" + width + ",resizable=yes,left="
234            + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY="
235            + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
236        return false;
237    });
238
239    function addZeros(n) {
240        return (n < 10) ? '0' + n : n;
241    }
242
243
244    //GET FACEBOOK SHARE
245    if ($(".socialshare_facebook").length) {
246        var shareUrl = $('.socialshare_facebook a').attr('rel');
247        $.getJSON("//graph.facebook.com/?id=" + shareUrl, function (data) {
248            $('.socialshare_facebook .social span').text((data.share.share_count ? addZeros(data.share.share_count) : '00'));
249
250        });
251    }
252
253    var Url = $('.socialshare_twitter a').attr('rel');
254    $.getJSON("//opensharecount.com/count.json?url=" + Url, function (data) {
255        $('.socialshare_twitter .social span').text((data.count ? addZeros(data.count) : '00'));
256
257    });
258
259});

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.