
$(document).ready(function(){
	
//Attaches the hover state to the contact buttons on the contact page
if($('.contactHover').length != 0){
	contactBtnHover()
}
//Attaches the hover states to the contact buttons
contactButtons();

//Loads Galery Functions a gallery exists
if($('.galleryWidget').length != 0){
	galleryClick();
};
if($('.peopleGallery').length != 0){
	peopleClick();
};

//Loads internal overlay functions if one exists
if($('a.internalOverlay').length != 0){
	nonGalleryOverlay();
};
//Loads people nav function if one exists
if($('.jobsGallery').length != 0){
	$('.viewerWindow').children('ul:odd').addClass('odd');
	jobsClicker();
};


//Setup Backgrounds
	backgroundPicker();

//Sorts out the footer
	positionFooter(); 

//Dropnav
$('li.navItem').hover(function(){
if($(this).is('.family')){}else{
	$(this).children('.dropNav').fadeIn();
}
},function(){
if($(this).is('.family')){}else{
	$(this).children('.dropNav').fadeOut();
}
});

});

//Resorts the footer and overlay (if one exists) on resize or scroll
$(window).resize(function(){
	positionOverlay();
	positionFooter();
});
$(window).scroll(function(){
	positionOverlay();
	positionFooter();
});


