// You need to specify the size of your background image here (could be done automatically by some PHP code)
//var FullscreenrOptions = {width: 1299, height: 907, bgID: '#bg-img'};
//// This will activate the full screen background!
//if(browserVersion != 'ie7' && browserVersion != 'ie6') {
//	jQuery.fn.fullscreenr(FullscreenrOptions);
//}
var initCarouselBoolean = false;

function initCarousel() {
	if($('#portfolio-carousel').length > 0 && initCarouselBoolean == false) {
		$('#portfolio-carousel').show();
		$('#portfolio-carousel').jcarousel({
			scroll:1,
			auto:3,
			easing: 'easeOutQuad',
			wrap: 'circular'
		});
		initCarouselBoolean = true;
	}
}

$(document).ready(function(){

	if($('#portfolio-carousel').length > 0) {
		$('#portfolio-carousel').hide();
	}

	$('#content, #credits').delay(600).fadeIn(500, initCarousel);

	$('.fancybox').fancybox({
		overlayOpacity: 0.8,
		overlayColor: '#000000',
		titlePosition: 'over'
	});

	if(browserVersion != 'ie6') {
		$(document).bgStretcher({
			images:[backgroundImagePath],
			imageContainer: 'bg-img'
		});
	}
});
