var ocheck = "open";
var ccheck = "chiaro";
function OpenClose() {
	if (ocheck == "open") {
		document.getElementById('over1').style.height='30px';
		document.getElementById('openclose').src='../img/open.png';
		ocheck = "close";
	} else {
		document.getElementById('over1').style.height='auto';
		document.getElementById('openclose').src='../img/close.png';
		ocheck = "open";
	}
}

function Contrasto() {
	if (ccheck == "chiaro") {
		document.getElementById('over1').style.background='url(../img/trsp80.png)';
		ccheck = "medio";
	} else if (ccheck == "medio") {
		document.getElementById('over1').style.background='url(../img/trsp50.png)';
		ccheck = "scuro";
	} else {
		document.getElementById('over1').style.background='url(../img/trsp60.png)';
		ccheck = "chiaro";
	}
}

jQuery(document).ready(function($) {
	$("a[rel=froom]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {return '<span id="fancybox-title-over">'+title+'</span>';
		}
	});
	$("a[rel=fbox]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {return '<span id="fancybox-title-over">'+title+'<br><span style="font-weight:100">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + '</span></span>';
		}
	});
	$("a[rel=fframe]").fancybox({
		'titleShow'		: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'type'			: 'iframe',
		'autoScale'		: true
	});
});


function OpenLink(ThisLink){
	document.location.href=ThisLink;
}
