PageSourceSearch

https://www.olhovivoca.com.br/js/global.js?rand=d9d4f495e875a2e075a1a4a6e1b9770f

js olhovivoca.com.br collected 2026-09-25 01:46:09 UTC 15,322 bytes, 535 lines download raw bytes

1var RecaptchaOptions = {
2  lang: "pt", // Unavailable while writing this code (just for audio challenge)
3  theme: "white", // Make sure there is no trailing ',' at the end of the RecaptchaOptions dictionary
4};
5
6$(document).ready(function () {
7  $(window).load(function () {
8    if ($.browser.msie && parseInt($.browser.version) < 9) {
9      $("body").addClass("ie");
10    }
11
12    $(".ie a .thumb-border span").each(function () {
13      var $borda = $(this);
14      $borda.css("width", $borda.width() - 6 + "px");
15      $borda.css("height", $borda.height() - 6 + "px");
16    });
17  });
18
19  //------------------- Banners de Publicidadde -------------------//
20
21  //------------------- Infield -------------------//
22
23  //Label
24  $(".infield label").not("#uf label").inFieldLabels({ fadeOpacity: 0.3 });
25
26  //------------------- Autosize -------------------//
27
28  $("textarea.autosize").autosize();
29
30  //------------------- Fancybox -------------------//
31
32  if ($("a.fancy")[0]) {
33    $("a.fancy").fancybox({
34      titleShow: true,
35      padding: 0,
36      overlayColor: false,
37      overlayOpacity: 0.8,
38      transitionIn: "fade",
39      transitionOut: "fade",
40    });
41  }
42
43  //Removendo titulos
44  /*$("a.fancy.download").hover(function(){
45		title = $(this).attr("title"); $(this).removeAttr("title");
46		$(this).click(function(){ $(this).attr("title", title); });
47	}, function(){
48		$(this).attr("title", title);
49	});*/
50
51  //------------------- Fan page -------------------//
52
53  if ($("aside.secundario section#enquete ul li label")[0]) {
54    $("aside.secundario section#enquete ul li label").click(function () {
55      if (!$("aside.secundario section#enquete").hasClass("notfanpage")) {
56        $.fancybox({
57          titleShow: true,
58          padding: 15,
59          width: 400,
60          height: 300,
61          overlayColor: false,
62          overlayOpacity: 0.8,
63          transitionIn: "fade",
64          transitionOut: "fade",
65          type: "iframe",
66          href: "https://www.facebook.com/plugins/likebox.php?api_key=&locale=pt_BR&sdk=joey&channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D23%23cb%3Df3f885cd74%26origin%3Dhttp%253A%252F%252Fwww.olhovivo.ca%252Ff229fa675%26domain%3Dwww.olhovivo.ca%26relation%3Dparent.parent&header=false&show_faces=true&stream=false&width=400&height=300&href=http%3A%2F%2Fwww.facebook.com%2FOlhoVivo.ca&colorscheme=light&border_color=%23cccccc&show_border=true",
67        });
68      }
69      $("aside.secundario section#enquete").addClass("notfanpage");
70    });
71  }
72
73  //------------------- Scroll -------------------//
74
75  $("#back-top").hide();
76  $(function () {
77    $(window).scroll(function () {
78      if ($(this).scrollTop() > 100) {
79        $("#back-top").fadeIn();
80      } else {
81        $("#back-top").fadeOut();
82      }
83    });
84
85    $("#back-top").click(function () {
86      var alvo = $(this).attr("href");
87      $.scrollTo($(alvo), 300, { axis: "y" });
88
89      return false;
90    });
91  });
92
93  //------------------- Show ------------------//
94
95  $("a.show").click(function () {
96    var alvo = $(this).attr("href");
97
98    if ($(alvo).css("display") == "none") {
99      $(alvo).slideDown("fast");
100      $(this).addClass("ativo");
101    } else {
102      $(alvo).slideUp("fast");
103      $(this).removeClass("ativo");
104    }
105    return false;
106  });
107
108  //------------------- Show ------------------//
109
110  $("a.show-fade").click(function () {
111    var alvo = $(this).attr("href");
112    $(alvo).fadeIn("fast");
113    return false;
114  });
115
116  $("a.hide-fade").click(function () {
117    var alvo = $(this).attr("href");
118    $(alvo).fadeOut("fast");
119    return false;
120  });
121
122  //-------------------------------------------------------------------//
123
124  $("#cadastro form input[name='email']").blur(function () {
125    var site = $("#base-site").val();
126
127    if ($(this).val() != "") {
128      $.post(
129        site + "include/email.php",
130        {
131          email: $(this).val(),
132          cod: $("input[name='cod']").val(),
133        },
134        function (response) {
135          if (parseInt(response) == 1) {
136            $("#validEmail").fadeOut("fast");
137          } else {
138            $("#validEmail").fadeIn("fast");
139          }
140        }
141      );
142    } else {
143      $("#validEmail").fadeOut("fast");
144    }
145  });
146
147  //-----------------------------------------------------------------//
148
149  // $("section#enquete").each(function(){
150
151  // 	var id = "#"+$(this).attr("id");
152
153  // 	$(id).find("input[type='radio']").change(function(){
154
155  // 		$(id).find("label.checked").removeClass("checked");
156  // 		$('#enquete ul img').css('border','3px solid #FFF');
157
158  // 		$(id).find("label").each(function(){
159  // 			if($(this).find("input[type='radio']").attr("checked")){
160  // 				$(this).addClass("checked");
161  // 				$(this).find('img').css('border','3px solid #8475b7');
162  // 				//var capa = $(this).parent().parent().find('img').css('border','3px solid #8475b7');
163  // 			}
164  // 		});
165
166  // 		1
167
168  // 	});
169
170  // 	//Submit
171
172  // 	$(id).find("form.disabled").submit(function(){ return false; });
173  // 	$(id).find("form").not('.login').submit(function(){
174  // 		var marcados = 0;
175  // 		$(id).find("input[type='radio']:checked").each(function(){ marcados++; })
176  // 		if(marcados > 0) {
177  // 			return true;
178  // 		} else{
179  // 			alert('Marque uma opção');
180  // 			return false;
181  // 		}
182  // 	})
183
184  // });
185
186  //-----------------------------------------------------------------//
187
188  if ($("form.captcha")[0]) {
189    $("form.captcha input[name='recaptcha_response_field']").focus();
190  }
191
192  //-----------------------------------------------------------------//
193
194  $("section#enquete #login-form a.resultado.esqueci").click(function () {
195    $("section#enquete #login-esqueci").slideDown("fast");
196    return false;
197  });
198
199  //-----------------------------------------------------------------//
200
201  $("section#conteudo section#principal .selectbox ").selectbox();
202
203  //-----------------------------------------------------------------//
204
205  if ($("section#noticias-slider.slider")[0]) {
206    $("section#noticias-slider.slider").setslide({
207      limit: 1,
208      timer: 5000,
209      restart: true,
210    });
211  }
212  //-----------------------------------------------------------------//
213});
214
215//-----------------------------------------------------------------//
216
217$.fn.setslide = function (settings) {
218  var config = {
219    limit: 1,
220    timer: 0,
221    restart: false,
222  };
223  if (settings) {
224    $.extend(config, settings);
225  }
226
227  return this.each(function (n) {
228    var $setslide = $(this);
229    var limit = config.limit;
230    var timer = config.timer;
231    var restart = config.restart;
232    var pause = config.pause;
233
234    if ($setslide.attr("id") != undefined) var id = $setslide.attr("id");
235    else {
236      var id = "setslide-" + n;
237      $setslide.attr("id", id);
238    }
239
240    var obj = "#" + id;
241
242    //Prev Next
243    var count = 0;
244    $setslide.find(".list .item").each(function () {
245      count++;
246      $(this).attr("id", id + "-pg-" + count);
247    });
248
249    if ($setslide.find(".ctrls a")[0]) {
250      //Thumbs
251      var ctrls = 0;
252      $setslide.find(".ctrls a").each(function () {
253        ctrls++;
254        $(this).attr("href", "#" + id + "-pg-" + ctrls);
255        $(this).attr("id", id + "-pg-" + ctrls + "-ctrl");
256      });
257    }
258    var total = count - (limit - 1);
259
260    $setslide.find(".prev").attr("href", "#").addClass("disabled");
261    $setslide.find(".next").attr("href", "#").addClass("disabled");
262
263    var prev = "#";
264    var next = "#";
265
266    //Se tivermais que 3 inicia a função
267    if (total > 1) {
268      //Banner slideshow
269      if (timer > 0)
270        var slidestart = setInterval(function () {
271          $setslide.find(".next").trigger("click");
272        }, timer);
273
274      $setslide
275        .find(".next")
276        .attr("href", obj + "-pg-2")
277        .removeClass("disabled");
278      if (restart)
279        $setslide
280          .find(".prev")
281          .attr("href", obj + "-pg-" + total)
282          .removeClass("disabled");
283
284      $setslide.find("a.ctrl").click(function () {
285        if ($(this).hasClass("disabled")) {
286          return false;
287        } else {
288          //Banner slideshow
289          if (timer > 0) {
290            clearInterval(slidestart);
291            slidestart = setInterval(function () {
292              $setslide.find(".next").trigger("click");
293            }, timer);
294            $setslide.find("a.ctrl-play-pause").removeClass("pause");
295          }
296
297          var alvo = $(this).attr("href");
298          var id = parseInt(alvo.replace(obj + "-pg-", ""));
299
300          if (alvo != "#") {
301            if ($setslide.find(".ctrls a")[0]) {
302              $setslide.find(".ctrls a.ativo").removeClass("ativo");
303              $setslide.find(".ctrls a[href='" + alvo + "']").addClass("ativo");
304            }
305
306            $setslide.find(".overflow").scrollTo($(alvo), 300, { axis: "x" });
307
308            if (parseInt(id - 1) > 0) {
309              prev = obj + "-pg-" + (id - 1);
310              $setslide.find(".prev").removeClass("disabled");
311            } else {
312              if (restart) {
313                prev = obj + "-pg-" + total;
314                $setslide.find(".prev").removeClass("disabled");
315              } else {
316                prev = "#";
317                $setslide.find(".prev").addClass("disabled");
318              }
319            }
320
321            if (parseInt(id + 1) <= parseInt(total)) {
322              next = obj + "-pg-" + (id + 1);
323              $setslide.find(".next").removeClass("disabled");
324            } else {
325              if (restart) {
326                next = obj + "-pg-1";
327                $setslide.find(".next").removeClass("disabled");
328              } else {
329                next = "#";
330                $setslide.find(".next").addClass("disabled");
331              }
332            }
333          }
334
335          $setslide.find(".prev").attr("href", prev);
336          $setslide.find(".next").attr("href", next);
337        }
338        return false;
339      });
340
341      if ($setslide.find(".ctrls a")[0]) {
342        $setslide.find(".ctrls a:first").addClass("ativo");
343
344        //------------------------------------------------------//
345
346        $setslide.find(".ctrls a").click(function () {
347          var alvo = $(this).attr("href");
348          var id = parseInt(alvo.replace(obj + "-pg-", ""));
349
350          if (alvo != "#") {
351            //Banner slideshow
352            if (timer > 0) {
353              clearInterval(slidestart);
354              slidestart = setInterval(function () {
355                $setslide.find(".next").trigger("click");
356              }, timer);
357              $setslide.find("a.ctrl-play-pause").removeClass("pause");
358            }
359
360            $setslide.find(".overflow").scrollTo($(alvo), 300, { axis: "x" });
361
362            if (parseInt(id + 1) <= parseInt(total)) {
363              next = obj + "-pg-" + (id + 1);
364            } else {
365              next = obj + "-pg-" + 1;
366            }
367
368            $setslide.find(".next").attr("href", next);
369            $setslide.find(".ctrls a.ativo").removeClass("ativo");
370            $(this).addClass("ativo");
371          }
372
373          return false;
374        });
375
376        //------------------------------------------------------//
377      }
378
379      //Banner pause/play
380      if (pause && timer > 0) {
381        //Criar botão
382        $setslide.append('<a href="#" class="ctrl-play-pause"></a>');
383        $setslide.find("a.ctrl-play-pause").click(function () {
384          $(this).toggleClass("pause");
385          if ($(this).hasClass("pause")) clearInterval(slidestart);
386          else
387            slidestart = setInterval(function () {
388              $setslide.find(".next").trigger("click");
389            }, timer);
390          return false;
391        });
392      }
393    } else {
394      $setslide.find("a.disabled").click(function () {
395        return false;
396      });
397    }
398  });
399};
400
401/*
402function setslide(id,limit) {
403
404	var obj = "#" + id;
405
406	//Prev Next
407	var count = 0;
408	$(obj).find(".list .item").each(function() {
409		count ++;
410		$(this).attr("id", id + "-pg-" + count);
411	});
412
413	var total = count - (limit - 1);
414
415	$(obj).find(".prev").attr("href", "#").addClass("disabled");
416	$(obj).find(".next").attr("href", "#").addClass("disabled");
417
418	var prev = "#";
419	var next = "#";
420
421	//Se tivermais que 3 inicia a função
422	if(total > 1) {
423
424	$(obj).find(".next").attr("href", obj + "-pg-2").removeClass("disabled");
425	$(obj).find(".prev").attr("href", obj + "-pg-" + total).removeClass("disabled");
426
427		$(obj).find("a.ctrl").click(function(){
428			if($(this).hasClass("disabled")) {
429				return false;
430			} else {
431
432				var alvo = $(this).attr("href");
433				var id = parseInt(alvo.replace(obj + "-pg-",""));
434
435				if(alvo != "#"){
436					$(obj).find(".overflow").scrollTo($(alvo),300,{axis:"x"});
437
438					if (parseInt(id-1) > 0) {
439						prev = obj + "-pg-" + (id-1);
440						$(obj).find('.prev').removeClass('disabled');
441					} else {
442						prev = obj + "-pg-" + total;
443						$(obj).find('.prev').removeClass('disabled');
444					}
445
446					if (parseInt(id+1) <= parseInt(total) ) {
447						next = obj + "-pg-" + (id+1);
448						$(obj).find('.next').removeClass('disabled');
449
450					} else {
451						next = obj + "-pg-1";
452						$(obj).find('.next').removeClass('disabled');
453					}
454
455				}
456
457				$(obj).find(".prev").attr("href", prev);
458				$(obj).find(".next").attr("href", next);
459
460			}
461			return false;
462
463		});
464
465	}
466}
467*/
468//--------------------------------------------------------------------------------------------------------//
469
470$.fn.selectbox = function () {
471  return this.each(function () {
472    var $selectbox = $(this);
473
474    /*Drop Down*/
475    $selectbox.on("click", ".arrow", function () {
476      if ($selectbox.find(".drop").css("display") == "none")
477        $selectbox.addClass("ativo").find(".drop").slideDown("fast");
478      else $selectbox.removeClass("ativo").find(".drop").slideUp("fast");
479
480      return false;
481    });
482
483    //Sumir Drop
484    $(document).click(function (event) {
485      if ($(event.target) != $selectbox) {
486        $selectbox.find(".drop").slideUp("fast");
487        $selectbox.removeClass("ativo");
488      }
489    });
490
491    $selectbox.on("change", 'input[type="radio"]', function () {
492      $selectbox.find("label.item.checked").removeClass("checked");
493
494      $selectbox.find("label.item").each(function () {
495        if ($(this).find("input[type='radio']").attr("checked"))
496          $(this).addClass("checked");
497      });
498
499      var selected = false;
500      $selectbox.find("input[type='radio']").each(function () {
501        if ($(this).is(":checked")) selected = true;
502      });
503
504      if (selected == true) {
505        var value = $selectbox.find("input[type='radio']:checked").attr("alt");
506        $selectbox.find("a.arrow strong").html(value);
507      } else {
508        $selectbox.find("a.arrow strong").html("Selecione");
509      }
510    });
511  });
512};
513
514//-----------------------------------------------------------------------//
515
516$.fn.radioSel = function (valueToSel) {
517  if (arguments.length > 0) {
518    return this.each(function () {
519      // itera sobre cada elemento encontrado
520      if ($(this).val() == valueToSel) this.click();
521    });
522  } else {
523    valorSelecionado = false;
524    this.each(function () {
525      // itera sobre cada elemento encontrado
526      if (this.checked) {
527        valorSelecionado = $(this).val();
528        return valorSelecionado;
529      }
530    });
531    return valorSelecionado;
532  }
533};
534
535//-----------------------------------------------------------------------//

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.