function resetAlert(){
	$('.alert').remove();
}
//$(document).ready(function(){
	// Main Menu
	$('.nav').superfish({ 
		pathClass : 'current',
		animation : {opacity:'show'},
		delay : 1000
	});	
	
	// No click
	$('.noclick').click(function(){ return false; });
	
	// Flashnews	
	//$("ul#flashnews").liScroll({travelocity: 0.015});
	
	// Simple Search
	$('#q').click(function(){
		if($(this).val() == "Nome...")
			$(this).val('');
	});
	$('#simple-search').submit(function(){
		var q = jQuery.trim($('#q').val());		
		if(q.length < 3) {
			$('#simple-search-msg').html('Inserire almeno 3 caratteri!');
			return false;
		}
		if(q == 'Nome...'){
			$('#simple-search-msg').html('Inserire 1 chiave di ricerca!');
			return false;
		}
	});
	
	 // Bottom Feedback
	 $('#FeedbackSuggestForm').submit(function(){
	    var f = $(this);
        f.find('.loading').show();	
		var opt = {		 		
				target: '#feedback-response',
				dataType: 'json',
				//clearForm: true,
				error: function(message){
					alert('Error: '+message.status);
				},
				success: function(data){
					f.find('.loading').hide();
					
					if(data.success) {
						$('#feedback-response').html('<span class="bold">'+data.message+'</data>');
						f.clearForm();
					}				
					else
						$('#feedback-response').html('<span class="alert">'+data.message+'</data>');																				
				}
		}
		$(this).ajaxSubmit(opt)
		return false;
	});
		
	// Tabs
	try{
	   $('ul.ui-tabs-nav').tabs({fxFade: true, fxSpeed: 'slow'});
	}
	catch(e){}
	
//});