$(function() {
       	Shadowbox.init();
	Cufon.replace('h2');
	Cufon.replace('#header h2 a');
	Cufon.replace('h3');
	Cufon.replace('h4');
	Cufon.replace('#sb-title-inner');
	Cufon.replace('#menu ul li a', {hover: true});
	Cufon.replace('#menu ul li a', {hover: {color: '#ffffff'}});
	Cufon.replace('#menu ul li a');
	Cufon.replace('.navigation a');
	Cufon.replace('#commentlist .commentnum');
	Cufon.replace('.subcat a', {hover: true});
	Cufon.replace('.subcat a', {hover: {color: '#111111'}});
	Cufon.replace('.subcat a');
	Cufon.replace('.simplePullQuote');
	Cufon.replace('.slidetitle h2 a', {lineHeight: '12px'});
	Cufon.replace('.slidexc');
	Cufon.replace('.slideauth');
	Cufon.replace('.riassunto');
	Cufon.replace('.riassuntobig');
	Cufon.replace('.mosaicat a');
	Cufon.replace('#crp_related .crp_title');
	Cufon.replace('.secondgalleryexc');

	
	//Cufon.replace('#footer');

	if ( $(".riassunto").length ) {
		$(".riassunto").css('opacity','0');
	};

	if ( $("img").length ) {
		$('.entry img').parents("a").css('border', 'none');
	};
	
	
	if ( $("#sliderhome").length ) {
		$('#sliderhome').bxSlider({
			mode: 'vertical',
			easing: 'easeOutBack',
			speed: 1500,
			pager: true,  
			auto: true,
			pause: 5000,
			autoControls: true,
			autoHover: true
		});
		$('#slidertastes').bxSlider({
			mode: 'horizontal',
			easing: 'easeOutBack',
			speed: 1500,
			pager: true,  
			auto: true,
			pause: 5000,
			autoControls: true,
			autoHover: true
		});
		$('#sliderrecipe').bxSlider({
			mode: 'horizontal',
			easing: 'easeOutBack',
			speed: 1500,
			pager: true,  
			auto: true,
			pause: 5000,
			autoControls: true,
			autoHover: true
		});
		$('#sliderissue').bxSlider({
			mode: 'horizontal',
			easing: 'easeOutBack',
			speed: 1500,
			pager: true,  
			auto: true,
			pause: 5000,
			autoControls: true,
			autoHover: true
		});
		
	};
	
	Cufon.replace('.bx-pager a');

	if ( $("#sidebar").length ) {
		var altsx = $('#content').height();
		if (altsx > $('#sidebar').height()) {
			$('#sidebar').height(altsx);
		};
	};
	

	if ( $("#contenthome").length ) {
		/*$('.mosaicpost.caption').hover(function() {
			$(".cover", this).stop().animate({top:'52px'},{queue:false,duration:160});
			$(".riassunto", this).stop().animate({opacity:'1'},{queue:false,duration:160});
		}, function() {
			$(".cover", this).stop().animate({top:'85px'},{queue:false,duration:160});
			$(".riassunto", this).stop().animate({opacity:'0'},{queue:false,duration:160});

		});*/
	};
	
	if ( $("#crp_related").length ) {
		$('#crp_related li').hover(function() {
			$(".crp_title", this).stop().animate({top:'0px'},{queue:false,duration:160});
 		}, function() {
			$(".crp_title", this).stop().animate({top:'87px'},{queue:false,duration:160});
		});
	};
	
	
});

