

    $(function() {

        Cufon.replace(
            'p.titolo-sx,' +
            '#blocco-sx-standard h2,' +
			'#contenuti h2,'
        );

	/*$container = $("#slider ul").cycle({
            fx: 'fade',
			timeout: 4000,
            speed: 1500
        });

	$("#slider-menu li").each(function(i){
		$(this).hover(function() {
            // cycle to the corresponding slide
            $container.cycle(i);
            return false;
        });
	});*/

	$container = $(".slider").each(function(){
            $('ul', this).cycle({
                fx: 'fade',
                timeout: 4000,
                speed: 1500
            });
    });
	
	$(".slider-menu").each(function() {
        $('li', this).each(function(i){
            $(this).hover(function() {
                // cycle to the corresponding slide
                $(this).parents('.slider-wrapper').find('.slider ul').cycle(i);
                return false;
            });
        });
	});

    var sliders = $('.slider-wrapper');
    var totalSliders = sliders.length;

    if ( totalSliders > 1)
    {
        sliders.each(function(i) {
            $('.freccia', this).click(function() {
                sliders.hide();

                if ( i + 1 == totalSliders )
                {

                    sliders.eq(0).show().find('.slider ul').cycle(0);
                }
                else
                {
                    sliders.eq(i + 1).show();
                }

                return false;
            });
        });
    }
    else
    {
        $('.freccia').remove();
    }
	
        $("#clienti-1").jCarouselLite({
            btnNext: "#nextBtn2",
            btnPrev: "#prevBtn2",
            auto: 5000,
            speed: 500,
            circular: true,
            visible: 3,
            scroll: 1
        });
		
		if ( $('#map').length > 0 ) {
		
			showmaps();
			
		}
		
		



dropdown('#menu ul');

        $('a[rel=external]').click(function() {
            window.open($(this).attr('href'));
            
            return false;
        });
		
		$('[rel=lightbox]').colorbox({maxWidth: '95%', maxHeight: '95%'});
		$('[rel=lightbox2]').colorbox({maxWidth: '95%', maxHeight: '95%'});
    });


