$(document).ready(function() {

	    //Activate FancyBox
            $("a#gallery21").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems21
			});
            $("a#gallery20").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems20
			});
            $("a#gallery19").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems19
			});
            $("a#gallery18").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems18
			});
            $("a#gallery17").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems17
			});
            $("a#gallery16").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems16
			});
	    $("a#gallery15").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems15
			});
            $("a#gallery14").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems14
			});
            $("a#gallery13").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems13
			});
            $("a#gallery12").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems12
			});
            $("a#gallery11").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems11
			});
            $("a#gallery10").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems10
			});
            $("a#gallery9").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems9
			});
            $("a#gallery8").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems8
			});
            $("a#gallery7").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems7
			});
            $("a#gallery6").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems6
			});
	    $("a#gallery5").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems5
			});
            $("a#gallery4").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems4
			});
            $("a#gallery3").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems3
			});
            $("a#gallery2").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems2
			});
            $("a#gallery1").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems1
			});
	    $("a#gallery").fancybox({
                'overlayOpacity': 0.8,
                'overlayShow':	true,
				'itemLoadCallback': getGroupItems
			});
	    $("a#testoMostre1, a#testoMostre3, a#testoMorale,"+
		"a#testoDeliadi, a#testoIppografie, a#testoBestiario, a#testoDeArte, a#testoTabulae,"+
		"a#testoTarocchi, a#testoGiocare, a#testoStranivarius, a#testoRomagna, a#testoBriganti").fancybox({
                'zoomSpeedIn': 0,
                'zoomSpeedOut': 0,
                'overlayOpacity': 0.8,
                'overlayShow':	true,
                'frameWidth': 650,
                'frameHeight': 550
			});
	    $("a#testoMostre2").fancybox({
                'zoomSpeedIn': 0,
                'zoomSpeedOut': 0,
                'overlayOpacity': 0.8,
                'overlayShow':	true,
                'frameWidth': 780,
                'frameHeight': 580
			});
	    $("a#video1, a#video2, a#video3, a#video4").fancybox({
                'zoomSpeedIn': 0,
                'zoomSpeedOut': 0,
                'overlayOpacity': 0.8,
                'overlayShow':	true,
                'frameWidth': 425,
                'frameHeight': 355
			});
});

var imageList21 = [
	{url: "img/PugliaInFavola/1.JPG"}
];
var imageList20 = [
	{url: "img/Favolare/1.JPG"}
];
var imageList19 = [
	{url: "img/Udededo/1.JPG"}
];
var imageList18 = [
	{url: "img/LaCittaDelleLettere/1.JPG"}
];
var imageList17 = [
	{url: "img/LaPenna/1.JPG"}
];
var imageList16 = [
	{url: "img/PagineScritteAMano/1.JPG"}
];

var imageList15 = [
	{url: "img/AltreGrafiche/1.jpg"},
	{url: "img/AltreGrafiche/2.jpg"},
	{url: "img/AltreGrafiche/3.jpg"},
	{url: "img/AltreGrafiche/4.jpg"}
];
var imageList14 = [
	{url: "img/Bestiario/3.jpg"},
	{url: "img/Bestiario/4.jpg"},
	{url: "img/Bestiario/5.jpg"}
];
var imageList13 = [
	{url: "img/DiarioDelSud/1.jpg"}
];
var imageList12 = [
	{url: "img/LaMoraleDellaFavola/1.jpg"}
];
var imageList11 = [
	{url: "img/IlGrassiere/1.jpg"}
];
var imageList10 = [
	{url: "img/Giocare/s3.jpg"},
	{url: "img/Giocare/s1.jpg"},
	{url: "img/Giocare/s2.jpg"}
];
var imageList9 = [
	{url: "img/De_Arte/1.jpg"}
];
var imageList8 = [
	{url: "img/Bestiario/1.jpg"},
	{url: "img/Bestiario/2.jpg"}
];
var imageList7 = [
	{url: "img/Ippografie/1.JPG"},
	{url: "img/Ippografie/2.JPG"},
	{url: "img/Ippografie/3.JPG"}
];
var imageList6 = [
	{url: "img/Deliadi/catalogo.jpg"}
];
var imageList5 = [
	{url: "img/Tabulae/tabula1.jpg"},
	{url: "img/Tabulae/tabula2.jpg"},
	{url: "img/Tabulae/tabula3.jpg"},
	{url: "img/Tabulae/tabula4.jpg"}
];
var imageList4 = [
	{url: "img/Stranivarius/s1.jpg"},
	{url: "img/Stranivarius/s4.jpg"},
	{url: "img/Stranivarius/s3.jpg"},
	{url: "img/Stranivarius/s2.jpg"},
	{url: "img/Stranivarius/s5.jpg"}
];
var imageList3 = [
	{url: "img/Pugliamare/pugliamare1.jpg"}
];
var imageList2 = [
	{url: "img/Briganti/stele.jpg", title: "Il Giuramento"}
];
var imageList1 = [
	{url: "img/Tarocchi/4_L_Imperatore.jpg", title: "L'Imperatore"},
	{url: "img/Tarocchi/12_L_Appeso.jpg", title: "L'appeso"},
	{url: "img/Tarocchi/0_Il_Matto.jpg", title: "Il Matto"}
];
var imageList = [
	{url: "img/FogliDiRomagna/Forli_Piazzetta_della_Misura.jpg", title: "Forli - Piazzetta della Misura"},
	{url: "img/FogliDiRomagna/Castrocaro.jpg", title: "Castrocaro"},
	{url: "img/FogliDiRomagna/Cervia.jpg", title: "Cervia"},
	{url: "img/FogliDiRomagna/Ravenna_1.jpg", title: "Ravenna"},
	{url: "img/FogliDiRomagna/Monte_Poggiolo.jpg", title: "Monte Poggiolo"}
];

function getGroupItems21(opts) {
	jQuery.each(imageList21, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems20(opts) {
	jQuery.each(imageList20, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems19(opts) {
	jQuery.each(imageList19, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems18(opts) {
	jQuery.each(imageList18, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems17(opts) {
	jQuery.each(imageList17, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems16(opts) {
	jQuery.each(imageList16, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems15(opts) {
	jQuery.each(imageList15, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems14(opts) {
	jQuery.each(imageList14, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems13(opts) {
	jQuery.each(imageList13, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems12(opts) {
	jQuery.each(imageList12, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems11(opts) {
	jQuery.each(imageList11, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems10(opts) {
	jQuery.each(imageList10, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems9(opts) {
	jQuery.each(imageList9, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems8(opts) {
	jQuery.each(imageList8, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems7(opts) {
	jQuery.each(imageList7, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems6(opts) {
	jQuery.each(imageList6, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems5(opts) {
	jQuery.each(imageList5, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems4(opts) {
	jQuery.each(imageList4, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems3(opts) {
	jQuery.each(imageList3, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems2(opts) {
	jQuery.each(imageList2, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems1(opts) {
	jQuery.each(imageList1, function(i, val) {
	opts.itemArray.push(val);
    });
}
function getGroupItems(opts) {
	jQuery.each(imageList, function(i, val) {
	opts.itemArray.push(val);
    });
}

