jQuery.fn.fadeToggle = function(speed, callback) {
   return this.animate({opacity: 'toggle'}, speed, callback);

}; 
$(document).ready(function(){
	$(".highlight").parent().attr("class","highlight");
    $(".highlight").parent().find(".red").addClass("black").removeClass("red");
	
	// INIZIO FUNZIONE COMPARSA/SCOMPARSA PANNELLO ARCHIVIO CAMPIONATI
	$(function() {
		var isArchivio = $.urlParam('archivio');
		$('.panelArchivio').show();
		if(isArchivio != 1) {
			$('.panelArchivio div').hide();
		} else {
			if(typeof document.body.style.maxHeight === "undefined") {
				$('#fin').hide();				
			};
		}
		$('.panelArchivio ul li:last').css('border-bottom','none');
		$('.panelArchivio .toggler').click(function() {
			$('.panelArchivio div').fadeToggle("normal", toggleSelect);
			return false
		});
		function toggleSelect() { /* nascondo le select su ie crap */
			if(typeof document.body.style.maxHeight === "undefined") {
				$('#fin').toggle();				
			};
		};
		$(document).click(function() {
			$('.panelArchivio div').fadeOut();
		});
	});
	// FINE FUNZIONE COMPARSA/SCOMPARSA PANNELLO ARCHIVIO CAMPIONATI
	
});

function getClassificaGenerale(id_form){
	var poststr = $("#"+id_form).formSerialize();
	makePOSTRequest("getClassificaGenerale.php",poststr,"classifica_generale");
}

function getClassificaMarcatori(id_form){
	var poststr = $("#"+id_form).formSerialize();
	makePOSTRequest("getClassificaMarcatori.php",poststr,"classifica_marcatori");
}

function getProvvedimenti(id_form){
	var poststr = $("#"+id_form).formSerialize();
	makePOSTRequest("getClassificaProvvedimenti.php",poststr,"classifica_provvedimenti");
}