
$(document).ready(function() { 
						   
	//set up side scrolling site

	$(".nav li a").each(function(index, element){
     	$(this).attr('href',$(this).attr('href') + window.location.hash)
  	});

    $(".nav a").bind("click",function(event){  
									
    	event.preventDefault();  
    	var target = $(this).attr("href");  
    	$("html, body").stop().animate({  
      		scrollLeft: $(target).offset().left
    	}, 3000);

	});  
	
	//adjust background image size to fit browser window on load and resize
	
	var browserheight = $(window).height();
	var maxheight = ("1050"); 
	
	$(".panel, .fill").height(browserheight);
	
	$(window).resize(function() {
		var resize = $(window).height();
		$(".panel, .fill").css("height","auto");  
		$(".panel, .fill").height(resize);  
	});	
	
	//set up fancyboxes
	
	$("a.fancy").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'cyclic'		:  	true,
		'titleShow'		:	false,
		'overlayShow'	:	false
	});
	

	$("a#theatrical-reel-link").fancybox({ 
		'width'			: 	640,
		'height'		: 	399,
        'autoScale'     : 	false,
		'scrolling'		:	'no',
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'titleShow'		:	false,
		'overlayShow'	:	false,
		'type'			: 	'iframe'
	}); 
	
	$("#hosting-reel-link").fancybox({
		'width'			: 	640,
		'height'		: 	425,
        'autoScale'     : 	false,
		'scrolling'		:	'no',
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'titleShow'		:	false,
		'overlayShow'	:	false,
		'type'			: 	'iframe'
	});
	
});
