// Caldwell Cellars
// Written by Nic Hubbard - Zed Said Studio
// http://www.zedsaid.com

$(document).ready(function() {
	
	$.fn.supersized.options = {  
		startwidth: 1667,  
		startheight: 1200,
		vertical_center: 0,
		slideshow: 0,
		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: 0,
		slide_captions: 0,
		slide_interval: 0  
	};
	
	$('#supersize').supersized();
	
	$(window).bind("load", function() {		
		// Check if we are on the homepage
		if ($('#homeBody').length > 0 && !visited) {
			setTimeout(function() {
				$('#content, #innerScroll').hide().fadeIn(2000);
			},2000);
		} else {
			$('#content, #innerScroll').show();
		}
		
		// Redirect user if they just site on homepage
		if ($('#homeBody').length > 0) {
			setTimeout(function() {
				document.location = '/wines.php';
			},15000);
		}
		
	});//end bind
	
});//end ready
