var rolagem_blog = 0;
var desliga_bold = '';
var temp_foto;

function vota_enquete(){
    $.ajax({
        type: "POST",
        url: "_ajax/enquete.php",
        data: "resposta="+ $("#enquete input[name='resp']:checked").val() + "&codigo="+$("#enquete #codigo").val(),
        success: function( resp ){
            enq = $("#enquete");
            Theight = enq.height();
            enq.fadeOut(300, function(){enq.html(resp).height(Theight).fadeIn(300)});
        }
    });
}

function troca_foto( foto ){
   switch( foto ){
      case 'http://img.lr1.com.br/audio.png':
         return 'http://img.lr1.com.br/audio_laranja.png';
         break;

      case 'http://img.lr1.com.br/fotos.png':
         return 'http://img.lr1.com.br/fotos_laranja.png';
         break;

      case 'http://img.lr1.com.br/video.png':
         return 'http://img.lr1.com.br/video_laranja.png';
         break;
   }
}

function troca_foto_interna( foto, classe ){
   switch(classe){
      case 'l_azul':
         if( foto == 'http://img.lr1.com.br/audio.png' )
            return 'http://img.lr1.com.br/audio_azul.png';
         else if( foto == 'http://img.lr1.com.br/fotos.png' )
            return 'http://img.lr1.com.br/fotos_azul.png';
         else if( foto == 'http://img.lr1.com.br/video.png' )
            return 'http://img.lr1.com.br/video_azul.png';
         break;

     case 'l_amarelo':
         if( foto == 'http://img.lr1.com.br/audio.png' )
            return 'http://img.lr1.com.br/audio_amarelo.png';
         else if( foto == 'http://img.lr1.com.br/fotos.png' )
            return 'http://img.lr1.com.br/fotos_amarelo.png';
         else if( foto == 'http://img.lr1.com.br/video.png' )
            return 'http://img.lr1.com.br/video_amarelo.png';
         break;

     case 'l_preto':
         if( foto == 'http://img.lr1.com.br/audio.png' )
            return 'http://img.lr1.com.br/audio_preto.png';
         else if( foto == 'http://img.lr1.com.br/fotos.png' )
            return 'http://img.lr1.com.br/fotos_preto.png';
         else if( foto == 'http://img.lr1.com.br/video.png' )
            return 'http://img.lr1.com.br/video_preto.png';
         break;

     case 'l_verde':
         if( foto == 'http://img.lr1.com.br/audio.png' )
            return 'http://img.lr1.com.br/audio_verde.png';
         else if( foto == 'http://img.lr1.com.br/fotos.png' )
            return 'http://img.lr1.com.br/fotos_verde.png';
         else if( foto == 'http://img.lr1.com.br/video.png' )
            return 'http://img.lr1.com.br/video_verde.png';
         break;

     case 'l_vermelho':
         if( foto == 'http://img.lr1.com.br/audio.png' )
            return 'http://img.lr1.com.br/audio_vermelho.png';
         else if( foto == 'http://img.lr1.com.br/fotos.png' )
            return 'http://img.lr1.com.br/fotos_vermelho.png';
         else if( foto == 'http://img.lr1.com.br/video.png' )
            return 'http://img.lr1.com.br/video_vermelho.png';
         break;
   }
}

// TWITTER
function twitterStart(){
	$("#loaderTwitter").show();
	$('#carregaTwitter').hide();
	$("#iconTwitter").hide();
	$("#opcoes").show();
	twitterReload();
}

function twitterReply(nome){
	texto = $("#postTwitter").val();
	$("#postTwitter").val(texto+"@"+nome+" ");
	$("#postTwitter").focus();
}

function twitterDelete(id){
	$.post("_apps/twitter/delete.php", {textoPost: id}, function(data){
		twitterStart();
	});
}

function twitterReload(){
	$('#carregaTwitter').load('http://www.lr1.com.br/_apps/twitter/index.php', function(){
		$('#carregaTwitter').show();
		$("#loaderTwitter").hide();
	});
}

function twitterOpen(){
	window.open('http://www.lr1.com.br/_apps/twitter/redirect.php','Twitter','width=800, height=390, toobar=no, scrollbars=0, status=no, resizable=no','return false');
}
//*****************************************************************************


// Jquery UI
function posta_comentario(){
	Recaptcha.reload();
	$('#nome').val('');
	$('#nome').focus();
	$('#mensagem').val('');

	$(function() {
		$("#form_coment_not").dialog({
			bgiframe: true,
			modal: true,
			resizable: false,
			width: 350,
			close: function(ev, ui) {$(this).dialog( 'destroy' );},
			buttons: {
                            Enviar: function() {
                                if( $('#nome').val() == ''){
                                    alert('Favor preencher o nome');
                                    $('#nome').focus();
                                    return;
                                }

                                if( $('#mensagem').val() == ''){
                                    alert('Favor preencher a mensagem');
                                    $('#mensagem').focus();
                                    return;
                                }

                                if( $('#recaptcha_response_field').val() == ''){
                                    alert('Escreva as palavras encontradas na imagem para poder comentar');
                                    $('#recaptcha_response_field').focus();
                                    return;
                                }

                                tempUrl = window.location;
                                $.ajax({
                                    type: "POST",
                                    url: "_ajax/comentario.php",
                                    data: "nome="+ $('#nome').val() +"&mensagem="+ $('#mensagem').val()+"&recaptcha_response_field="+ $('#recaptcha_response_field').val() +'&recaptcha_challenge_field='+ $('#recaptcha_challenge_field').val() +'&codigo='+$('#cod_not').val(),
                                    success: function( resp ){
                                        temp = String( resp );
                                        if( temp[0] != 0 ){
                                                alert('Comentario Inserido com sucesso!');
                                                window.location = tempUrl;
                                        }
                                        else{
                                                alert( temp.substring(1, (temp.length-1) ) );
                                        }
                                    }
                                    });
                                    $(this).dialog('close');
				},
                            Cancelar: function(ev, ui) {$(this).dialog( 'destroy' );}
			}
		});
	});
}

//*****************************************************************************

$('document').ready(
	function(){
   $('#manchetes').after('<div id="nav" class="nav">').cycle({
        fx:     'fade',
        speed:  800,
        timeout: 7000,
        pager:  '#nav',
        pauseOnPagerHover: true
    });


      $('#votar').click(function(){vota_enquete();});

//	alert("=> "+document.getElementById("centro").offsetHeight);
	
      tamanho = (document.getElementById('sustentacao').offsetHeight - 26 );
      tamanhoAlternativo = tamanho;
      $.each($.browser, function(i, val) {
            // tamanho das laterais

            // safari e chrome
            if( i == 'webkit'){
                tamanho +=16;
                tamanhoAlternativo +=16;
            }
            if( i == 'mozilla'){
                tamanhoAlternativo +=16;
            }
            if( val == '8.0' ){
                tamanhoAlternativo +=16;
            }
            if( val == '7.0' ){
                tamanho +=64;
                tamanhoAlternativo +=80;
            }

            

            // centro
            $('#centro').css('height', tamanhoAlternativo );
            $('#fundo_centro').css('height', tamanho );

            $('#fundo_noticias').css('height', tamanho );
            $('#pag_noticias').css('height', tamanhoAlternativo );
		$('#fundo_lateral').css('height', tamanho );
		$('#lateral_e').css('height', tamanhoAlternativo );
      });
	


      $('.envAnuncio').focus(function(){$(this).css('background','#a9b5cb')});
      $('.envAnuncio').blur(function(){$(this).css('background','#ffffff')});
      $('#telefone').mask('(99) 9999-9999');

      $('#enviarAnuncio').click(
         function(){
            responsavel = $('#responsavel').val();
            mail        = $('#mail').val();
            telefone    = $('#telefone').val();
            pais        = $('#pais').val();
            estado      = $('#estado').val();
            cidade      = $('#cidade').val();
            empresa     = $('#empresa').val();
            mensagem    = $('#mensagem').val();
            recapchaR   = $('#recaptcha_response_field').val();
            recapchaC   = $('#recaptcha_challenge_field').val();

            $.ajax({type: "GET",
                    url: "_ajax/formularios.php",
                    data: "responsavel="+ responsavel +"&mail="+mail+"&telefone="+telefone+"&pais="+pais+"&estado="+estado+"&cidade="+cidade+"&empresa="+empresa+"&mensagem="+mensagem+"&recaptcha_challenge_field="+recapchaC+"&recaptcha_response_field="+recapchaR+"&local=anuncie",
                    success: function(resposta){
                        alert(resposta);
                    }
                 });
            }
      );

      $('#enviarFale').click(
         function(){
            responsavel = $('#responsavel').val();
            mail        = $('#mail').val();
            telefone    = $('#telefone').val();
            pais        = $('#pais').val();
            estado      = $('#estado').val();
            cidade      = $('#cidade').val();
            empresa     = $('#empresa').val();
            mensagem    = $('#mensagem').val();
            recapchaR   = $('#recaptcha_response_field').val();
            recapchaC   = $('#recaptcha_challenge_field').val();

            $.ajax({type: "GET",
                    url: "_ajax/formularios.php",
                    data: "responsavel="+ responsavel +"&mail="+mail+"&telefone="+telefone+"&pais="+pais+"&estado="+estado+"&cidade="+cidade+"&empresa="+empresa+"&mensagem="+mensagem+"&recaptcha_challenge_field="+recapchaC+"&recaptcha_response_field="+recapchaR+"&local=fale",
                    success: function(resposta){
                        alert(resposta);
                    }
                 });
            }
      );

		//recaptcha
		Recaptcha.create("6Lea7AoAAAAAANIlrcK5tnyTCzEwdt9ARszDlNC-","recaptcha_div", {theme: "white", lang : 'pt'});

		$(".mySelect").styleSelect({styleClass: "selectDark"}); //menu drop da busca (inicializacao)

      $('#mensagem').limit(140);

		//click economia cinza
		$("#eco_c").click(
						function(){
							$("#eco_r").show();
							$("#tem_c").show();
							$("#tem_r").hide();
							$(this).hide();
							$("#tempo").fadeOut(200, function(){$("#economia").fadeIn(500);});
						});

		// click tempo cinza
		$("#tem_c").click(
						function(){
							$("#tem_r").show();
							$("#eco_c").show();
							$("#eco_r").hide();
							$(this).hide();
							$("#economia").fadeOut(200, function(){$("#tempo").fadeIn(500);});
						});

		// click top5 cinza
		$("#top5_c").click(
						function(){
							$(this).hide();
							$("#top5_l").show();
							$("#novela_v").hide();
							$("#novela_c").show();
							$("#cinema_v").hide();
							$("#cinema_c").show();
							$("#horos_r").hide();
							$("#horos_c").show();

							if($("#novela:visible")){
								$("#novela").fadeOut(200, function(){$("#topfive").fadeIn(500);});
							}
							if($("#cinema:visible")){
								$("#cinema").fadeOut(200, function(){$("#topfive").fadeIn(500);});
							}
							if($("#horoscopo:visible")){
								$("#horoscopo").fadeOut(200, function(){$("#topfive").fadeIn(500);});
							}
						});

		// click novela cinza
		$("#novela_c").click(
						function(){
							$("#top5_l").hide();
							$("#top5_c").show();
							$(this).hide();
							$("#novela_v").show();
							$("#cinema_v").hide();
							$("#cinema_c").show();
							$("#horos_r").hide();
							$("#horos_c").show();

							if($("#topfive:visible")){
								$("#topfive").fadeOut(200, function(){$("#novela").fadeIn(500);});
							}
							if($("#cinema:visible")){
								$("#cinema").fadeOut(200, function(){$("#novela").fadeIn(500);});
							}
							if($("#horoscopo:visible")){
								$("#horoscopo").fadeOut(200, function(){$("#novela").fadeIn(500);});
							}
						});

		// click cinema cinza
		$("#cinema_c").click(
						function(){
							$("#top5_l").hide();
							$("#top5_c").show();
							$("#novela_v").hide();
							$("#novela_c").show();
							$(this).hide();
							$("#cinema_v").show();
							$("#horos_r").hide();
							$("#horos_c").show();

							if($("#topfive:visible")){
								$("#topfive").fadeOut(200, function(){$("#cinema").fadeIn(500);});
							}
							if($("#novela:visible")){
								$("#novela").fadeOut(200, function(){$("#cinema").fadeIn(500);});
							}
							if($("#horoscopo:visible")){
								$("#horoscopo").fadeOut(200, function(){$("#cinema").fadeIn(500);});
							}
						});

		// click horoscopo cinza
		$("#horos_c").click(
						function(){
							$("#top5_l").hide();
							$("#top5_c").show();
							$("#novela_v").hide();
							$("#novela_c").show();
							$("#cinema_v").hide();
							$("#cinema_c").show();
							$(this).hide();
							$("#horos_r").show();

							if($("#topfive:visible")){
								$("#topfive").fadeOut(200, function(){$("#horoscopo").fadeIn(500);});
							}
							if($("#novela:visible")){
								$("#novela").fadeOut(200, function(){$("#horoscopo").fadeIn(500);});
							}
							if($("#cinema:visible")){
								$("#cinema").fadeOut(200, function(){$("#horoscopo").fadeIn(500);});
							}
						});

		// click twitter cinza
		$("#t_cinza").click(
						function(){
							$(this).hide();
							$("#t_rocho").show();
							$("#f_rocho").hide();
							$("#f_cinza").show();

							if($("#facebook:visible")){
								$("#facebook").fadeOut(200, function(){$("#twitter").fadeIn(500);});
							}
						});

		// click facebook cinza
		$("#f_cinza").click(
						function(){
							$(this).hide();
							$("#f_rocho").show();
							$("#t_rocho").hide();
							$("#t_cinza").show();

							if($("#twitter:visible")){
								$("#twitter").fadeOut(200, function(){$("#facebook").fadeIn(500);});
							}
						});

		// click src cinza
		$("#src_c").click(
						function(){
							$(this).hide();
							$("#src_p").show();
							$("#blog_p").hide();
							$("#blog_c").show();
							$("#gal_ph").hide();
							$("#gal_ch").show();

							if($("#blog:visible")){
								$("#blog").fadeOut(200, function(){$("#src").fadeIn(500);});
							}
							if($("#galeria:visible")){
								$("#galeria").fadeOut(200, function(){$("#src").fadeIn(500);});
							}
						});

		// click blog cinza
		$("#blog_c").click(
						function(){
							$(this).hide();
							$("#blog_p").show();
							$("#src_p").hide();
							$("#src_c").show();
							$("#gal_ph").hide();
							$("#gal_ch").show();

							if($("#src:visible")){
								$("#src").fadeOut(200, function(){$("#blog").fadeIn(500);});
							}
							if($("#galeria:visible")){
								$("#galeria").fadeOut(200, function(){$("#blog").fadeIn(500);});
							}
						});

		// click galeria cinza
		$("#gal_ch").click(
						function(){
							$(this).hide();
							$("#gal_ph").show();
							$("#src_p").hide();
							$("#src_c").show();
							$("#blog_p").hide();
							$("#blog_c").show();

							if($("#src:visible")){
								$("#src").fadeOut(200, function(){$("#galeria").fadeIn(500);});
							}
							if($("#blog:visible")){
								$("#blog").fadeOut(200, function(){$("#galeria").fadeIn(500);});
							}
						});

		// click esqueda blog
		$("#vai_direita_blog").click(
						function(){
							if(rolagem_blog>-1632){
								rolagem_blog = rolagem_blog - 204;
								$("#rolagem_blog").animate({left:rolagem_blog+"px"}, 700);
							}
						}).mouseenter(
						function(){
							$(this).css('background', '#adadad');
						}).mouseleave(
						function(){
							$(this).css('background', '#6f0000');
						});

		// click direita blog
		$("#vai_esquerda_blog").click(
						function(){
							if(rolagem_blog<0){
								rolagem_blog = rolagem_blog + 204;
								$("#rolagem_blog").animate({left:rolagem_blog+"px"}, 700);
							}
						}).mouseenter(
						function(){
							$(this).css('background', '#adadad');
						}).mouseleave(
						function(){
							$(this).css('background', '#6f0000');
						});

      // Rolagem SRC
      $("#vai_direita_src").click(
						function(){
							if(rolagem_blog>-1632){
								rolagem_blog = rolagem_blog - 204;
								$("#rolagem_src").animate({left:rolagem_blog+"px"}, 700);
							}
						}).mouseenter(
						function(){
							$(this).css('background', '#adadad');
						}).mouseleave(
						function(){
							$(this).css('background', '#000000');
						});

		$("#vai_esquerda_src").click(
						function(){
							if(rolagem_blog<0){
								rolagem_blog = rolagem_blog + 204;
								$("#rolagem_src").animate({left:rolagem_blog+"px"}, 700);
							}
						}).mouseenter(
						function(){
							$(this).css('background', '#adadad');
						}).mouseleave(
						function(){
							$(this).css('background', '#000000');
						});

		// top five
		$(".alinhamento_top_five").mouseenter(
						function(){
                     temp_foto = $(this).find('img').attr('src');
                     $(this).find('img').attr('src', troca_foto(temp_foto) );
                     $(this).delay(1600).css('background', '#ffcf8a');
						}).mouseleave(
						function(){
                     $(this).find('img').attr('src', temp_foto);
                     $(this).delay(200).css('background', '#fff');
						}).click(
						function(){
							//procuro o elemento e redireciono para o link
							window.location.href = $(this).find('a').attr('href');
						});

		// menu cidades
		$('.l_azul').mouseenter(
						function(){
							temp_foto = $(this).find('img').attr('src');
                     $(this).find('img').attr('src', troca_foto_interna(temp_foto, $(this).attr('class')) );
                     $(this).delay(1600).css('background', '#d4e8f3');
						}).mouseleave(
						function(){
							$(this).find('img').attr('src', temp_foto);
                     $(this).delay(200).css('background', '#fff');
						}).click(
						function(){
							//procuro o elemento e redireciono para o link
							window.location.href = $(this).find('a').attr('href');
						});

      // menu região
      $('.l_amarelo').mouseenter(
						function(){
							temp_foto = $(this).find('img').attr('src');
                     $(this).find('img').attr('src', troca_foto_interna(temp_foto, $(this).attr('class')) );
                     $(this).delay(1600).css('background', '#fff9e5');
						}).mouseleave(
						function(){
							$(this).find('img').attr('src', temp_foto);
                     $(this).delay(200).css('background', '#fff');
						}).click(
						function(){
							//procuro o elemento e redireciono para o link
							window.location.href = $(this).find('a').attr('href');
						});

      // menu mundo
      $('.l_preto').mouseenter(
						function(){
							temp_foto = $(this).find('img').attr('src');
                     $(this).find('img').attr('src', troca_foto_interna(temp_foto, $(this).attr('class')) );
                     $(this).delay(1600).css('background', '#e5e5e5');
						}).mouseleave(
						function(){
							$(this).find('img').attr('src', temp_foto);
                     $(this).delay(200).css('background', '#fff');
						}).click(
						function(){
							//procuro o elemento e redireciono para o link
							window.location.href = $(this).find('a').attr('href');
						});

		// menu esportes
		$('.l_verde').mouseenter(
						function(){
							temp_foto = $(this).find('img').attr('src');
                     $(this).find('img').attr('src', troca_foto_interna(temp_foto, $(this).attr('class')) );
                     $(this).delay(1600).css('background', '#cde5cd');
						}).mouseleave(
						function(){
							$(this).find('img').attr('src', temp_foto);
                     $(this).delay(200).css('background', '#fff');
						}).click(
						function(){
							//procuro o elemento e redireciono para o link
							window.location.href = $(this).find('a').attr('href');
						});

		// menu etc
		$('.l_vermelho').mouseenter(
						function(){
							temp_foto = $(this).find('img').attr('src');
                     $(this).find('img').attr('src', troca_foto_interna(temp_foto, $(this).attr('class')) );
                     $(this).delay(1600).css('background', '#ffcccb');
						}).mouseleave(
						function(){
							$(this).find('img').attr('src', temp_foto);
                     $(this).delay(200).css('background', '#fff');
						}).click(
						function(){
							//procuro o elemento e redireciono para o link
							window.location.href = $(this).find('a').attr('href');
						});

		// radio clube fm
		$('#c_clube').click(
					 function(){
						 window.open('http://www.srcnaweb.com.br/radio/clube.php', 'Clube FM', 'width=531, height=350');
					 }).mouseenter(
					 function(){
						 $(this).css('text-decoration', 'underline');
					 }).mouseleave(
					 function(){
						 $(this).css('text-decoration', 'none');
					 });

		//  radio classic hits
		$('#c_class').click(
					 function(){
						 window.open('http://www.srcnaweb.com.br/radio/classic.php', 'Classic Hits', 'width=531, height=350');
					 }).mouseenter(
					 function(){
						 $(this).css('text-decoration', 'underline');
					 }).mouseleave(
					 function(){
						 $(this).css('text-decoration', 'none');
					 });

		//  radio andradina fm
		$('#c_andra').click(
					 function(){
						 window.open('http://www.srcnaweb.com.br/radio/cidadeandradina.php', 'Cidade FM Andradina', 'width=531, height=350');
					 }).mouseenter(
					 function(){
						 $(this).css('text-decoration', 'underline');
					 }).mouseleave(
					 function(){
						 $(this).css('text-decoration', 'none');
					 });

		//  radio djs
		$('#c_djsne').click(
					 function(){
						 window.open('http://www.srcnaweb.com.br/radio/djs.php', 'Djs Net Works', 'width=531, height=350');
					 }).mouseenter(
					 function(){
						 $(this).css('text-decoration', 'underline');
					 }).mouseleave(
					 function(){
						 $(this).css('text-decoration', 'none');
					 });

		//  radio tres lagoas
		$('#c_tresl').click(
					 function(){
						 window.open('http://www.srcnaweb.com.br/radio/cidadefm.php', 'Cidade FM Três Lagoas', 'width=531, height=350');
					 }).mouseenter(
					 function(){
						 $(this).css('text-decoration', 'underline');
					 }).mouseleave(
					 function(){
						 $(this).css('text-decoration', 'none');
					 });

		//  radio tres lagoas
		$('#c_softm').click(
					 function(){
						 window.open('http://www.srcnaweb.com.br/radio/soft.php', 'Classic Hits', 'width=531, height=350');
					 }).mouseenter(
					 function(){
						 $(this).css('text-decoration', 'underline');
					 }).mouseleave(
					 function(){
						 $(this).css('text-decoration', 'none');
					 });

		// diminui a letra
		$('#a_neg').click(
				function(){
					t_atual = String( $('#cont_noticia #novo_conteudo_noticia').css('font-size') );
					t_atual = t_atual.substring( 0, ( t_atual.length - 2 ) );
					t_atual--;
               t_atual--;
					$('#cont_noticia #novo_conteudo_noticia').css('font-size', t_atual + 'px' );
				});

		// aumenta a letra
		$('#a_pos').click(
				function(){
					t_atual = String( $('#cont_noticia #novo_conteudo_noticia').css('font-size') );
					t_atual = t_atual.substring( 0, ( t_atual.length - 2 ) );
					t_atual++;
               t_atual++;
					$('#cont_noticia #novo_conteudo_noticia').css('font-size', t_atual + 'px' );
				});

		// avaliacao positiva
		$('.ava_pos').click(
				function(){
					myClick = $(this);
					$.ajax({
						type: "GET",
						url: "_ajax/avaliacao.php",
						data: "codigo="+ $(this).attr("title") +"&tipo=pos",
						success: function(){
							total = parseInt( $(myClick).find('span').html() );
							$(myClick).find('span').html( total+ 1 );
						}
					});
				});

		// avaliacao negativa
		$('.ava_neg').click(
				function(){
					myClick = $(this);
					$.ajax({
						type: "GET",
						url: "_ajax/avaliacao.php",
						data: "codigo="+ $(this).attr("title") +"&tipo=neg",
						success: function(){
							total = parseInt( $(myClick).find('span').html() );
							$(myClick).find('span').html( total+ 1 );
						}
					});
				});

      // enter no campo de busca
		$('#input_busca').keydown(
				function( event ){
					switch( event.keyCode ){
						case 13:
							tamanho = String( $(this).val() );
							if( tamanho.length >= 2 ){
								campo = $(this).val();
								local = $('.select .activeSelect').attr('id');
								if( local == 'lr1' ){
									window.location = 'index.php?pagina=busca&busca='+unescape( encodeURIComponent( campo ) );
                        }
								else{
									window.open('http://www.google.com.br/#hl=pt-BR&q='+campo);
                        }
							}
							else{
								alert('Sua busca de conter mais de dois caracteres');
                     }
						break;
					}
				});

		// botão de busca
		$('#campo_btn').click(
				function(){
					tamanho = String( $('#input_busca').val() );
					if( tamanho.length >= 2 ){
						campo = $('#input_busca').val();
						local = $('.select .activeSelect').attr('id');
						if( local == 'lr1' ){
							window.location = 'index.php?pagina=busca&busca='+unescape( encodeURIComponent( campo ) );
                  }
						else{
							window.open('http://www.google.com.br/#hl=pt-BR&q='+campo);
                  }
					}
					else{
						alert('Sua busca de conter mais de dois caracteres');
               }
				});

		// click shopping
		$('.click_shopping').click(
				function(){
					window.location.reload();
					window.open( $(this).attr('href') );
				});

		// btn comentar noticia
		$('#comentar_not').click(
				function(){
					posta_comentario();
				});

		// inserir video em todos os lugares
		//$('a.youtubin').youtubin({wmode : "transparent", swfWidth: 480, swfHeight: 385});

      // eventos Cidades
      $("#menu_cidade").mouseenter(
						function(){
							$("#traco_cidades").show();
						}).mouseleave(
						function(){
							$("#traco_cidades").hide();
						});

      // eventos Região
      $("#menu_regiao").mouseenter(
						function(){
							$("#traco_regiao").show();
						}).mouseleave(
						function(){
							$("#traco_regiao").hide();
						});

      // eventos Mundo
      $("#menu_mundo").mouseenter(
						function(){
							$("#traco_mundo").show();
						}).mouseleave(
						function(){
							$("#traco_mundo").hide();
						});

      // eventos Esportes
      $("#menu_esportes").mouseenter(
						function(){
							$("#traco_esportes").show();
						}).mouseleave(
						function(){
							$("#traco_esportes").hide();
						});

      // eventos ETC
      $("#menu_etc").mouseenter(
						function(){
							$("#traco_etc").show();
						}).mouseleave(
						function(){
							$("#traco_etc").hide();
						});
      // eventos Radio
      clicado = false;
      $("#menu_radios").click(function(){
               if (clicado == false){

                     
                     $("#radios").stop(true, false);
                     //$("#radios").slideDown("slow");
//                     $("#radios").show(0, function(){
                     $("#radios").animate({
                        height: "230px"
                     },500);
                    // $("#img_radios").attr("src", "http://img.lr1.com.br/radios_menu_baixo.png");
                     clicado = true;
  //                   });
               }else{
                     $("#radios").stop(true, false);
                     $("#radios").animate({
                        height: "0"
                     },500);
                     //$("#img_radios").attr("src", "http://img.lr1.com.br/radios_menu.png");
                     clicado = false;
               }
						});
	});

