window.onload = function() {
	
	/*
	//Questo script richiede jQuery
	$('form.InnerLabelInputs').each(function() {
		$(this).find('input[type=text],input[type=password]').each(function () {
			if($(this).val()) {
				var original_val = $(this).val();
				$(this).focus(function() { if ($(this).val() == original_val) $(this).val(''); });
				$(this).blur(function()  { if (!$(this).val())                $(this).val(original_val); });
			}
		});
	});
	*/
	
	if (typeof jQuery != 'undefined') {
		//Questo script richiede jQuery
		if($.browser.safari)  $('head').append('<link href="../includes/safari_fixes.css" rel="stylesheet" type="text/css" media="screen" />');
		if($.browser.msie) $('head').append('<link href="../includes/msie_fixes.css" rel="stylesheet" type="text/css" media="screen" />');
		
		//Questo script richiede jQuery
		$('#nav li').each(function() {
			$(this).mouseover(function()  { $(this).find('ul').show(); $(this).children().addClass('hover');    });
			$(this).mouseleave(function() { $(this).find('ul').hide();  $(this).children().removeClass('hover'); });
		});
		
		if (typeof $.fn.tooltip == 'function') {
			$(document).ready(function() {
				$("a").tooltip({
					showURL: false,
					track: true,
					positionLeft: false,
					top: 30,
					left: 0
				});
		
				$("img").tooltip({
					showURL: false,
					track: true,
					positionLeft: false,
					top: 25,
					left: 0
				});
			});
		}
	}
}
