// JavaScript Document
$(function(){
	
	//$(".depoimentos").dropShadow({left: 2, top: 2, opacity: 0.1});
	//$(".coluna_3_2 .box1").dropShadow({left: 2, top: 2, opacity: 0.1});
	//$(".coluna_3_2 .box2").dropShadow({left: 2, top: 2, opacity: 0.1});
	//Cufon.replace('h1,h2',{fontFamily:'rage'});
    $('.slider').nivoSlider({
		effect:'sliceUpDown',
		pauseTime:5000,		
		directionNav:false
	});	
	
	$(window).load(function(){
		setTimeout(function(){
			$('.jcarousel-skin-name').jcarousel({
				scroll:2,
				wrap: 'circular',
				auto:15,
				itemLoadCallback:{
					onBeforeAnimation:function(){
						$('#produtos .carousel li img').reflect({height:0.6});
					}
				}
			});
		},500);
	});	
	
	$('#menu .links li').hover(function(){
		$(this).find('.submenu').fadeIn('fast');
	},function(){
		$(this).find('.submenu').fadeOut('fast');		
	});
	
	
	$('.seta_proximo, .seta_anterior')
	.css('cursor','pointer')
	.hover(function(){
		$(this).css({"background-position":"0px -25px"});
	},function(){
		$(this).css({"background-position":"0px 0px"});		
	});
	
	$('.submenu a').hover(function(){
		var figura = $(this).attr('rel');
		
		
		if(figura == "NONE" || figura == "none"){}else{
		$(this).parents('.submenu').find('.logos').empty().append('<img src="'+figura+'" />');
		}
	},function(){
		$(this).parents('.submenu').find('.logos').empty()
	});
	
	jQuery("#facebook").animate({'marginTop':'18px'} , 1500 );
	
});

function enviardados2(form_news) {
	nomey = document.form_news.nome_news.value;
	emaily = document.form_news.email_news.value;
	if (nomey == "Nome..." || nomey.length < 2) {
		alert("Preencha o nome corretamente");
		document.form_news.nome_news.focus();
		return false;
	}
	
	if (emaily == "Email..." || emaily.length < 2 || emaily.indexOf("@")<3) {
		alert("Preencha o email corretamente");
		document.form_news.email_news.focus();
		return false;
	}	
}

