// Adds a class 'js_on' to the <html> tag if JavaScript is enabled,
// also helps remove flickering...
document.documentElement.className += 'js_on';

// Add Cufon fonts fix IE 7 - caratteri
Cufon.set('fontFamily', 'Helvetica Neue LT Pro');
Cufon.replace('h3', { fontFamily: 'Helvetica Neue LT Pro' });
Cufon.replace('h3', { textShadow:'0px 0px #fff' });
Cufon.replace('h4', { fontFamily: 'Helvetica Neue LT Pro' });
Cufon.replace('h4', { textShadow:'0px 0px #fff' });
Cufon.replace('h5', { fontFamily: 'Helvetica Neue LT Pro' });
Cufon.replace('h5', { textShadow:'0px 0px #fff' });
Cufon.replace('h6', { fontFamily: 'Helvetica Neue LT Pro' });
Cufon.replace('h6', { textShadow:'0px 0px #fff' });
// Cufon.replace('#Testa_Dx h2', {textShadow:'0px 0px #FFF'});
Cufon.replace('#slider1  h3', {textShadow:'0px 0px #fff'});
Cufon.replace('#Titoli_Pagine  h4', {textShadow:'0px 0px #fff'});
Cufon.replace('#Testo_Pagina  h4', {textShadow:'0px 0px #000'});
Cufon.replace('#Titoli_Pagine_Prod  h4', {textShadow:'0px 0px #fff'});
Cufon.replace('#car  h4', {textShadow:'0px 0px #fff'});
Cufon.replace('#SottoTitoli_Pagine  h5', {textShadow:'0px 0px #fff'});
Cufon.replace('#Contenuti_Contatti  h6', {textShadow:'0px 0px #fff'});
Cufon.replace('#Risorse  h3', {textShadow:'0px 0px #fff'});
Cufon.replace('.cufon-gradient-shadow', { color: '-linear-gradient(#46738C, #000000)'

 }); 


// Fade menu a tendina
$(function(){

	$('#Menu a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -220px)"}, {duration:300})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:300})
		});

});

// Slider banner
		$(document).ready(function(){
			$('#slider1').bxSlider({
				auto: true,
				autoControls: true,
				easing: 'swing',
				pause: 5000,
				tickerSpeed: 5000,
				autoControlsSelector: '#my-start-stop'
			});
		});
		
// Shadowbox
	Shadowbox.init({
    language: 'it',
    players:  ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv']
});
window.onload = function(){

    Shadowbox.init();
};
var openShadowbox = function(content, player, title, width, height){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
		width:      width,
		height:     height
    });
};
