$(document).ready( function(){
						
								
		$('a[rel*=facebox]').facebox();
		
		PEPS.rollover.init();
		
		//$("a.link").easyTooltip({useElement: 'item'});	
		
		$('#dock').Fisheye({
			maxWidth: 80,
			items: 'a',
			itemsText: 'span',
			container: '.dock-container',
			itemWidth: 100,
			proximity: 90,
			halign : 'center'
		});		
		
		ativaGaleria();
		ativaSlider();
	
});
swfobject.registerObject("FlashIDBannerInicial");

function ativaGaleria() {
		$('a.bwGal').zoomimage({
			border: 20,
			centered: true,
			hideSource: true
		});		
}
function ativaSlider() {
	$('.anythingSlider').anythingSlider({
		easing: "easeInOut",        // Anything other than "linear" or "swing" requires the easing plugin
		autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
		delay: 2000,                    // How long between slide transitions in AutoPlay mode
		startStopped: false,            // If autoPlay is on, this can force it to start stopped
		animationTime: 3000,             // How long the slide transition takes
		hashTags: true,                 // Should links change the hashtag in the URL?
		buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
		pauseOnHover: false,             // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Go",             // Start text
		stopText: "Stop",               // Stop text
		navigationFormatter: formatText     // Details at the top of the file on this use (advanced use)
	});
	$('.anythingSlider2').anythingSlider({
		easing: "easeInOut",        // Anything other than "linear" or "swing" requires the easing plugin
		autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
		delay: 1500,                    // How long between slide transitions in AutoPlay mode
		startStopped: false,            // If autoPlay is on, this can force it to start stopped
		animationTime: 2000,             // How long the slide transition takes
		hashTags: true,                 // Should links change the hashtag in the URL?
		buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
		pauseOnHover: false,             // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Go",             // Start text
		stopText: "Stop",               // Stop text
		navigationFormatter: formatText     // Details at the top of the file on this use (advanced use)
	});

	$("#slide-jump").click(function(){
		$('.anythingSlider').anythingSlider(2);
	});
}
function formatText(index, panel) {
	return index + "";
}

function modificaQtde(obj,operacao) {
	if(operacao == '+')
		$('#'+obj).val(parseInt($('#'+obj).val())+1);
	else
		$('#'+obj).val(parseInt($('#'+obj).val())-1);
		
	if($('#'+obj).val() <=0)
		$('#'+obj).val(0);
}

function showIt() {
  $("#carrinho_cadastro").hide("slow");
}

function carregaEstados() {
	$("#idestado").change(function(){
		$('#idcidade').html('<option value="">Buscando cidades, aguarde ... </option>');	
		$.post('cidade_listar.php', 
			{ idestado : $(this).val()}, 
			function(resposta){
				$('#idcidade').html(resposta);
			}
			
		);
	});	
	
}

function carregaCidades(idestado_sol,idcidade_sol) {
	if(idestado_sol && idcidade_sol) {
	$('#idcidade').html('<option value="">Buscando cidades, aguarde ... </option>');
			$.post('cidade_listar.php', 
		{ idestado : idestado_sol, idcidade : idcidade_sol }, 
		function(resposta){
			$('#idcidade').html(resposta);
		}
		
	);
	}
}

function validaFormSenha(){
	validaFormulario("form_nova_senha",'autentica_usuario');
}

function alterarExemplo(exemplo){
	$('#pesquisa-exemplo').html(exemplo);
} 
