/*
document.write('<style type="text/css">body{display:none}</style>');
jQuery(function($) {
$('body').css('display','block');
});
*/
$.easing['BackEaseOut'] = function (p, t, b, c, d, s) {
	if (s == undefined) s = 1.70158;
	return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
};

$.easing['BackEaseIn'] = function (p, t, b, c, d, s) {
	if (s == undefined) s = 1.70158;
	return c*(t/=d)*t*((s+1)*t - s) + b;
};

$.easing['BackEaseInOut'] = function (p, t, b, c, d, s) {
	if (s == undefined) s = 1.70158; 
	if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
};

$.easing['QuintEaseOut'] = function (p, t, b, c, d) {
	return c*((t=t/d-1)*t*t*t*t + 1) + b;
};

(function($)
{
	
	$('#inputBusca').focus(function()
	{
		var val = $(this).val();
		var newVal = val == 'Busca' ? '' : val;
		$(this).val(newVal)
	});
	$('#inputBusca').blur(function()
	{
		var val = $(this).val();
		var newVal = val == '' ? 'Busca' : val;
		$(this).val(newVal)
	});
		
	/*
	$('.closePainel').click(function()
	{
		var val = $('#painel').css('top');
		var height = -($('#painel .area').css('height').replace('px','')-2);
		
		if(val == '-5px')
		{ 
			var topV = height; 
			var animation = 'BackEaseOut';
			$('#painel').css('z-index', 1) 
		}
		else 
		{ 
			var topV = -5;  
			var animation = 'QuintEaseOut'; 
			$('#painel').css('z-index',99)
		}
		
		$('#painel').animate({top: topV},500,animation);
	});
	
	
	$('#breadCrumb a.niv').mouseover(function(){
	
		var name = $(this).attr('id');
		$('#s'+name).show()
	
	})
	$('#breadCrumb a.niv ').mouseout(function(){
	
		var name = $(this).attr('id');
		$('#s'+name).hide()
	
	})
	*/
})
(jQuery);

function buscaCep (){

	var w = 730;
	var h = 650;
	var lado = (screen.width - w) / 2;
	var topo = (screen.height - h) / 2;


	window.open('http://www.correios.com.br/servicos/cep/cep_default.cfm','ShowCep','location=no,resize=no, width='+w+',height='+h+',left='+lado+',top='+topo+',maximized=1,scrollbars=1');
}	

function openUnicert (){

	var w = 800;
	var h = 580;
	var lado = (screen.width - w) / 2;
	var topo = (screen.height - h) / 2;

	window.open('https://www.unicert.com.br/consultas/validacao.asp?serial=19DD9836E49853CD2F29B3D8D7AF236D','unicert','location=no,resize=no, width='+w+',height='+h+',left='+lado+',top='+topo+',maximized=1,scrollbars=1');
}	
