// NIVOSLIDER
$(window).load(function() { $('#slider').nivoSlider(); });

// NIVOSLIDER
$(window).load(function() { $('#slider2').nivoSlider(); });

// SCRIPT PER MENU' A TENDINA
$(document).ready(function () {	
$('#nav li.menualto').hover(
function () {$('ul', this).slideDown(100);}, 
function () {$('ul', this).slideUp(100);}
);});

// SCRIPT PER IL CAMBIO DELLO SFONDO DI PAGINA
var randombgs=["/struttura/sfondo-1.jpg", "/struttura/sfondo-2.jpg", "/struttura/sfondo-3.jpg", "/struttura/sfondo-4.jpg", "/struttura/sfondo-5.jpg"]
var randnum = Math.random();
var inum = 5;
var rand1 = Math.round(randnum * (inum-1)) + 1;
images = new Array
images[1] = "/struttura/sfondo-1.jpg"
images[2] = "/struttura/sfondo-2.jpg"
images[3] = "/struttura/sfondo-3.jpg"
images[4] = "/struttura/sfondo-4.jpg"
images[5] = "/struttura/sfondo-5.jpg"
var image = images[rand1]

// SCRIPT PER CAMBIO DELLE IMMAGINI NELLE PAGINE INTERNE
function cambiaimg(id)
{
document.getElementById('fotox').src=document.getElementById(id).src
}


// SCRIPT PER MINIATURE SOCIAL NETWORKS


$(document).ready(function(){
$("img.facebooka").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
$("img.twittera").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});

$("img.youtubea").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});

$("img.flickra").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});

$("img.googlea").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});

$("img.wellnessa").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
 
});


