	/*------------------------------------------------------------------------------------------------------------
	 PEQUENAS DESCRIÇÕES NO MENU SUPERIOR
	--------------------------------------------------------------------------------------------------------------
	*/
	
	/**
	 * Encapsula as strings em tags <span> no menu de dicas
	 */

	var str = [
		"Graduação",
		"15 áreas",
		"Cursos Customizados Para Empresas",
		"Curta Duração"
	];

	jQuery("#header .menu-meio li a").each(function() {
		var e = jQuery(this);
        for (i in str) {
			e.html(e.html().replace(str[i], '<span>'+str[i]+'</span>'));
		}
	});
	
	//------------------------------------------------------------------------------------------------------------
	// DROWMENU SUPERIOR
	//------------------------------------------------------------------------------------------------------------
	
	jQuery('#header .menu-meio li, #header .menu-meio li ul').hover(
		function () {
			jQuery(this).find('ul:first').stop(true,true).slideDown('fast');

		}, function () {
			jQuery(this).find('ul:first').stop(true,true).fadeOut('fast');
		}
	);
	jQuery('#header .menu-meio > li > a').click(function (e) { e.preventDefault(); });
	
	//------------------------------------------------------------------------------------------------------------
	// VITRINE DA HOME
	//------------------------------------------------------------------------------------------------------------

	/* Banner destaque do topo */
	var BANNER_ATUAL = 0;
	var INTERVAL_BANNER;
	var trocaBanner = function(){
		jQuery('.vitrine .destaque ul li').eq(BANNER_ATUAL).fadeOut();
		var num_banners = jQuery('.vitrine .destaque ul li').length;
		if(BANNER_ATUAL == (num_banners - 1)){
			BANNER_ATUAL = 0;
		}
		else{
			BANNER_ATUAL++;
		}
		jQuery('.vitrine .destaque ul li').eq(BANNER_ATUAL).fadeIn();
		
		jQuery('.vitrine .botoes ul li').fadeTo(0, 0.4, function(){
			jQuery('.vitrine .botoes ul li').eq(BANNER_ATUAL).fadeTo(0, 1);
		})
	}
	var atualizaBanner = function(){
		trocaBanner(BANNER_ATUAL);
	}
	var initBannerRotativo = function(){
		INTERVAL_BANNER = setInterval(atualizaBanner, 4000);
	}
	jQuery('document').ready(function(){
		jQuery('.vitrine .botoes ul li').click(function(){
			clearInterval(INTERVAL_BANNER);
			
			jQuery('.vitrine .destaque ul li').eq(BANNER_ATUAL).fadeOut();
			BANNER_ATUAL = jQuery(this).index();
			jQuery('.vitrine .destaque ul li').eq(BANNER_ATUAL).fadeIn();
			
			jQuery('.vitrine .botoes ul li').fadeTo(0, 0.4, function(){
				jQuery('.vitrine .botoes ul li').eq(BANNER_ATUAL).fadeTo(0, 1);
			})
			
			initBannerRotativo();
		});
		jQuery('.vitrine .botoes ul li').fadeTo(0, 0.4, function(){
			jQuery('.vitrine .botoes ul li').eq(BANNER_ATUAL).fadeTo(0, 1);
		})
		initBannerRotativo()
	})
