(function ($){$(document).ready(function(){	
	$('#search-block-form .form-text').attr('value','');
	
	var tn = $('#time').html();	
	switch (tn) {
		case 'diario': tn = 'Top Di&aacute;rio'; break;		
		case 'semanal': tn = 'Top Semanal'; break;
		case 'mensal': tn = 'Top Mensal'; break;
		case 'anual': tn = 'Top Anual'; break;
		case 'top': tn = 'Top'; break;
		case 'recentes': tn = 'Recentes'; break;
		default:		 
	}	
	$("#topnew-menu .menu-title").html(tn);	
	
	$('#menu li').click(function() {		
		if ($(this).is(".black-menu")) {
			$(this).siblings().removeClass('pressed');	
			$(this).toggleClass('pressed');
		}		
	})

	$('#topnew-menu').click(function() {
		$("#topnew-dropdown").siblings().hide();		
		$("#topnew-dropdown").slideToggle();
	})

	$('#category-menu').click(function(e) {			
		$("#category-dropdown").siblings().hide();	
		$("#category-dropdown").slideToggle();		
	})
		
	$('#location-menu').click(function(e) {		
		$("#location-dropdown").siblings().hide();		
		$("#location-dropdown").slideToggle();			
	})
	
	$('#submit-menu').click(function() {
		$("#modal-wrapper").show();
		$("#modal-title").html("Envie um Site");
		$("#site-node-form").show();	
	})
	
	$('#signup-menu').click(function() {	
		$("#modal-wrapper").show();
		$("#modal-title").html("Cadastre-se");
		$("#user-register-form").show();	
	})
	
	$('#login-menu').click(function() {	
		$("#modal-wrapper").show();
		$("#modal-title").html("Entrar");
		$("#user-login").show();
		$("#forget").show();
	})
	
	$('#modal-close, #modal-screen').click(function() {
		$("#modal-wrapper").hide();
		$("#modal-form form").hide();
		$("#forget").hide();				
	})	
});})(jQuery);;

