jQuery(document).ready(function(){
	try {
		Cufon.replace('#menu a', { fontFamily: 'mp', hover: true });
		Cufon.replace('h2', { fontFamily: 'mp' });
	} catch(err) {}
	
	jQuery('.totop').click(function () {
		scroll(0,0);
		return false;
	});
	
    jQuery('#menu a').not('#menu a.current')
        .css( {backgroundPosition: "0px 0px"} )
        .mouseover(function(){
            $(this).stop().animate({backgroundPosition:"(0px -100px)"}, {duration:300})
        })
        .mouseout(function(){
            $(this).stop().animate({backgroundPosition:"( 0px 0px)"}, {duration:300, complete:function(){
                $(this).css({backgroundPosition: "0px 0px"})
            }})
        });
	
	
	jQuery('.sidebar ul li a').each(function() {
		jQuery(this).highlightFade({speed:0,start:'#ebebeb',end:'#ebebeb'});
	});
	jQuery('.sidebar ul li a.current').each(function() {
		jQuery(this).highlightFade({speed:0,start:'#008f3e',end:'#008f3e'});
	});
	jQuery('.sidebar ul li a').not('.sidebar ul li a.current').mouseover(function() {
		jQuery(this).highlightFade({speed:400,start:'#ebebeb',end:'#008f3e'});
	});
	jQuery('.sidebar ul li a').not('.sidebar ul li a.current').mouseout(function() {
		jQuery(this).highlightFade({speed:400,start:'#008f3e',end:'#ebebeb'});
	});
		
	jQuery("#lang img, #footer img").animate({opacity: 1});
	jQuery('#lang a img, #footer a img').mouseover(function () { jQuery(this).animate({ opacity: 0.7 }, 200); });
	jQuery('#lang a img, #footer a img').mouseout(function () { jQuery(this).animate({ opacity: 1 }, 200); });
});
