$("article").css({
"min-height":$(window).innerHeight()
});
$("#mainIntro").fadeToggle(0);//hides the main introduction text initially
$("#welcome").hover(function(){
$("#mainIntro").stop().fadeToggle(1000);//shows the main intro
},function(){
$("#mainIntro").stop().fadeToggle(1000);//hides the main intro
});
$(window).bind('scroll',function(e){
parallaxScroll();
});
var rot1, rot2, rot3, rot4, rot5, rot6, rot7, rot8, rot9;
function parallaxScroll(){
//get the number of pixels scrolled relative to the top of browser window
var scrolled = parseInt($(window).scrollTop());
//set the direction and amount of rotation variables
//negative - rotates CCW and the larger the multiplier, the faster the rotation
rot1 = scrolled*10 + "deg";
rot2 = scrolled*20 + "deg";
rot3 = -scrolled*20 + "deg";
rot4 = scrolled*30 + "deg";
rot5 = scrolled*-2 + "deg";
rot6 = scrolled*2.5 + "deg";
rot7 = scrolled*3 + "deg";
rot8 = -scrolled*40 + "deg";
rot9 = scrolled*4 + "deg";
$("#pic1").css({
x:(-(scrolled*2)),//negative x shifts left
y:(-(scrolled*2)),//negative y shifts up
rotate:rot1
});
$("#pic2").css({
x:((scrolled)),
y:((scrolled*4)),
rotate:rot2
});
$("#pic3").css({
x:((scrolled*2)),
y:(-(scrolled*0)),
rotate:rot3
});
$("#pic4").css({
x:(-(scrolled*4)),
y:((scrolled*0)),
rotate:rot4
});
$("#pic5").css({
x:(-(scrolled)),
y:(-(scrolled*2)),
rotate:rot5
});
$("#pic6").css({
x:((scrolled*1)),
y:(-(scrolled*2)),
rotate:rot6
});
$("#pic7").css({
x:((scrolled*4)),
y:(-(scrolled*2)),
rotate:rot7
});
$("#pic8").css({
x:((scrolled*3)),
y:((scrolled*3)),
rotate:rot8
});
$("#pic9").css({
x:((scrolled/10)),
y:((scrolled*5)),
rotate:rot9
});
if(scrolled >= (parseInt($("#sectionBottom").offset().top)-$(window).innerHeight())){
$("body").css({
"overflow-y":"hidden"
});
} else {
$("body").css({
"overflow-y":"scroll"
});
}
}