
// 'stacks' is the Stacks global object.
// All of the other Stacks related Javascript will 
// be attatched to it.
var stacks = {};


// this call to jQuery gives us access to the globaal
// jQuery object. 
// 'noConflict' removes the '$' variable.
// 'true' removes the 'jQuery' variable.
// removing these globals reduces conflicts with other 
// jQuery versions that might be running on this page.
stacks.jQuery = jQuery.noConflict(true);

// Javascript for stacks_in_7_page29
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_7_page29 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_7_page29 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_7_page29').show();
	
	//Hide the caption container on load
	$ic('#imageCaptionBoxstacks_in_7_page29').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_7_page29').css('opacity', '0.99');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_7_page29 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_7_page29').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_7_page29');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	$ic('#imageCaptionstacks_in_7_page29').hover(  
		function () {  
		//show caption on hover  
		$ic('#imageCaptionBoxstacks_in_7_page29', this).fadeIn(800);
		},   
		function () {  
		//hide caption again 
		$ic('#imageCaptionBoxstacks_in_7_page29', this).fadeOut(300);          
		}  
	);  
});
	return stack;
})(stacks.stacks_in_7_page29);


// Javascript for stacks_in_13_page29
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_13_page29 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_13_page29 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_13_page29').show();
	
	//Hide the caption container on load
	$ic('#imageCaptionBoxstacks_in_13_page29').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_13_page29').css('opacity', '0.99');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_13_page29 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_13_page29').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_13_page29');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	$ic('#imageCaptionstacks_in_13_page29').hover(  
		function () {  
		//show caption on hover  
		$ic('#imageCaptionBoxstacks_in_13_page29', this).fadeIn(800);
		},   
		function () {  
		//hide caption again 
		$ic('#imageCaptionBoxstacks_in_13_page29', this).fadeOut(300);          
		}  
	);  
});
	return stack;
})(stacks.stacks_in_13_page29);


// Javascript for stacks_in_21_page29
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_21_page29 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_21_page29 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_21_page29').show();
	
	//Hide the caption container on load
	$ic('#imageCaptionBoxstacks_in_21_page29').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_21_page29').css('opacity', '0.99');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_21_page29 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_21_page29').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_21_page29');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	$ic('#imageCaptionstacks_in_21_page29').hover(  
		function () {  
		//show caption on hover  
		$ic('#imageCaptionBoxstacks_in_21_page29', this).fadeIn(800);
		},   
		function () {  
		//hide caption again 
		$ic('#imageCaptionBoxstacks_in_21_page29', this).fadeOut(300);          
		}  
	);  
});
	return stack;
})(stacks.stacks_in_21_page29);


// Javascript for stacks_in_27_page29
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_27_page29 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_27_page29 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_27_page29').show();
	
	//Hide the caption container on load
	$ic('#imageCaptionBoxstacks_in_27_page29').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_27_page29').css('opacity', '0.99');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_27_page29 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_27_page29').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_27_page29');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	$ic('#imageCaptionstacks_in_27_page29').hover(  
		function () {  
		//show caption on hover  
		$ic('#imageCaptionBoxstacks_in_27_page29', this).fadeIn(800);
		},   
		function () {  
		//hide caption again 
		$ic('#imageCaptionBoxstacks_in_27_page29', this).fadeOut(300);          
		}  
	);  
});
	return stack;
})(stacks.stacks_in_27_page29);


// Javascript for stacks_in_36_page29
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_36_page29 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_36_page29 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Spin Stack by http://www.doobox.co.uk
// Copyright@2010 Mr JG Simpson, trading as Doobox.
// all rights reserved.
$(document).ready(function(){

    var numItems = $("#stacks_in_36_page29 .spin").length;
   
    var randomNum = Math.ceil(Math.random()*numItems);
    var randomNum = randomNum - 1;
    $("#stacks_in_36_page29 #spin" + randomNum).css({'display' : 'block'});
    
});

	return stack;
})(stacks.stacks_in_36_page29);



