﻿$(document).ready(function() {  
      $("#various1").fancybox({
       'width'			: 450,
			'height'		: 495,
		'titlePosition'		: 'inside',
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic'
	});
 
    $('#mycarousel').jcarousel({
        auto: 5,
        wrap: 'circular',
        scroll: 1,
         easing: 'easeInQuint',
        initCallback: mycarousel_initCallback
    });
    
    $('.scroll-pane').jScrollPane();

    $('#cssdropdown li.headlink').hover(
			function() { $('ul', this).css('display', 'block'); },
			function() { $('ul', this).css('display', 'none'); });

    $("a.fancy").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});
			
	$("a[rel=group]").fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Immagine ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
	

   
  });
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
  /*  carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });*/

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
    
};

function showlayer(obj) {
   $('#result').hide();  
   $('#' + obj + '').show();
   $('#left').hide();
   $('#right').hide();
   
}
function chiudi(obj) {
   /*$('#' + obj + '').hide();
   $('#result').show();   
   $('#left').show();
   $('#right').show();*/
   window.location.href='Default.aspx';
}
 
function zoom(pagina, l, a)
{
	var posT;
	var posL;
	posT = (screen.height - a) / 2;
	posL = (screen.width - l) / 2;
	parent.NaviWin=window.open(pagina,'','toolbar=no,left=' + posL + ',top=' + posT + ',directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + l +',height=' + a);
};

