// INNERFADE NEWS FUNCTION ---------------------------------------------------------------
$(document).ready(
	function(){
		$('#news').innerfade({
			animationtype: 'fade',
			speed: 750,
			timeout: 7000,
			type: 'sequence',
			containerheight: '202px'
		});
		$('#eventi').innerfade({
			animationtype: 'fade',
			speed: 750,
			timeout: 7000,
			type: 'sequence',
			containerheight: '152px'
        });

        $('#newsSmall').innerfade({
            animationtype: 'fade',
            speed: 750,
            timeout: 7000,
            type: 'sequence',
            containerheight: '171px'
        });
		
		$('ul#portfolio').innerfade({
			speed: 1000,
			timeout: 5000,
			type: 'sequence',
			containerheight: '220px'
		});
		
		$('.fade').innerfade({
			speed: 1000,
			timeout: 6000,
			type: 'random_start',
			containerheight: '1.5em'
		});
		
		$('.adi').innerfade({
			speed: 'slow',
			timeout: 5000,
			type: 'random',
			containerheight: '150px'
		});

	});

// PLAYER VIDEO-AUDIO FUNCTION ------------------------------------------------------------
	var player;
	function playerReady(thePlayer) { player = document.getElementById("radio"); }

	function loadNplay(idx){
		player.sendEvent("ITEM", idx);
		player.sendEvent("PLAY", 'true');
	};
	
// ACCONDITION FUNCTION -------------------------------------------------------------------
	ddaccordion.init({
	headerclass: "TitleContents",
	contentclass: "Contents",
	revealtype: "click",
	collapseprev: false,
	defaultexpanded: [0,1,2,3,4,5,6,7,8,9,10],
	onemustopen: false,
	animatedefault: false,
	persiststate: false,
	toggleclass: ["OpenContents", "CloseContents"],
	togglehtml: ["src", "images/Arrow_Dw.gif","images/Arrow_Up.gif"],
	animatespeed: "fast",
	oninit:function(expandedindices){
	},
	onopenclose:function(header, index, state, isuseractivated){
	}
	})

// POPUP MESSAGE
	function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
	}
