function resizeBG() {
	var startwidth=1536;
	var startheight=1024;

	//Define image ratio
	var ratio = startheight/startwidth;

	//Gather browser and current image size
	var imagewidth = $(".background").width();
	var imageheight = $(".background").height();
	var browserwidth = $(window).width();
	var browserheight = $(window).height();
	var offset;

	//Resize image to proper ratio
	if ((browserheight/browserwidth) > ratio) {
		$(".background").height(browserheight);
		$(".background").width(browserheight / ratio);
		$(".background").height(browserheight);
		$(".background").width(browserheight / ratio);
	} else {
		$(".background").width(browserwidth);
		$(".background").height(browserwidth * ratio);
		$(".background").width(browserwidth);
		$(".background").height(browserwidth * ratio);
	}

	$(".background").css('left', (browserwidth - $(".background").width())/2);
	$(".background").css('top', (browserheight - $(".background").height())/2);

	return false;
}

$(document).ready(function(){
	Shadowbox.init({
	    skipSetup: true,
	    overlayColor: '#fff',
	    overlayOpacity: '1'
	}); 
	
	Shadowbox.setup("a.sbpb", {gallery: "pb"}); 

	$("div.seriecontainer .serie_item div.hitspot").hover(function(){
		$(this).next("div").fadeIn(300);
	}, function(){
		$(this).next("div").fadeOut(300);
	});
	
	$("div#seriecontainer .serie_item div.hitspot").click(function(){
		var obj = $(this).prev();
		var link = $("h2 a", obj).attr("href");
		location.href = link;
	});
});
