function trim(stringa){
	while (stringa.substring(0,1) == ' '){
		stringa = stringa.substring(1, stringa.length);
	}
	while (stringa.substring(stringa.length-1, stringa.length) == ' '){
		stringa = stringa.substring(0,stringa.length-1);
	}
	return stringa;
}

// ------------------------------------------------------------
function setSH() {

	var myElements = ".btSh";

	$(myElements).each(function(i) {

		$(this).click(function() {

			if($(this).next('div').css('display') == 'none')
				$(this).next('div').show('slow');
			else
				$(this).next('div').hide('slow');
		});
	});
}
// -------------------------------------------------------------------------

function setBanner() {
	setTimeout( function(){
		$.colorbox({inline:true, href:"#riqBanner", open:true, transition: "elastic"});
	}, 1000);

	$('#riqBanner').click(function() {
		$.colorbox.close();
		window.open('http://www.fispec.it');
	});
}

// -------------------------------------------------------------------------

$(document).ready(function(){
	setSH();
	//fleXenv.initByClass("riqScrollH_int");
	$("a.gallery").colorbox({slideshow:true,height:"90%"});
	$(".popup").colorbox({inline:true, width:"40%"});
});



