Cufon.replace('#logo, #title', {fontFamily: 'DINCond-Bold', letterSpacing: '-1px', hover: true});

$(document).ready(function() {
	
	/*$('.thumbnail').hover(function(){
		$(this).find('.overlay, .title').show();
	}, function() {
		$(this).find('.overlay, .title').hide();
	});*/

	$(".thumbnail").hover(function() {
		var selected = $(this).index() + 1;
		var position = $(this).position();
		var initial_width = $(window).width() - position.left - 300;
		var width = $(window).width() - position.left - 222;
		
		$("#sidebar a:eq(" + selected + ")").addClass('roll');
		
		$('#bar').css({top: position.top, left: position.left + 192, width: initial_width, background: $(this).attr('color')});
		$('#bar').stop().animate({width: width}, 500);
		
		$(this).css('background-position','right');
	},function(){
		$("#sidebar a").removeClass('roll');
		$('#bar').stop().animate({width: 0}, 300);
		$(this).css('background-position','left');
	});
	
});
