function apriPop(url, name, w, h) {
	var l = Math.floor((screen.width-w)/3);
	var t = Math.floor((screen.height-h)/3);
	window.open(url,name,'width=' + w + ',height=' + h + ',top=' + t + ',left=' + l);
}

//semplice show/hide del primo div sotto la classe btSh
function setSH() {

	var myElements = '.btSh';

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

		$(this).click(function() {

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

	});

}

function preferiti() {
    var title = document.title;
    var url = document.location.href;
    if (window.sidebar) // Mozilla Firefox
    {
        window.sidebar.addPanel(title, url, "");
    }
    else if (window.external) // Internet Explorer
    {
        window.external.AddFavorite(url, title);
    }
    else if (window.opera && window.print) // Opera
    {
        var elem = document.createElement('a');
        elem.setAttribute('href', url);
        elem.setAttribute('title', title);
        elem.setAttribute('rel', 'sidebar');
        elem.click();
    }
}


$(document).ready(function() {

	$("a.gallery").fancybox();

});

