Cufon.replace('h1');
$(document).ready(function() {
	/* ie6 png fixes */
	$("#header").supersleight();
	$("#footer").supersleight();
	$("img[src$=.png]").supersleight();
	
	$.fn.supersized.options = {  
		startwidth: 1280,  
		startheight: 800,
		vertical_center: 1,
		slideshow: 1,
		navigation: 0,
		transition: 0, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
		pause_hover: 0,
		slide_counter: 1,
		slide_captions: 1,
		slide_interval: 3000  
	};
	$('#supersize').supersized(); 
	
	/* ---------- FANCYBOX ------------ */

	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	$("a.group").fancybox({
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'overlayOpacity':	0.75,
		'overlayColor'	:	'#000000'
	});
	
	footerPush();
	Cufon.now();
});

function footerPush () {
	var diff;
	var contentHeight = $("#header").outerHeight(true) + $("#content").outerHeight(true) + $("#footer").outerHeight(true);
	var viewportHeight = $(window).height();
	var contentPadding;
	var contentDivHeight = $("#content").height();
	
	if(contentHeight < viewportHeight) {
		diff = (viewportHeight - contentHeight);
		contentDivHeight += (diff - 2);
		$("#content").height(contentDivHeight)
	}
};
