//SWFObject settings
var flashvars = {};
var params = {
	wmode: "transparent",
	menu: "false",
	allowfullscreen: "false"
};
var attributes = {};

$(document).ready(function() {

	animatedcollapse.addDiv('programa', 'fade=0,speed=400,hide=0')
	animatedcollapse.addDiv('p01', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p02', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p03', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p04', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p05', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p06', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p07', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p08', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p09', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p10', 'fade=0,speed=400,hide=1')
	animatedcollapse.addDiv('p11', 'fade=0,speed=400,hide=1')

	animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
		//$: Access to jQuery
		//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
		//state: "block" or "none", depending on state
	}

	animatedcollapse.init();

	/*$('#popup .content')
		//.width($('#popup .content img').width())
		//.height($('#popup .content img').height())
		.attr('margin-left', 'auto').attr('margin-right', 'auto');*/

	//Popup
	$('.close-popup-btn').click(function(e) {
		//Set cookie to avoid recurrent shows of the popup
		$.cookie('popup', '1', {expires: 1, path: '/'});
		
		$('#popup').hide('slow');
		e.preventDefault();
	});

	//$.cookie('popup', null);
});
