Cufon.replace('.c-shadow', {
	textShadow: '1px 1px #616348'
});

Cufon.replace('#topNav a.c-shadow, #mainNav a.c-shadow, #partners .c-shadow', {
	textShadow: '1px 1px #fff'
});


$(document).ready(function(){
						   
	$("#special_table").tablesorter();
				
    $('body').css({'background':'url('+$("#hImg img").attr('src')+') center top no-repeat'});   
	
	/* Lightbox */
	$('.lightbox').lightBox({
		imageLoading: 'http://volvoworldfinal2009.xsite.be/public/images/lightbox/loading.gif',
		imageBtnClose: 'http://volvoworldfinal2009.xsite.be/public/images/lightbox/close.gif',
		imageBtnPrev: 'http://volvoworldfinal2009.xsite.be/public/images/lightbox/prev.gif',
		imageBtnNext: 'http://volvoworldfinal2009.xsite.be/public/images/lightbox/next.gif',
		containerResizeSpeed: 350,
		txtImage: 'Image',
		txtOf: 'of',
		fixedNavigation:true
	});
				
    /* Sponsors */
    $("#sponsors").scrollable({size:1,item:"div"}).circular().autoscroll({steps:1,interval:3000});
	$("#photos").scrollable({size:1,item:"div"}).circular().autoscroll({steps:1,interval:5000});
	
	/* Photos */
    $("#photos_scrollable").scrollable({
		size:4,
		item:"div"
	})/*.find(".items a").tooltip({
		tip: '#tooltipPhotos',
        effect: 'fade', 
        fadeOutSpeed: 100, 
        predelay: 100, 
        position: "top center",         
        offset: [23, -381] 
	})*/;
	
	/* Videos */
	var current = '#vid0';
    $("#videos_scrollable").scrollable({
		size:4,
		item:"div",
		next:".nextPageVideos",
		prev:".prevPageVideos"
	})/*.find(".items a").tooltip({
		tip: '#tooltipVideo',
        effect: 'fade', 
        fadeOutSpeed: 100, 
        predelay: 100, 
        position: "top center",         
        offset: [23, -381] 
	})*/;
	$("#videos_scrollable .items div").bind('click',function() {
		$('#video_overlay').remove();
		var id = '#v'+$(this).attr('id');
		$('#videos').append('<div id="video_overlay"></div>');
		$('#video_overlay').css({'position':'absolute','top':'5px','left':'5px','display':'none','width':'420','height':'280','background-color':'#ECECEC'}).fadeIn(700,function(){
			$(current).css('display','none');
			current = id;
			$(id).css('display','block');
			$(this).fadeOut(2000,function(){
				$(this).remove();
			});
		});
		return false;
	});
						   
});