$(document).ready(function() { 



$('.container-nav a').click(function() {
$("#container").fadeOut("1000");
$("#footer .show-window").fadeIn("1000");
$("#body-click").fadeIn("1000");
$('.slideshow').cycle('resume');
});


$('#body-click a').click(function() {
$("#container").fadeIn("1000");
$("#footer .show-window").fadeOut("1000");
$("#body-click").fadeOut("1000");

});


$('#movie').click(function() {
$('.slideshow').cycle('pause');
});

$('.slideshow').cycle({
		fx:    'fade', 
   		speed:    2000, 
    	timeout:  8000 
});

function resizebackground(){	
	
	if ($(window).width() >= $(window).height()) {
	$(".slideshow,.slideshow img,").addClass("tall").removeClass("wide");	
	}

	if ($(window).width() < ($(window).height() + (($(window).height()) * .6))) {
	$(".slideshow,.slideshow img,").addClass("wide").removeClass("tall");
	}
	
}

$(window).resize(function() {
	
resizebackground()
  
});

setTimeout('resizebackground', 100);

$(".index-selected #header").delay(1550).fadeIn("slow");

$(".index-selected #container").delay(5800).fadeIn("slow");

$(".index-selected .navigation li.about").delay(3100).animate({"top": "+=120px"}, "slow");
$(".index-selected .navigation li.work").delay(3500).animate({"top": "+=120px"}, "slow");
$(".index-selected .navigation li.contact").delay(3900).animate({"top": "+=120px"}, "slow");
$(".index-selected .navigation li.fb").delay(4300).animate({"top": "+=120px"}, "slow");
$(".index-selected .navigation li.b").delay(4700).animate({"top": "+=120px"}, "slow");
// $(".navigation li.news").delay(600).animate({"top": "+=120px"}, "slow");


// disable right clicks

$(function() {
            $(this).bind("contextmenu", function(e) {
                e.preventDefault();
            });
        }); 


});
