$(document).ready(function() {

	$('#nivo-slider').css({width: "480px", height: "266px"});
    $('#nivo-slider').nivoSlider({
        effect:'random', //Specify sets like: 'fold,fade,sliceDown'
        slices:10,
        animSpeed:700, //Slide transition speed
        pauseTime:4000,
        startSlide:0, //Set starting Slide (0 index)
        directionNav:false, //Next & Prev
        directionNavHide:true, //Only show on hover
        controlNav:false, //1,2,3...
        controlNavThumbs:false, //Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, //Use image rel for thumbs
        controlNavThumbsSearch: '.jpg', //Replace this with...
        controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
        keyboardNav:true, //Use left & right arrows
        pauseOnHover:false, //Stop animation while hovering
        manualAdvance:false, //Force manual transitions
        captionOpacity:0.8, //Universal caption opacity
        beforeChange: function(){},
        afterChange: function(){},
        slideshowEnd: function(){}, //Triggers after all slides have been shown
        lastSlide: function(){}, //Triggers when last slide is shown
        afterLoad: function(){} //Triggers when slider has loaded
    });
	
	$("a.galeria_imagens").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
	
	$(".link_menu").hover(
	
		function () {
			
			$(this).stop(true,false).animate(
			
				{backgroundPosition:"(right -40px)",color:"#fff"}, 
				170
			
			);

			$(this).next(".link_menu_1").stop(true,false).animate(
			
				{backgroundPosition:"(left -40px)",color:"#fff"}, 
				170
			
			);

		},
		function () {
			
			$(this).animate(
			
				{backgroundPosition:"(right 0px)",color:"#000"}, 
				550
			
			);	
			
			$(this).next(".link_menu_1").animate(
			
				{backgroundPosition:"(left 0px)",color:"#000"}, 
				550
			
			);	
			
		}	
	
	);
	
	$(".link_menu_1").hover(
	
		function () {
			
			$(this).prev(".link_menu").stop(true,false).animate(
			
				{backgroundPosition:"(right -40px)",color:"#fff"}, 
				170
			
			);

			$(this).stop(true,false).animate(
			
				{backgroundPosition:"(left -40px)",color:"#fff"}, 
				170
			
			);

		},
		function () {
			
			$(this).prev(".link_menu").animate(
			
				{backgroundPosition:"(right 0px)",color:"#9c9c9c"}, 
				550
			
			);	
			
			$(this).animate(
			
				{backgroundPosition:"(left 0px)",color:"#9c9c9c"}, 
				550
			
			);	
			
		}	
	
	);
	
	$(".frases").hover(
	
		function () {
			
			$(this).stop(true,false).animate(
			
				{backgroundPosition:"(0px -30px)",color:"#0033CC",marginLeft:"20px"}, 
				200
			
			);

			
		},
		function () {
			
			$(this).animate(
			
				{backgroundPosition:"(0px 0px)",color:"#fff",marginLeft:"0px"}, 
				400
			
			);		
			
		}	
	
	);
	
	$(".item").hover(
	
		function () {
		
			$(this).stop(true,false).animate(
			
				{backgroundPosition:"(0px 0px)", color: "#0033CC", paddingLeft: "50px"},
				300
			
			);	
			
		},
		function () {
			
			$(this).animate(
			
				{backgroundPosition:"(-330px 0px)", color: "#fff", paddingLeft: "30px"},
				500
			
			);
			
		}

	);
	
	$('#mensagem_caixa').dialog({

		show: "drop",
		
		hide: "drop",

		autoOpen: false,

		width: 400,

		modal: true,

		resizable: false,

		buttons: {

			"Fechar": function() { 

				$(this).dialog("close"); 

			} 

		}

	});				
	
	$('.contato').click(function(){

		$('#entrar_contato_caixa').dialog('open');

		return false;

	});
	
	$('#entrar_contato_caixa').dialog({
		
		show: "drop",
		
		hide: "drop",

		autoOpen: false,

		width: 500,

		modal: true,

		resizable: true,

		buttons: {

			"Enviar": function() { 

				$("#formulario_entrar_contato").submit(); 

			}, 

			"Cancelar": function() { 

				$(this).dialog("close"); 

			} 

		}

	});		

});

