$().ready(function() {	
	
	//Fazer campo de Webmail trocar de cor e sumir ou aparecer com legenda
	$('div.webmail input').focus(function() {
		if ($(this).val() == 'login') {										  
				$(this).removeClass('f-gray').val('');
		}
		else if ($('div.webmail input[name=p]').val() == ''){
			$(this).removeClass('f-pass');
		}
	});
	$('div.webmail input').blur(function () {
		if ($(this).val() == '') {
			if ($(this).attr('name') == 'p') {
				$(this).addClass('f-pass');
			} else {
				$(this).addClass('f-gray').val('login');
			}
		}
	});
	
	//trocando cores de lis do menu ao passar o mouse sobre elas
	$('#side-nav li a').hover(function() {
	
			if ($(this).parent('li').attr('class') != $('body').attr('id')) {
				$(this).addClass('color').addClass('opacity');	
			}

	}, function() {
			if ($(this).parent('li').attr('class') != $('body').attr('id')) {
				$(this).removeClass('color').removeClass('opacity');	
			}
	});
	
	$('#sub-nav li a').hover(function() {
	
			if ($(this).attr('sel') == $('.sub-nav').attr('sel')) {
				$(this).addClass('color').addClass('opacity');	
			}

	}, function() {
			if ($(this).attr('sel') == $('.sub-nav').attr('sel')) {
				$(this).removeClass('color').removeClass('opacity');	
			}
	});	

});
