$(document).ready(function() {
			
			$.getScript('js/jquery.wait.js');
			
			$('ul.contentMenu li:last').css('border','none');
			
			$('#menu ul li a:not(.current)').hoverIntent(function() {
				$(this).animate({ backgroundColor: '#EBEBEB'}, 500);
					}, function() {
				$(this).animate({ backgroundColor: '#FFE422'}, 500);
			});
			
			$('input.myTextinput, textarea.myTextarea, select.mySelect').focus(
					function() {
						$(this).css({'background':'#FFFFFF','border-color':'#999999'});
					});
			$('input.myTextinput, textarea.myTextarea, select.mySelect').blur(
					function() {
						$(this).css({'background':'#F3F3F3','border-color':'#E0E0E0'});
					});			
			
			$(function() {
				$("a[rel='_blank']").attr("target","_blank");				
			});
			
			$('a.scrollTop').click(function(){
				$('html, body').animate({scrollTop:0}, 'slow');
				return false
			});
			
			$('a.getBack').click(function(){
				history.back();
				return false
			});
									
			//FUNZIONE PER LA GESTIONE DEI ROLLOVER E DELLO STATUS ACTIVE DEL MEDIA ARCHIVE IN CASO DI NAVIGAZIONE AJAX
			
			/*$('ul#mediaArchive li:first-child').addClass('currentContent');
			$('ul#mediaArchive li a').parent().bind("click", function(e){
      			$('ul#mediaArchive li').removeClass('currentContent');
				$(this).addClass('currentContent');
				$('html, body').wait(500).animate({scrollTop:0}, 'slow');
				return false
    		});*/
			$('ul#mediaArchive li').click(function() {
				var mediaArchiveLink = $(this).find('a').attr('href');
				location = mediaArchiveLink;
			});
			$('ul#mediaArchive li a').parent().bind("mouseenter mouseleave", function(e){
        		//if (! $(this).hasClass("currentContent") ) {
					$(this).toggleClass('hoverContent');
				//}
    		});
    		
			
});
