$(document).ready(function() {
       setTimeout(
               function(){
                       initStuff();
               }
               , 50
       )
});

//jQuery(document).ready(function(){ 
function initStuff() {
	toggleArtistListing();
	
	imageGridHover();
	
	columnSplitter();
	
	newsletterPopup();

	//call the page flip
	$( '#pageFlip' ).fold();

	equalHeight($(".panel"));

	showPagePeel();
};
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!------------------------------------------------------------------------------------------------ TOGGLE ARTIST LISTING ON AND OFF & TABS FOR ARTIST/EXHIBITION DETAIL PAGE -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
function toggleArtistListing() {
	jQuery.fn.fadeToggle = function(speed) {
		return this.animate({opacity: 'toggle'}, 500);
	}; 
	$('a.showArtistByName').click(function() {
		$('#artistList').fadeToggle();
		$(this).text($(this).text() == 'Show all artists by name' ? 'Hide all artists by name' : 'Show all artists by name');
	})
	$('#artistList').mouseleave(function() {
		$('#artistList').fadeToggle();
		$('a.showArtistByName').text($('a.showArtistByName').text() == 'Show all artists by name' ? 'Hide all artists by name' : 'Show all artists by name');
	});	
	
	// show more artist info
	$('a.viewAllInfo').click(function() {
		$('.artistInformation').animate( { top: '200' } , 400);
		$('.artistInformation').removeClass( "constrained");
		
		$('a.hideAllInfo').toggle();
		$('a.viewAllInfo').toggle();
	});
	// hide extra artist info
	$('a.hideAllInfo').click(function() {
		$('.artistInformation').animate( { top: '400' } , 400);
		$('.artistInformation').addClass( "constrained");
		
		$('a.hideAllInfo').toggle();
		$('a.viewAllInfo').toggle();
	});
	//artist bio tab
	$('a.artistMore').click(function() {
		if( $('#artistBio').css('display') !='none' ){
			$('#artistBio').toggle();
			$('#artistMore').toggle();
			$(this).addClass("active");
			$(this).removeClass('notActive');
			$('a.artistBio').addClass("notActive");
			$('a.artistBio').removeClass('active');
		}
	});
	//artist more info tab
	$('a.artistBio').click( function() {
		if( $('#artistMore').css('display') !='none' ){
			$('#artistBio').toggle();
			$('#artistMore').toggle();
			$(this).addClass("active");
			$(this).removeClass('notActive');
			$('a.artistMore').addClass("notActive");
			$('a.artistMore').removeClass('active');
			}
	});
};

<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!-------------------------------------------------------------------------------------------------------------------------------------- MAKE PAGE PEEL VISIBLE ON PAGE LOAD -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
function showPagePeel() {
	$('#pagePeel').toggle();
};

<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!--------------------------------------------------------------------------------------------------------------------------------------------------------- NEWSLETTER POPUP -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
function newsletterPopup() {
	$('a.newsletter').click(function() {
			$('#newletterPopup').fadeToggle();
	});
	$('.closeNewsletter').click(function() {
			$('#newletterPopup').fadeToggle();
	});
	$('#previewCloseImg').click(function() {
			$('#newletterPopup').fadeToggle();
	});
};


<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!------------------------------------------------------------------------------------------------------------- ANIMATE HOVER ON IMAGE GRID (ARTIST / ARTWORK LISTING PAGES) -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
function imageGridHover() {
	$('.gridImage a img').animate({ left: '-40', top: '-14', width: '320'}, 0);
	$('.gridImage').fadeToggle();
	$('.gridImage').mouseenter(function(e) {
		$(this).children('a').children('img').animate({ left: '-25', top: '-9', width: '300'}, 200);
		$(this).children('a').children('span.dark-background').fadeOut(200);
		$(this).children('a').children('span.artworkDescription').fadeIn(200);
//		if( $('#artistList').css('display') !='none' ){
//			$('#artistList').fadeToggle();
//			$('a.showArtistByName').text($('a.showArtistByName').text() == 'Show artists by name' ? 'Hide artists by name' : 'Show artists by name');
//		}
	}).mouseleave(function(e) {
		$(this).children('a').children('img').animate({ left: '-40', top: '-14', width: '320'}, 200);
		$(this).children('a').children('span.dark-background').fadeIn(200);
		$(this).children('a').children('span.artworkDescription').fadeOut(200);
	});
};

<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------- ARTIST DETAIL --->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->


<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------ COLUMNS -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
function columnSplitter() {
	$('.infoColumn').columnize({
		columns : 2,
		buildOnce : true
	});
};



<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------ SLIDERS -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
// now this file lives in both car carouselHigh.js and carouselLow.js

<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!------------------------------------------------------------------------------------------------------------------------------------------ EQUAL HEIGHT COLUMNS FOR SLIDER -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
//cycles through all panels in slider and sets height to that of the highest panel
function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
	$(".stepcarousel").height(tallest);
	$(".stepcarousel2").height(tallest);
	//alert(tallest);
}

<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------- LIGHTBOX POPUP -->
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
//for full list of abailable options, go to http://www.shadowbox-js.com/options.html
setupShadowBoxSys();
function setupShadowBoxSys()
{
    Shadowbox.init({
	    handleOversize: "resize",
	    displayCounter: false,
	    overlayOpacity: 0.9,
	    viewportPadding: 100
    });
}
