$(function() {
       	Shadowbox.init();
 		
	 	Cufon.replace('h2');
		Cufon.replace('h3');
		Cufon.replace('h4');
		Cufon.replace('#sb-title-inner');
 		Cufon.replace('.navigation a');
		Cufon.replace('#commentlist .commentnum');
		Cufon.replace('.giorno');
		Cufon.replace('.mese');
		Cufon.replace('.anno');

	 
		if($('#contenthome').length) {
          	var offset = $("#sidebar").offset();
           var topPadding = 15;
           $(window).scroll(function() {
               if ($(window).scrollTop() > offset.top) {
                   $("#sidebar").stop().animate({
                       marginTop: $(window).scrollTop() - offset.top + topPadding
                   });
               } else {
                   $("#sidebar").stop().animate({
                       marginTop: 0
                   });
               };
           });
         };
         	
		$('#menu a').mouseover(function(){ 
			$(this).parent().children('b').css('display', 'block');
		});
		$('#menu a').mouseout(function(){
			$(this).parent().children('b').css('display', 'none');
		});
				
		$('#header').pngFix( );
		
		
		/*
		if($('work-1').length) {	
			var hovers = $('.work img');
			hovers.each(function(element) {
				hovers.setOpacity('0.7');
				var fx = new Fx.Styles(element, {duration:500, wait:false});
				element.addEvent('mouseenter', function(){
					fx.start({
							'opacity': 1
					});
				});								 
				element.addEvent('mouseleave', function(){
					fx.start({
							'opacity': 0.7
					});
				});
			});
		}; */
 
});
   
	
