
// INIZIO FANCYBOX

jQuery.noConflict();
		jQuery(document).ready(function() {
		jQuery("a.single_image").fancybox({
		'overlayShow': true,
		'overlayOpacity':  0.8,
		'zoomOpacity': 300,
		'zoomSpeedIn' : 700,
		'zoomSpeedOut' : 700,
		'easingIn' : 'easeOutBack',
		'easingOut' : 'easeInBack'
	});
	
	jQuery("a.single_image_web").fancybox({
		'overlayShow': true,
		'overlayOpacity': 0.8,
		'zoomOpacity': 300,
		'zoomSpeedIn' : 700,
		'zoomSpeedOut' : 700,
		'easingIn' : 'easeOutBack',
		'easingOut' : 'easeInBack'
	});
	
		jQuery("div.blocco_testo_news_web a").fancybox({
		'overlayShow': true,
		'overlayOpacity': 0.8,
		'zoomOpacity': 300,
		'zoomSpeedIn' : 700,
		'zoomSpeedOut' : 700,
		'easingIn' : 'easeOutBack',
		'easingOut' : 'easeInBack'
	});

});
		
jQuery.noConflict();
		jQuery(document).ready(function() {
		jQuery("a.group").fancybox({
		'overlayShow': true,
		'overlayOpacity':  0.8,
		'zoomOpacity':    300,
		'zoomSpeedIn' : 700,
		'zoomSpeedOut' : 700,
		'easingIn' : 'easeOutBack',
		'easingOut' : 'easeInBack'
	});
});		

// FINE FANCYBOX

// CAMBIA SFONDO DIV
<!--
function FP_changePropRestore() {//v1.0
 var d=document,x; if(d.$cpe) { for(i=0; i<d.$cpe.length; i++) { x=d.$cpe[i];
 if(x.v=="") x.v=""; eval("x."+x.n+"=String(x.v)"); } d.$cpe=null; }
}

function FP_changeProp() {//v1.0
 var args=arguments,d=document,i,j,id=args[0],o=FP_getObjectByID(id),s,ao,v,x;
 d.$cpe=new Array(); if(o) for(i=2; i<args.length; i+=2) { v=args[i+1]; s="o"; 
 ao=args[i].split("."); for(j=0; j<ao.length; j++) { s+="."+ao[j]; if(null==eval(s)) { 
  s=null; break; } } x=new Object; x.o=o; x.n=new Array(); x.v=new Array();
 x.n[x.n.length]=s; eval("x.v[x.v.length]="+s); d.$cpe[d.$cpe.length]=x;
 if(s) eval(s+"=v"); }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
// -->
//FINE CAMBIA SFONDO DIV


// EFFETTO MENU
jQuery.noConflict();
jQuery(function(){
	jQuery('#nav a')
		.css( {backgroundPosition: "-20px 35px"} )
		.mouseover(function(){
			jQuery(this).stop().animate({backgroundPosition:"(-20px 94px)"}, {duration:500})
		})
		.mouseout(function(){
			jQuery(this).stop().animate({backgroundPosition:"(40px 35px)"}, {duration:200, complete:function(){
				jQuery(this).css({backgroundPosition: "-20px 35px"})
			}})
		})
			jQuery('#nav .active a')
		.css( {backgroundPosition: ""} )
		.mouseover(function(){
			jQuery(this).stop().animate({backgroundPosition:"()"}, {duration:500})
		})
		.mouseout(function(){
			jQuery(this).stop().animate({backgroundPosition:"()"}, {duration:200, complete:function(){
				jQuery(this).css({backgroundPosition: ""})
			}})
		})
		
	});
// FINE EFFETTO MENU	


// EFFETTO SCROLL
//whole credits are devoted to orignal author
//
//Use: Call function goto_top()
var goto_top_type = -1;
var goto_top_itv = 0;

function goto_top_timer() {
var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop;
//alert(y);
var moveby = 15; // set this to control scroll seed. minimum is fast

y -= Math.ceil(y * moveby / 100);
if (y < 0)
y = 0;

if (goto_top_type == 1)
document.documentElement.scrollTop = y;
else
document.body.scrollTop = y;

if (y == 0) {
clearInterval(goto_top_itv);
goto_top_itv = 0;
}
}

function goto_top() {
if (goto_top_itv == 0) {
if (document.documentElement && document.documentElement.scrollTop)
goto_top_type = 1;
else if (document.body && document.body.scrollTop)
goto_top_type = 2;
else
goto_top_type = 0;

if (goto_top_type > 0)
goto_top_itv = setInterval('goto_top_timer()', 25);
}
}
// FINE EFFETTO SCROLL

