$(document).ready(function () {
if (pagina == "rosso"){	
$(".itemtitle a").css("color","#a62000");
};


$('#home-fiore').fadeIn (300 , function() {
	$('#home-header').fadeIn (300, function() {
		if (pagina == "promo") {
		$(this).append('<div id="home-presenta">Presenta</div>');
		}
		$('#home-presenta').fadeIn (600, function() {
			$('a#uno').delay(1000).fadeIn(300 , function(){
				$('a#due').css('display','block');
				$('.home-locandina-testi').fadeIn(300 , function() {
					$('#home-fiore, #home-header').fadeOut(60);
					var zot = window.setInterval(function() { homeShow(); }, 5000);
					})
				});
			});
		});
	});

$('.home-locandina').hover (function() {
	$('.home-locandina-testi').css('color','#ffc205');
	}, function() {
	$('.home-locandina-testi').css('color','inherit');	
});
	

//funzione locandine home page-----------------------------------

//comando provvisorio
//$('body').prepend('<a class="navFF" href="">A</a>');
//$('a.navFF').css({'position': 'absolute','color':'#fff'});

//funzione manuale x infinite locandine
/*$('#cont_locandineHome a').eq(0).addClass('curr');
$('.navFF').click(function(event) {
	event.preventDefault();
	$('a.curr').fadeOut(250, function() {
		$(this).removeClass('curr');
		$(this).next().addClass('curr');
		$(this).insertAfter($('.curr'));
		$(this).css('display','block');
		});
});*/

//funzione temporizzata per locandine in home page
$('#cont_locandineHome a').eq(0).addClass('curr');

function homeShow() {
$('a.curr').fadeOut(250, function() {
	$(this).removeClass('curr');
	$(this).next().addClass('curr');
	$(this).insertAfter($('.curr'));
	$(this).css('display','block');
	//window.clearInterval(tempoOff);
	});	
}


//funzione ajax img dimensione reale
$.ajaxSetup({cache:false});
	$("#fotoico-cont img.fotoico-puls").click(function(){
		var img_id = $(this).attr("alt");
		$("#fotobig-cont").html('. . .Loading. . .');
		$("#fotobig-cont").load('http://www.animamente.it/img_Coriandoli.html' + ' #' + img_id , function() {
			var img_height = $("#fotobig-cont").find('img').attr("height");
			$('#fotobig-cont').css('height', img_height + 'px');
			});
		
	});


});

