
	$(document).ready(function() {
		$('img')
		.error(
			function()
			{
				src = $(this).attr('src');
				tmp = src.split("/");
				tmp2 = tmp[tmp.length-1];
				tmp2 = tmp2.split(".");
				nome = tmp2[0];
				delete tmp[tmp.length-1];
				caminho = tmp.join("/");
				$(this).attr('src',caminho + nome + '.png');
				
				//$(this).attr('src','../arquivos/img/b.gif');
			}
		);
		/* Âncora */
		function scroll_to(div){
			$('html, body').animate({
				scrollTop: $(div).offset().top
			},1000);
		}
		
		
		$('.div_ancora_din').click
		(function()
		{
			scroll_to("." + $(this).attr('title'));
		}
		);
		
		
		/* Âncora Subir */
		function scroll_up(div){
			$('html, body').animate({
				scrollTop: $(div).offset().top
			},300);
		}
		$('.div_ancora_sbr').click(function() {
			scroll_up(".topo_subir");
		});
		
		/* SLIER HOME  */
		
		
				$('.busc_header').each(function(){
					$(this).attr('title',$(this).val());
					$(this).focus(function(){
						if($(this).val() == $(this).attr('title'))
						{
							$(this).val('');
							$(this).addClass('inserirvalue');
						}
					});
					$(this).blur(function(){
						if($(this).val() =='')
						{
							$(this).val($(this).attr('title')).removeClass('inserirvalue');
						}
					});    
				});
		
			
	});
		

function busca()
{
	window.location.href='../busca/' + $('#busca').val();
}

