/* Imagens detalhes do veiculo */

function switch_product_img(divName, totalImgs) {
			for (var i=1; i<=totalImgs; i++) {
				var showDivName = 'imagem_' + i;
				var showObj = document.getElementById(showDivName);
				if (showDivName == divName)
					showObj.style.display = 'block';
				else
					showObj.style.display = 'none';
				}
			}
			
/* Imagens detalhes do veiculo - LightBox */		
			
$(function() {
	//Class da galeria de fotos.
	$('#fotos-lightbox a').lightBox(); // Select all links in object with gallery ID
	
	//Links com esta class abrem com lightbox.
	$('a.lightbox').lightBox(); // Select all links with lightbox class
});


//JQueryUi Tabs Anuncios

$(function(){
if($.fn.tabs)
	$("#anunciosdestaque").tabs();
});

$(function(){
if($.fn.tabs)
	$("#tabs").tabs();
});

$(function(){
if($.fn.tabs)
	$("#anuncie").tabs();
});

$(function(){
if($.fn.listnav)
	$("#demoOne").listnav();
});

//Slider
$(function(){
if($.fn.easySlider)
	$("#slider").easySlider({
		auto: true,
		continuous: true,
		speed: 500,
		pause: 4000
	});
});

//Galerias de fotos com fancybox
$(function(){
if($.fn.fancybox)
$("a.imagembox").fancybox({
	autoScale: false,
	transitionIn: 'none',
	transitionOut: 'none'
	});
}); 

//Abre Video
$(function(){
if($.fn.fancybox)
$("a#abrevideo").fancybox({
	transitionIn: "none",
	transitionOut: "none",
	type: "iframe",
	width: 525,
	height: 300,
	wmode: "transparent"
	});
});

//EsqueciSenha
$(function(){
if($.fn.fancybox)
$("a#esquecisenha").fancybox({
	transitionIn: "none",
	transitionOut: "none",
	type: "iframe",
	width: 470,
	height: 200
	});
});

//Contato cliente
$(function(){
if($.fn.fancybox)
$("a#abrecontato").fancybox({
	transitionIn: "none",
	transitionOut: "none",
	type: "iframe",
	width: 620,
	height: 450,
	hideOnOverlayClick: false,
	hideOnContentClick: false
	});
});

//VerTelefone
$(function(){
if($.fn.fancybox)
$("a#lnkFone").fancybox({
	transitionIn: "none",
	transitionOut: "none",
	type: "iframe",
	width: 450,
	height: 250,
	hideOnOverlayClick: false,
	hideOnContentClick: false
	});
});


//VerMapa
$(function(){
if($.fn.fancybox)
$("a.mapap").fancybox({
	transitionIn: "none",
	transitionOut: "none",
	type: "iframe",
	width: 625,
	height: 450,
	hideOnOverlayClick: false,
	hideOnContentClick: false
	});
});
