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);
}

function showHide(pElement) {

	if(document.getElementById(pElement).style.display=='none') {
		document.getElementById(pElement).style.display='block';
		document.getElementById('bt_sh_'+pElement).className="showHide_on";
	}
	else {
		document.getElementById(pElement).style.display='none';
		document.getElementById('bt_sh_'+pElement).className="showHide";
	}

}

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();

});
