
 jQuery(document).ready(function() {
  /*jQuery("a.get_pagina").fancybox({ 'type': 'iframe', 'hideOnContentClick': true, 'autoDimensions': false, 'width': '60%', 'height': '70%' }); 
  
  jQuery("a[rel=prodotto]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">Foto ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' - ' + title + '</span>';
		}
	});*/
  $("a.get_foto").fancybox({
	'titleShow'     : false
  });  
  
  	$("a[rel=example_group]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">Foto ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';
		}
	});

    
  jQuery("div.content_video_player").mouseenter(function(){
   $('#content_value_linguetta').animate({
    opacity: 0.45,
    bottom: '-45'
   }, 100, function() {
    // Animation complete.
   });
  }).mouseleave(function(){
   $('#content_value_linguetta').animate({
    opacity: 1.00,
    bottom: '+0'
   }, 100, function() {
    // Animation complete.
   });	  
  });
  
  jQuery("div.content_video_player_lavori").mouseenter(function(){
   $('#content_value_linguetta_lavori').animate({
    opacity: 0.45,
    bottom: '-=73'
   }, 100, function() {
    // Animation complete.
   });
  }).mouseleave(function(){
   $('#content_value_linguetta_lavori').animate({
    opacity: 1.00,
    bottom: '+=73'
   }, 100, function() {
    // Animation complete.
   });	  
  });
  
  
  jQuery("a.get_scheda").fancybox({ 'type': 'iframe','padding': 0, 'hideOnContentClick': true, 'autoDimensions': false, 'autoScale': false, 'width': 920, 'height': 480, 'overlayOpacity': 0.80, 'overlayColor': '#2E3431' });
  jQuery("a.get_video").fancybox({ 'type': 'iframe','padding': 0, 'hideOnContentClick': true, 'autoDimensions': false, 'autoScale': false, 'width': 706, 'height': 400, 'overlayOpacity': 0.75, 'overlayColor': '#000' });
  jQuery("a.get_form").fancybox({ 'type': 'iframe','padding': 10, 'hideOnContentClick': true, 'autoDimensions': false, 'autoScale': false, 'width': 600, 'height': 295, 'overlayOpacity': 0.80, 'overlayColor': '#2E3431' });
   
    
 /* jQuery("div#top-banner").mouseover(function(){
   $("div.top-banner-value-slide").animate({
    opacity: 1.00,
    marginTop: '0'
   }, 100, function() {
    // Animation complete.
   });
  }).mouseout(function(){
   $("div.top-banner-value-slide").animate({
    opacity: 1.00,
    marginTop: '-90'
   }, 100, function() {
    // Animation complete.
   });	  
  });*/
  
 });
 
     //-----*    Events     *-----//

function showPopup(popUp,popUpArrow) {
    popUp.slideDown(300).data('visible',true);
    popUpArrow.addClass('active');
}

function hidePopup(popUp,popUpArrow) {popUp.slideUp(300,function(){
    popUp.data('visible',false)});
    popUpArrow.removeClass('active');
}


$(function() {
    var popUp=$('#bannerPromoList');
    var popUpArrow=$('#bannerPromoBottoneFreccia');
    var hint = new Object();
    $('#bannerPromoBottoneLink').bind('mouseenter', function() {if (!popUp.data('visible')) {showPopup(popUp,popUpArrow);}});
    $('#bannerPromo').bind('mouseleave', function() {if (popUp.data('visible')) {hidePopup(popUp,popUpArrow);}});
});



