$(document).ready( function(){
	ativaNav();
	ativaFacebox();
	ativaRollover();
	PEPS.rollover.init();
	validaFormulario('form_atendimento','form_atendimento-envia');
	validaFormulario('form_novidades','form_novidades-envia');
});
swfobject.registerObject("FlashID");

function ativaNav(){
	$("ul#topnav li").hover(function() { //Hover over event on list item
		$(this).find("span").show(); //Show the subnav
	} , function() { //on hover out...
		$(this).find("span").hide(); //Hide the subnav
	});
};

function ativaFacebox(){
	$('a[rel*=facebox]').facebox();
}

function ativaRollover() {
	// set opacity to nill on page load
	$("img.rollover2").css("opacity","1");
	// on mouse over
	$("img.rollover2").hover(function () {
		// animate opacity to full
		$(this).stop().animate({
			opacity: 0.7
		}, "fast");
	},
	// on mouse out
	function () {
		$(this).stop().animate({
			opacity: 1
		}, "fast");
	});	
}

function ajax(url,div){
	ajax3(div,url);	
}

