$(document).ready(function(){ 
 // MENU LATERAL

 //old $("dd:not(:first)").hide();
  /* $("dd").slideUp("slow");
  
  $("dt a").click(function(){ 
   $("dd:visible").slideUp("slow");    
   $(this).parent().next().slideDown("slow");    
   return false;  }); */
 // FIM MENU LATERAL  
  // canto arredondado internas
   $('#conteudo-esq-um,#imagem-destaque,#coluna-esquerda-ht,#coluna-direita-ht,#conteudo-view-fundo-azul,#anuncie-aqui-imagem-destaque,#anuncie_aqui_conteudo_img_lateral,#anuncie-aqui-menu-lateral,#anuncie-aqui-imagem-destaque-tv-barcas,#anuncie_aqui_conteudo_img_lateral,#anuncie_aqui_conteudo_img_simulacao_1,#anuncie_aqui_conteudo_img_simulacao_2,#anuncie_aqui_conteudo_img_simulacao_3,#coluna-direita-ht-tempoUtilizacao,#div-integracoes-barcas').corner("20px"); 
   //$('.cantoArredondadoConteudo').corner("bottom b1 20px");    
   $('#baia-360,#baia360-div-abas,#anuncie-aqui-conteudo-abas').corner("bottom 20px"); 

   $('#noticias-view').corner('20px');




   $('.formularios select').after("<img src='img/cantoD.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   $('.formularios select').before("<img src='img/cantoE.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   

   $('.formularios input[type=text]').css("margin-top","-2px");
   $('.formularios input[type=text]').after("<img src='img/cantoD.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   $('.formularios input[type=text]').before("<img src='img/cantoE.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   
   $('.formularios input[type=button]').addClass("botao");
   $('.formularios input[type=button]').after("<img src='img/canto-bt-D.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   $('.formularios input[type=button]').before("<img src='img/canto-bt-E.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   

   $('.formularios input[type=file]').after("<img src='img/cantoD.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   $('.formularios input[type=file]').before("<img src='img/cantoE.gif' style='margin-bottom:-6px; *margin-bottom:-4px;'/>");
   
   
    $('.formularios input[type=radio]').css("background-color","#1a4d7b");
    $('.formularios input[type=radio]').css("border","0px");


   $('.formularios textarea').after("<img src='img/canto-textarea-dir.gif' style='margin-bottom:-3px; *margin-bottom:-4px; '/>");
   $('.formularios textarea').before("<img src='img/canto-textarea-esq.gif' style='margin-bottom:-3px; *margin-bottom:-4px;  '/>");



	// conteudo-esq-um
  	// tabs	    
	$("#tabs > ul").tabs({ 
	   /* fx: { 
		   height: "toggle" 
	    } */
	});
	$("#tabs > ul").tabs("select", 4);
	// /tabs
 // MARQUEE HOME PAGE                
        $('marquee').marquee('pointer').mouseover(function () {
            $(this).trigger('stop');
        }).mouseout(function () {
            $(this).trigger('start');
        }).mousemove(function (event) {
            if ($(this).data('drag') == true) {
                this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
            }
        }).mousedown(function (event) {
            $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
        }).mouseup(function () {
            $(this).data('drag', false);
        });
 // FIM MARQUEE HOME PAGE  
//over do menu
		$("#menu-lateral-img img").mouseover(function () {
				imgNormal = $(this).attr("src");
				imgNormal = imgNormal.replace(/.gif/, "_h.gif");
				$(this).attr("src",imgNormal);				
		 });
		$("#menu-lateral-img img").mouseout(function () {
				imgHover = $(this).attr("src");
				imgHover = imgHover.replace(/_h.gif/g, ".gif");
				$(this).attr("src",imgHover);		
		 });
//final over do menu 
//over do menu ANUNCIE
		$("#anuncie-aqui-menu-lateral img").mouseover(function () {
				imgNormal = $(this).attr("src");
				imgNormal = imgNormal.replace(/.gif/, "_h.gif");
				$(this).attr("src",imgNormal);				
		 });
		$("#anuncie-aqui-menu-lateral img").mouseout(function () {
				imgHover = $(this).attr("src");
				imgHover = imgHover.replace(/_h.gif/g, ".gif");
				$(this).attr("src",imgHover);		
		 });
//final over do menu  ANUNCIE 
//over do aba ANUNCIE 
		$("#anuncie-aqui-abas-menu,#baia360-div-abas img").mouseover(function () {
				imgNormal = $(this).attr("src");
				imgNormal = imgNormal.replace(/.gif/, "_h.gif");
				$(this).attr("src",imgNormal);				
		 });
		$("#anuncie-aqui-abas-menu,#baia360-div-abas img").mouseout(function () {
				imgHover = $(this).attr("src");
				imgHover = imgHover.replace(/_h.gif/, ".gif");
				$(this).attr("src",imgHover);		
		 });
			
//final over do aba  ANUNCIE	   
});
// ativa conteudo do ligthbox
   		/*
		$(function() {
      		$('#anuncie-aqui-thumbs a').lightBox();
		});
		*/

//////////// POPUPS HORARIOS E TARIFAS \\\\\\\\\\\\\\\\
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=334,height=550,scrollbars=no');
return false;
}

/*
<A 
   HREF="popupbasic.html" 
   onClick="return popup(this, 'notes')">my popup</A>

*/

//////////// POPUPS ANUNCIE AQUI ADESIVOS EMBARCACOES \\\\\\\\\\\\\\\\
function popupAdesivos(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=334,height=300,scrollbars=no');
return false;
}

//////////// POPUPS INTEGRACOES \\\\\\\\\\\\\\\\
function popupIntegracoes(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=570,height=580,scrollbars=no');
return false;
}






////////////SCRIPT PARA ABRIR O POPUP -->
var ie=document.all
var ns6=document.getElementById && !document.all
function showPopUp(){ // funcao q abre o flat DIV para o estado VISIVEL
document.getElementById('float').style.visibility='visible';
}
function fechar_float(){ // funcao para fechar o div q contem o float
document.getElementById('float').style.visibility='hidden';
}
function startPopUp(){// tempo para abrir o popup em milisegundo
timerID=setTimeout('showPopUp()',0); //1000 = 1 segundo
}

//////////// SCRIPT PARA ABRIR O POPUP -->






function abre_popup(){
window.open('http://www.barcas-sa.com.br/publique_barcas/templates/htm/barcas_2/popup_alerta.htm','popup','width=334,height=400,scrolling=auto,top=120,left=420')
}


