
/* FUNÇAO PARA PESUISAR CURSOS DO LINK UNIAMRIGS NOSSOS CURSOS **/
$(function(){
	
	$("#scroll2").jCarouselLite({
		auto    : 1000,
		speed   : 2000,
		visible : 1
	});
	
	$('#resposta').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>');
	$.post(
		'templates/uniamrigs/cursos/processacurso.php',
		$('#formdata').serialize(),
		function(retorno){
			$('#resposta').html(retorno);
		}
	);
	
	$('#mes').change(function(){
		$('#resposta').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/uniamrigs/cursos/processacurso.php',
			$('#formdata').serialize(), 
			function(retorno){
				$('#resposta').html(retorno);
			}
		);	
	});
		

	$('#ano').change(function(){
		$('#resposta').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/uniamrigs/cursos/processacurso.php',
			$('#formdata').serialize(), 
			function(retorno){
				$('#resposta').html(retorno);
			}
		);	
	});
});


/** FIM DA FUNÇÃO **/

/* FUNÇAO PARA PESQUISAR EVENTOS DO LINK AGENDA DE EVENTOS - EVENTOS NA AMRIGS **/
$(function(){
	$('#respostaEventos').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>');
	$.post(
		'templates/agenda_eventos/processaevento.php',
		$('#formdataEventos').serialize(),
		function(retorno){
			$('#respostaEventos').html(retorno);
		}
	);
	
	$('#mesEventos').change(function(){
		$('#respostaEventos').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/agenda_eventos/processaevento.php',
			$('#formdataEventos').serialize(), 
			function(retorno){
				$('#respostaEventos').html(retorno);
			}
		);	
	});
	
	$('#anoEventos').change(function(){
		$('#respostaEventos').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/agenda_eventos/processaevento.php',
			$('#formdataEventos').serialize(), 
			function(retorno){
				$('#respostaEventos').html(retorno);
			}
		);	
	});

});
/** FIM DA FUNÇÃO **/

/* FUNÇAO PARA PESQUISAR EVENTOS DO LINK AGENDA DE EVENTOS - OUTROS EVENTOS **/
$(function(){
	$('#respostaOutros').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>');
	$.post(
		'templates/agenda_eventos/processaeventooutros.php',
		$('#formdataOutros').serialize(),
		function(retorno){
			$('#respostaOutros').html(retorno);
		}
	);
	
	$('#mesOutros').change(function(){
		$('#respostaOutros').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/agenda_eventos/processaeventooutros.php',
			$('#formdataOutros').serialize(), 
			function(retorno){
				$('#respostaOutros').html(retorno);
			});	
		});

	$('#anoOutros').change(function(){
		$('#respostaOutros').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/agenda_eventos/processaeventooutros.php',
			$('#formdataOutros').serialize(), 
			function(retorno){
				$('#respostaOutros').html(retorno);
			});	
		});

});
/** FIM DA FUNÇÃO **/


/* FUNÇAO PARA PESQUISAR EVENTOS DO LINK AGENDA DE EVENTOS - EVENTO CULTURAL **/
$(function(){
	$('#respostaCultural').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>');
	$.post(
		'templates/agenda_eventos/processaeventocultural.php',
		$('#formdataCultural').serialize(),
		function(retorno){
			$('#respostaCultural').html(retorno);
		}
	);
	
	$('#mesCultural').change(function(){
		$('#respostaCultural').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/agenda_eventos/processaeventocultural.php',
			$('#formdataCultural').serialize(), 
			function(retorno){
				$('#respostaCultural').html(retorno);
			});	
		});

	$('#ano').change(function(){
		$('#respostaCultural').html('<div style="text-align:center; width:100%;margin-top:20px"> <img src="img/loader.gif" /></div>'); 
		$.post(
			'templates/agenda_eventos/processaeventocultural.php',
			$('#formdataCultural').serialize(), 
			function(retorno){
				$('#respostaCultural').html(retorno);
			});	
		});
});
/** FIM DA FUNÇÃO **/

	$(function() {
		var settings = { containerResizeSpeed: 350 };
		$('#gallery a').lightBox(settings);
		$('#gallery23 a').lightBox(settings);
		$('#galleryfotos a').lightBox(settings);
		$('#galleryAA a').lightBox(settings);
		
	});
	
	function galeria(){}
	

function IEHoverPseudo() {

	var navItems = document.getElementById("primary-nav").getElementsByTagName("li");
	
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}

}
window.onload = IEHoverPseudo;

	$(document).ready(function() {
			$('dt + dd').addClass('abre-fecha')		
			$('dd + dd').hide();
			
			$('.abre-fecha').text('Ler');
			$('.abre-fecha').click(function(){
			if ($(this).text() == 'Ler') { 
				$(this).next().next().toggle();
				$(this).text('Fechar [ x ]');
				$(this).next().addClass('estilo-um')
				.slideToggle('slow');
			} else {
				$(this).text('Ler');
				$(this).next().slideToggle('slow');
				$(this).next().next().toggle();
			}
		});
	});
   


	$(document).ready(function(){
		$('#photos').galleryView({
			panel_width: 579,
			panel_height: 434,
			frame_width: 80,
			frame_height: 60/**/
		});
		
	});

