
Cufon.replace('li.link', {
 hover: true,
 color:  '#586578'
});
 
Cufon.replace('li.linkHover', {
 color: '#999999'
});
 
Cufon.replace('li.linkS', {
 color: '#586578'
});
 
Cufon.replace('.titolo', {
 color: '#586578'
});
 
Cufon.replace('.titolonews', {
 hover: true
});
 
Cufon.replace('.datanews', {
 hover: true
});
 

Cufon.replace('div.link2', {
 hover: true
});
 
Cufon.replace('.markMangini', {
 color: '#ffffff'
});
 

Cufon.replace('.titoloSubs', {
 color: '#000000'
});
 

Cufon.replace('.titoloSubs div', {
 color: '#000000'
});
 

Cufon.replace('.titoloSubsPlanika', {
 hover: true
});
 
Cufon.replace('.titoloSubsAbako', {
 hover: true
});
 

Cufon.replace('.titoloSubsSmall', {
 hover: true
});
 

Cufon.replace('.titoloSubsSmall div', {
 hover: true
});
 

Cufon.replace('.titoloPlanika');
 

Cufon.replace('H2', {
 color: '#999999'
});

//-----------------------------------------------------------------------



function serialscroll(){
	//alert();
	$('#newsScroller').jScrollPane({showArrows:true, scrollbarWidth:20});
}

function serialscroll2(){
	//alert();
	$('#newsScroller').jScrollPane({showArrows:true, scrollbarWidth:20});
	$('#content-item-Menu1C').jScrollPane({showArrows:true, scrollbarWidth:20});
}


//-------------------------------------------------------------------------


// --------- FUNZIONE DEL SEARCHER

var variabileSearcher;
var histstato;
function OpenDivSearcherX(variabileSearcher){

	if (histstato == undefined || histstato != variabileSearcher ){
		if (histstato == undefined){
			$('#'+variabileSearcher).animate({height: 'toggle'},400);
			histstato = variabileSearcher;
		} else {
			$('#'+histstato).animate({height: 'toggle'},400, function() {	
				//timerId = setTimeout('Tendina('+variabileSearcher+')', 10);
				$('#'+variabileSearcher).animate({height: 'toggle'},400, function() {
					histstato = variabileSearcher;
				});
			});
		}
	} else if (histstato == variabileSearcher ) {
		$('#'+variabileSearcher).animate({height: 'toggle'},400, function() {
			histstato = undefined;
		});
	}
	
	//$('#'+variabileSearcher).slideDown('slow', function() {
	// chiamata AJAX
	//});
}




//-------------------------------------------------------------------------
// SNIPPET X MENU HOME PAGE

var sectorItems;
var histItems;
var variable;
var histvariable;
histItems = "featured_items1";
histvariable = "Comunicazione";

function navigatorMainPage(sectorItems,variable){
	variable = replaceall(variable);
	
		$('#'+ histItems ).fadeOut(600, function(){			
				$('#'+ sectorItems ).fadeIn(600, function(){	
														  

							  
							  document.getElementById(sectorItems +'B').innerHTML = "<div class=\"link2 activeSlide\" ><a href=\"javascript:navigatorMainPage('"+ sectorItems +"','"+ variable +"');\">"+ variable +"</a></div>";
							  document.getElementById(histItems +'B').innerHTML = "<div class=\"link2\" ><a href=\"javascript:navigatorMainPage('"+ histItems +"','"+ histvariable +"');\">"+ histvariable +"</a></div>";
							  		
							  histItems = sectorItems;
							  histvariable = variable;	
							  
							  changeFlash();								
								  
				});										
		});	
	
}

function changeFlash(){

	Cufon.replace('div.link2', {
		hover: true
	});
}

	


function replaceall(variable){
	variable = variable.replace(/Ã/g, "à");
	variable = variable.replace(/à Ã/g, "");
	variable = variable.replace(/Â/g, "");
	variable = variable.replace(/à à/g, "");
	return variable;	
}



//-------------------------------------------------------------------------
// SNIPPET X MENU SUB PAGE


var SubsectorItems;
var SubhistItems;
var Subvariable;
var Subhistvariable;
SubhistItems = "content-item-Menu1";
Subhistvariable = "Mangini Leading";

function SubnavigatorMainPage(SubsectorItems,Subvariable){
	
	Subvariable = Subreplaceall(Subvariable);
	
		$('#'+ SubhistItems ).fadeOut(600, function(){			
				$('#'+ SubsectorItems ).fadeIn(600, function(){	
							  $('#'+ SubsectorItems +'C').jScrollPane({showArrows:true, scrollbarWidth:20});
							  
							  document.getElementById(SubhistItems +'B').innerHTML = "<div id=\"linkToSubs\" onClick=\"javascript:SubnavigatorMainPage('"+ SubhistItems +"','"+ Subhistvariable +"');\" onMouseOver=\"this.style.backgroundColor='#f1f1f1';\" onMouseOut=\"this.style.backgroundColor='#ffffff';\"><span class=\"titoloSubs\"><a href=\"javascript:SubnavigatorMainPage('"+ SubhistItems +"','"+ Subhistvariable +"');\">"+ Subhistvariable +"</a></span></div>";
                              document.getElementById(SubsectorItems +'B').innerHTML = "<div id=\"linkToSubsNo\"><span class=\"titoloSubs\">"+ Subvariable +"</span></div>";
                                       
							  		
							  SubhistItems = SubsectorItems;
							  Subhistvariable = Subvariable;	
							  
							  SubchangeFlash();								
								  
				});										
		});	
	
}

function SubchangeFlash(){
    sIFR.replace(din_medium, {
      selector: '.titoloSubs'
      ,css: [
        '.sIFR-root {position:absolute; font-weight: normal; color: #000000;  font-size:16px; }'
        ,'a { color: #586578; text-decoration: none; font-weight: normal;  font-size:16px;}'
        ,'a:link { color: #586578; font-weight: normal;  font-size:16px; }'
        ,'a:hover { color: #586578; font-weight: normal;  font-size:16px; }'
      ]
	  ,wmode: 'transparent'
	  ,forceSingleLine: true
    });
}
	

function Subreplaceall(Subvariable){
	Subvariable = Subvariable.replace(/Ã/g, "à");
	Subvariable = Subvariable.replace(/à Ã/g, "");
	Subvariable = Subvariable.replace(/Â/g, "");
	Subvariable = Subvariable.replace(/à à/g, "");
	return Subvariable;	
}




//-------------------------------------------------------------------------
// SNIPPET X MENU CONTATTI


var SubsectorItemsC;
var SubhistItemsC;
var SubvariableC;
var SubhistvariableC;
SubhistItemsC = "content-item-Menu1";
SubhistvariableC = "Dati Societari";

function SubnavigatorMainPageC(SubsectorItemsC,SubvariableC){
	
	SubvariableC = SubreplaceallC(SubvariableC);
	
		$('#'+ SubhistItemsC ).fadeOut(600, function(){			
				$('#'+ SubsectorItemsC ).fadeIn(600, function(){	
							  $('#'+ SubsectorItemsC +'C').jScrollPane({showArrows:true, scrollbarWidth:20});
							  
							  document.getElementById(SubhistItemsC +'B').innerHTML = "<div id=\"linkToSubs\" onClick=\"javascript:SubnavigatorMainPageC('"+ SubhistItemsC +"','"+ SubhistvariableC +"');\" onMouseOver=\"this.style.backgroundColor='#f1f1f1';\" onMouseOut=\"this.style.backgroundColor='#ffffff';\"><span class=\"titoloSubs\"><a href=\"javascript:SubnavigatorMainPageC('"+ SubhistItemsC +"','"+ SubhistvariableC +"');\">"+ SubhistvariableC +"</a></span></div>";
                              document.getElementById(SubsectorItemsC +'B').innerHTML = "<div id=\"linkToSubsNo\"><span class=\"titoloSubs\">"+ SubvariableC +"</span></div>";
                                       
							  		
							  SubhistItemsC = SubsectorItemsC;
							  SubhistvariableC = SubvariableC;	
							  
							  SubchangeFlashC();								
								  
				});										
		});	
	
}

function SubchangeFlashC(){
    sIFR.replace(din_medium, {
      selector: '.titoloSubs'
      ,css: [
        '.sIFR-root {position:absolute; font-weight: normal; color: #000000;  font-size:16px; }'
        ,'a { color: #586578; text-decoration: none; font-weight: normal;  font-size:16px;}'
        ,'a:link { color: #586578; font-weight: normal;  font-size:16px; }'
        ,'a:hover { color: #586578; font-weight: normal;  font-size:16px; }'
      ]
	  ,wmode: 'transparent'
	  ,forceSingleLine: true
    });
}
	
function SubreplaceallC(SubvariableC){
	SubvariableC = SubvariableC.replace(/Ã/g, "à");
	SubvariableC = SubvariableC.replace(/à Ã/g, "");
	SubvariableC = SubvariableC.replace(/Â/g, "");
	SubvariableC = SubvariableC.replace(/à à/g, "");
	return SubvariableC;	
}



//-------------------------------------------------------------------------
// SNIPPET X MENU SOSTENIBILITA'


var SubsectorItemsS;
var SubhistItemsS;
var SubvariableS;
var SubhistvariableS;
SubhistItemsS = "content-item-Menu1";
SubhistvariableS = "Bilancio di sostenibilità 2008";

function SubnavigatorMainPageS(SubsectorItemsS,SubvariableS){
	
	SubvariableS = SubreplaceallS(SubvariableS);
	
		$('#'+ SubhistItemsS ).fadeOut(600, function(){			
				$('#'+ SubsectorItemsS ).fadeIn(600, function(){	
							  $('#'+ SubsectorItemsS +'C').jScrollPane({showArrows:true, scrollbarWidth:20});
							  
							  document.getElementById(SubhistItemsS +'B').innerHTML = "<div id=\"linkToSubs\" onClick=\"javascript:SubnavigatorMainPageS('"+ SubhistItemsS +"','"+ SubhistvariableS +"');\" onMouseOver=\"this.style.backgroundColor='#f1f1f1';\" onMouseOut=\"this.style.backgroundColor='#ffffff';\"><span class=\"titoloSubs\"><a href=\"javascript:SubnavigatorMainPageS('"+ SubhistItemsS +"','"+ SubhistvariableS +"');\">"+ SubhistvariableS +"</a></span></div>";
                              document.getElementById(SubsectorItemsS +'B').innerHTML = "<div id=\"linkToSubsNo\"><span class=\"titoloSubs\">"+ SubvariableS +"</span></div>";
                                       
							  		
							  SubhistItemsS = SubsectorItemsS;
							  SubhistvariableS = SubvariableS;	
							  
							  SubchangeFlashS();								
								  
				});										
		});	
	
}

function SubchangeFlashS(){

	Cufon.replace('.titoloSubs', {
		color: '#000000'
	});
}
	

function SubreplaceallS(SubvariableS){
	SubvariableS = SubvariableS.replace(/Ã/g, "à");
	SubvariableS = SubvariableS.replace(/à Ã/g, "");
	SubvariableS = SubvariableS.replace(/Â/g, "");
	SubvariableS = SubvariableS.replace(/à à/g, "");
	return SubvariableS;	
}

/*
var prezzo;
var histprezzo;
var histNumProd;
var qtyProd;
function FuncAddToBask(prezzo,qtyProd){
	var where_to = confirm('Vuoi aggiungere il prodotto al carrello?');
	
	if (where_to == true){

		if(histprezzo == undefined){
			histprezzo = 0;
			histNumProd = 0;
		}
		
		totprezzo = Number(histprezzo) + Number(prezzo) * Number(qtyProd);
		totProd = histNumProd + Number(qtyProd);
		
		document.getElementById('FieldCart').innerHTML = "Qt. "+totProd+"<br>Tot. € "+totprezzo+",00";
		
		histprezzo = totprezzo;
		histNumProd = totProd;
	}
}
*/


//-------------------------------------------------------------------------

/*
$(function() {
	$('a, td, input, img, select, Textarea, area').tooltip({
		track: true,
		delay: 0,
		showURL: false,
		showBody: " - ",
		opacity: 0.95, 
		fade: 250,
		//extraClass: "right" 
		positionLeft: true
	});
});
*/

//-------------------------------------------------------------------------


