
// '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_2005_page0
// ---------------------------------------------------------------------

// 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_2005_page0 = {};

// 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_2005_page0 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/*  SymfonIP symAccordion Stack - Code modifications for Opera & RapidWeaver - copyright 2010 Rights reserved
 * 	derived from easyAccordion 0.1 - jQuery plugin -
 *	Copyright (c) 2010 Andrea Cima Serniotti (http://www.madeincima.eu)
 *	Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
 *	Built for jQuery library http://jquery.com
 */
(function(a){a.fn.easyAccordion=function(b){var c={slideNum:true,autoStart:false,slideInterval:3000};this.each(function(){var h=a.extend(c,b);a(this).find("dl").addClass("easy-accordion");a.fn.setVariables=function(){dlWidth=a(this).width();dlHeight=a(this).height();dtWidth=a(this).find("dt").outerHeight();if(a.browser.msie){dtWidth=$(this).find("dt").outerWidth()}dtHeight=dlHeight-(a(this).find("dt").outerWidth()-a(this).find("dt").width());slideTotal=a(this).find("dt").size();ddWidth=dlWidth-(dtWidth*slideTotal)-(a(this).find("dd").outerWidth(true)-a(this).find("dd").width());ddHeight=dlHeight-(a(this).find("dd").outerHeight(true)-a(this).find("dd").height())};a(this).setVariables();if(a.browser.safari||a.browser.opera){var g=(dlHeight-dtWidth)/2;var d=-g}if(a.browser.mozilla){var g=dlHeight-20;var d=-20}if(a.browser.msie){var g=0;var d=0}var k=1;a(this).find("dt").each(function(){a(this).css({width:dtHeight,top:g,"margin-left":d});if(h.slideNum==true){a('<span class="slide-number">'+0+k+"</span>").appendTo(this);if(a.browser.msie){var n=parseInt(a(this).find(".slide-number").css("left"))-14;a(this).find(".slide-number").css({left:n});if(a.browser.version==6||a.browser.version==7){a(this).find(".slide-number").css({bottom:"auto"})}if(a.browser.version==8){var f=a(this).find(".slide-number").css("bottom");var m=parseInt(f)+parseInt(a(this).css("padding-top"))-12;a(this).find(".slide-number").css({bottom:m})}}else{var f=a(this).find(".slide-number").css("bottom");var m=parseInt(f)+parseInt(a(this).css("padding-top"));a(this).find(".slide-number").css({bottom:m})}}k=k+1});if(a(this).find(".active").size()){a(this).find(".active").next("dd").addClass("active")}else{a(this).find("dt:first").addClass("active").next("dd").addClass("active")}a(this).find("dt:first").css({left:"0"}).next().css({left:dtWidth});a(this).find("dd").css({width:ddWidth,height:ddHeight});a.fn.findActiveSlide=function(){var f=1;this.find("dt").each(function(){if(a(this).hasClass("active")){activeID=f}else{if(a(this).hasClass("no-more-active")){noMoreActiveID=f}}f=f+1})};a.fn.calculateSlidePos=function(){var f=2;a(this).find("dt").not(":first").each(function(){var n=dtWidth*activeID;if(f<=activeID){var o=dtWidth*(f-1);a(this).animate({left:o});if(f<activeID){a(this).next().css({left:o+dtWidth})}else{a(this).next().animate({left:n})}}else{var p=dlWidth-(dtWidth*(slideTotal-f+1));a(this).animate({left:p});var m=p+dtWidth;a(this).next().animate({left:m})}f=f+1});setTimeout(function(){a(".easy-accordion").find("dd").not(".active").each(function(){a(this).css({display:"none"})})},400)};a.fn.activateSlide=function(){this.parent("dl").setVariables();this.parent("dl").find("dd").css({display:"block"});this.parent("dl").find("dd.plus").removeClass("plus");this.parent("dl").find(".no-more-active").removeClass("no-more-active");this.parent("dl").find(".active").removeClass("active").addClass("no-more-active");this.addClass("active").next().addClass("active");this.parent("dl").findActiveSlide();if(activeID<noMoreActiveID){this.parent("dl").find("dd.no-more-active").addClass("plus")}this.parent("dl").calculateSlidePos()};a.fn.rotateSlides=function(f,p){var n=a(this);p.value=setTimeout(function(){n.rotateSlides(f,p)},f);a(this).findActiveSlide();var q=a(this).find("dt").size();var o=activeID;var m=o+1;if(m>q){m=1}a(this).find("dt:eq("+(m-1)+")").activateSlide()};function i(){this.value=null}var l=new i();a(this).findActiveSlide();a(this).calculateSlidePos();if(h.autoStart==true){var j=a(this);var e=parseInt(h.slideInterval);l.value=setTimeout(function(){j.rotateSlides(e,l)},e)}a(this).find("dt").not("active").click(function(){a(this).activateSlide();clearTimeout(l.value)});if(!(a.browser.msie&&a.browser.version==6)){a("dt").hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")})}})}})(jQuery);
// Make it go go go SymfoniP.com 
$(document).ready(function () {
$('div#stacks_in_2005_page0_symaccordiondeck').easyAccordion({autoStart: true,slideInterval: 5000,slideNum:false});
});
	return stack;
})(stacks.stacks_in_2005_page0);


// Javascript for stacks_in_2036_page0
// ---------------------------------------------------------------------

// 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_2036_page0 = {};

// 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_2036_page0 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

//-- Fancy Image Hover Stack v2.0.0 by Joe Workman --//
$(document).ready(function() {
	// Set Border
	var bg_border_style = $('#stacks_in_2036_page0').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color = $('#stacks_in_2036_page0').css('border-bottom-color');
		var bg_border_top = $('#stacks_in_2036_page0').css('border-top-width');
		var bg_border_right = $('#stacks_in_2036_page0').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_2036_page0').css('border-bottom-width');
		var bg_border_left = $('#stacks_in_2036_page0').css('border-left-width');
		$('#stacks_in_2036_page0').css({'border-width':0});	
		$('#stacks_in_2036_page0 .boxgrid').css({'border-style':bg_border_style,
								 'border-color':bg_border_color,
								 'border-top-width':bg_border_top,
								 'border-right-width':bg_border_right,
								 'border-bottom-width':bg_border_bottom,	
								 'border-left-width':bg_border_left
		});	
	}
	var box_height = $('#stacks_in_2036_page0 .boxgrid img').height();
	var box_width = $('#stacks_in_2036_page0 .boxgrid img').width();
	$('#stacks_in_2036_page0 .boxgrid').height(box_height);
	$('#stacks_in_2036_page0 .boxgrid').width(box_width);
	
	var caption_height = box_height * (30/100);
	var caption_reveal = box_height * (10/100);
	var init_caption = box_height - caption_reveal;
	$('#stacks_in_2036_page0 .boxcaption').height(box_height);
	$('#stacks_in_2036_page0 .caption_back').height(box_height);
	$('#stacks_in_2036_page0 .captionfull .boxcaption').css({top: box_height});
	$('#stacks_in_2036_page0 .caption .boxcaption').css({top: init_caption});
	$('#stacks_in_2036_page0 .captionfulltop .boxcaption').css({bottom: box_height});
	$('#stacks_in_2036_page0 .captiontop .boxcaption').css({bottom: init_caption});
	
	var speed = speed;
	//Caption Sliding (Partially Hidden to Visible)
	$('#stacks_in_2036_page0 .boxgrid.caption').hover(function(){
		$(".cover", this).stop().animate({top:(box_height - caption_height)},{queue:false,duration:speed});
	}, function() {
		$(".cover", this).stop().animate({top: init_caption},{queue:false,duration:speed});
	});
	//Caption Sliding Down (Hidden to Visible)
	$('#stacks_in_2036_page0 .boxgrid.captiontop').hover(function(){
		$(".cover", this).stop().animate({bottom:(box_height - caption_height)},{queue:false,duration:speed});
	}, function() {
		$(".cover", this).stop().animate({bottom:init_caption},{queue:false,duration:speed});
	});
	
});
//-- End Fancy Image Hover Stack --//

	return stack;
})(stacks.stacks_in_2036_page0);


// Javascript for stacks_in_2042_page0
// ---------------------------------------------------------------------

// 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_2042_page0 = {};

// 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_2042_page0 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

//-- Fancy Image Hover Stack v2.0.0 by Joe Workman --//
$(document).ready(function() {
	// Set Border
	var bg_border_style = $('#stacks_in_2042_page0').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color = $('#stacks_in_2042_page0').css('border-bottom-color');
		var bg_border_top = $('#stacks_in_2042_page0').css('border-top-width');
		var bg_border_right = $('#stacks_in_2042_page0').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_2042_page0').css('border-bottom-width');
		var bg_border_left = $('#stacks_in_2042_page0').css('border-left-width');
		$('#stacks_in_2042_page0').css({'border-width':0});	
		$('#stacks_in_2042_page0 .boxgrid').css({'border-style':bg_border_style,
								 'border-color':bg_border_color,
								 'border-top-width':bg_border_top,
								 'border-right-width':bg_border_right,
								 'border-bottom-width':bg_border_bottom,	
								 'border-left-width':bg_border_left
		});	
	}
	var box_height = $('#stacks_in_2042_page0 .boxgrid img').height();
	var box_width = $('#stacks_in_2042_page0 .boxgrid img').width();
	$('#stacks_in_2042_page0 .boxgrid').height(box_height);
	$('#stacks_in_2042_page0 .boxgrid').width(box_width);
	
	var caption_height = box_height * (30/100);
	var caption_reveal = box_height * (10/100);
	var init_caption = box_height - caption_reveal;
	$('#stacks_in_2042_page0 .boxcaption').height(box_height);
	$('#stacks_in_2042_page0 .caption_back').height(box_height);
	$('#stacks_in_2042_page0 .captionfull .boxcaption').css({top: box_height});
	$('#stacks_in_2042_page0 .caption .boxcaption').css({top: init_caption});
	$('#stacks_in_2042_page0 .captionfulltop .boxcaption').css({bottom: box_height});
	$('#stacks_in_2042_page0 .captiontop .boxcaption').css({bottom: init_caption});
	
	var speed = speed;
	//Caption Sliding (Partially Hidden to Visible)
	$('#stacks_in_2042_page0 .boxgrid.caption').hover(function(){
		$(".cover", this).stop().animate({top:(box_height - caption_height)},{queue:false,duration:speed});
	}, function() {
		$(".cover", this).stop().animate({top: init_caption},{queue:false,duration:speed});
	});
	//Caption Sliding Down (Hidden to Visible)
	$('#stacks_in_2042_page0 .boxgrid.captiontop').hover(function(){
		$(".cover", this).stop().animate({bottom:(box_height - caption_height)},{queue:false,duration:speed});
	}, function() {
		$(".cover", this).stop().animate({bottom:init_caption},{queue:false,duration:speed});
	});
	
});
//-- End Fancy Image Hover Stack --//

	return stack;
})(stacks.stacks_in_2042_page0);



