// JavaScript Document



$(document).ready(function(){
  
  //menù interno
  $("dt.bltorange").css('cursor','pointer');       
  $("dt.bltorange").siblings("dd").hide();
  $("body").delegate("dt.bltorange","click",function(){
  $(this).parent().siblings('dl').children("dt.bltorange").siblings('dd:visible').slideUp('slow'); 
  $(this).siblings('dd').slideToggle('slow'); 
  });
  
  
//$("#schedina").css('display','none');						   
if($("#radio_fanta_yes:checked").val()=="radio_fanta_yes"){$("#schedina").show();	}
if($("#radio_fanta_no:checked").val()=="radio_fanta_no"){$("#schedina").hide();	}

if(!($('.lbox').length==0)){						   
$('#portiere_box_link').fancyZoom({width:500, height:300});
$('#difesa_box_link').fancyZoom({width:500, height:300});
$('#centrocampo_box_link').fancyZoom({width:500, height:300});
$('#attacco_box_link').fancyZoom({width:500, height:300});

}


$("#radio_fanta_yes").change(function() { 
									 
				if($("#radio_fanta_yes:checked").val()=="radio_fanta_yes"){$("#schedina").show();	}

				});
$("#radio_fanta_no").change(function() { 
									 
				if($("#radio_fanta_no:checked").val()=="radio_fanta_no"){$("#schedina").hide();	}

				});



//$(function() {  

//         //If you want to move selected item from fromListBox to toListBox  

//            $("#addTeam").click(function() {  

//                $("#fromTeamBox  option:selected").appendTo("#toTeamBox");  

//             });  

//           //If you want to move all item from fromListBox to toListBox  

//            $("#addAllTeam").click(function() {  

//                $("#fromTeamBox option").appendTo("#toTeamBox");  

//            });  

//            //If you want to remove selected item from toListBox to fromListBox  

//            $("#removeTeam").click(function() {  

//                $("#toTeamBox option:selected").appendTo("#fromTeamBox");  

//           });  

//             //If you want to remove all items from toListBox to fromListBox  

//            $("#removeAllTeam").click(function() {  

//                 $("#toTeamBox option").appendTo("#fromTeamBox");  
//            });  
//   

//         } );


//$(function() {  

//         //If you want to move selected item from fromListBox to toListBox  

//            $("#addA").click(function() {  

//                $("#fromLega  option:selected").appendTo("#toGironeA");  

//             });  

//           //If you want to move all item from fromListBox to toListBox  

//            $("#addB").click(function() {  

//                $("#fromLega option:selected").appendTo("#toGironeB");  

//            });  

//            //If you want to remove selected item from toListBox to fromListBox  

//            $("#removeAB").click(function() {  

//                $("#toGironeA option").appendTo("#fromLega");  
//				 $("#toGironeB option").appendTo("#fromLega");  

//           });  

//       

//         } );

					   
if(!($('.cal').length==0)){
$('.cal').each(function() {
$(this).datetimepicker({
	timeFormat: 'hh:mm:ss',
	separator: ' ',
	closeText: 'Chiudi',

	currentText: 'Oggi',
	monthNames: ['Gennaio','Febbraio','Marzo','Aprile','maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
	monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic'],
	dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','venerdì','Sabato'],
	dayNamesShort: ['Lun','Mar','Mer','Gio','Ven','Sab','Dom'],
	dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
	weekHeader: 'Sett',
	dateFormat: 'dd/mm/yy',
	firstDay: 1,
	isRTL: false,
	showMonthAfterYear: false,
	yearSuffix: '',
	timeOnlyTitle: 'Seleziona un\'ora',
	timeText: 'Orario',
	hourText: 'Ora',
	minuteText: 'Minuti',
	secondText: 'Secondi',
	currentText: 'Adesso',
	closeText: 'Chiudi',
	ampm: false
});
});
}

if(!($('.timeint').length==0)){

$('.timeint').each(function() {
$(this).timepicker({
	timeFormat: 'hh:mm:ss',
	timeOnlyTitle: 'Seleziona',
	timeText: 'Orario',
	hourText: 'Ora',
	minuteText: 'Minuti',
	secondText: 'Secondi',
	currentText: 'Adesso',
	closeText: 'Chiudi',
	ampm: false
});
});
}
	
	
$(function() {
    $('.rounded').each(function() {
        PIE.attach(this);
    });
	$('#main_box2').each(function() {
        PIE.attach(this);
    });
	$('#main_box').each(function() {
        PIE.attach(this);
    });
	$('#rose_box').each(function() {
        PIE.attach(this);
    });
	$('#pagpub').each(function() {
			PIE.attach(this);
		});
	  $('#slideshow').each(function() {
        PIE.attach(this);
    });
	    $('#funzionibox').each(function() {
        PIE.attach(this);
    });
		$('#form_box').each(function() {
        PIE.attach(this);
    });
		$('#msg_box').each(function() {
        PIE.attach(this);
    });
		$('.msgbtn2 span').each(function() {
        PIE.attach(this);
    });
			$('.msgbtn span').each(function() {
        PIE.attach(this);
    });
		$('.greybox').each(function() {
        PIE.attach(this);
    });

	$('.greybox2').each(function() {
			PIE.attach(this);
		});
	$('#cal2').each(function() {
			PIE.attach(this);
		});
	$('.greybox2 h3').each(function() {
			PIE.attach(this);
		});
	$('.greyrounded').each(function() {
			PIE.attach(this);
		});
	$('.greyrounded2').each(function() {
			PIE.attach(this);
		});
	$('.greyrounded3').each(function() {
			PIE.attach(this);
		});
	$('.greyrounded4').each(function() {
			PIE.attach(this);
		});
	$('.greyrounded5').each(function() {
			PIE.attach(this);
		});

	$('.btnright').each(function() {
			PIE.attach(this);
		});
	$('.roundbott').each(function() {
			PIE.attach(this);
		});
	$('.roundtr').each(function() {
			PIE.attach(this);
		});
	
	$('#inviti_form').each(function() {
			PIE.attach(this);
		});
	$('.square').each(function() {
			PIE.attach(this);
		});
	$('.square2').each(function() {
			PIE.attach(this);
		});
$('#sceltibox').each(function() {
			PIE.attach(this);
		});
$('.magliasq').each(function() {
			PIE.attach(this);
		});
$('.stadiosq').each(function() {
			PIE.attach(this);
		});
$('.magliasq img').each(function() {
			PIE.attach(this);
		});
$('.stadiosq img').each(function() {
			PIE.attach(this);
		});
$('.logosq').each(function() {
			PIE.attach(this);
		});
$('#rosa_all').each(function() {
			PIE.attach(this);
		});

$('.sqrow2 span').each(function() {
			PIE.attach(this);
		});

$('.roundbox').each(function() {
			PIE.attach(this);
		});

$('.nomestadio').each(function() {
			PIE.attach(this);
		});
		
$('.lblbig3').each(function() {
   PIE.attach(this);
  });
$('#sms_box').each(function() {
   PIE.attach(this);
  });
$('.singlenews').each(function() {
			PIE.attach(this);
		});
		
$('.squaregray').each(function() {
   PIE.attach(this);
  });

});



 $(function(){
			if($('.betterTip').length != 0){
      BT_setOptions({openWait:250, closeWait:0, cacheEnabled:true});
			}
    })
 

/*  $(function(){  

   var ticker = function() {  

      setTimeout(function(){  

         $('#ticker li:first').animate( {marginTop: '-30px'}, 800, function(){  

            $(this).detach().appendTo('ul#ticker').removeAttr('style'); });  ticker();}, 4000); };  

   ticker();  

}); 
  */

 });

function sendme() 
{ 
    window.open("","myNewWin","width=500,height=350,toolbar=0"); 
} 
