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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Styled Stack v1.3.0 by Joe Workman
$(document).ready(function() {	
	var custom_bg_src = $("#custom_bg_stacks_in_7_page59 img").attr("src");
	if (custom_bg_src) { 
	    $("#stacks_in_7_page59").css({'background-image':'url(' + custom_bg_src + ')'});	
	}
	else {
	    var bg_src = 'files/styled-stack-images/stack-bg0.png';
    	if (0 != 0) { $("#stacks_in_7_page59").css({'background-image':'url(' + bg_src + ')'}); }
	}
});
// End Styled Stack

	return stack;
})(stacks.stacks_in_7_page59);


// Javascript for stacks_in_12_page59
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//-- Totem Stack v1.0.2 by Joe Workman --//

/*  Totem Ticker Plugin
 *	Copyright (c) 2011 Zach Dunn / www.buildinternet.com
 *	Released under MIT License
 *	--------------------------
 *	Structure based on Doug Neiner's jQuery plugin blueprint: http://starter.pixelgraphics.us/
 */
(function(a){if(!a.omr){a.omr=new Object()}a.omr.totemticker=function(c,b){var d=this;d.el=c;d.$el=a(c);d.$el.data("omr.totemticker",d);d.init=function(){d.options=a.extend({},a.omr.totemticker.defaultOptions,b);d.ticker;d.format_ticker();d.setup_nav();d.start_interval()};d.start_interval=function(){clearInterval(d.ticker);d.ticker=setInterval(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0").appendTo(d.$el)})},d.options.interval)};d.reset_interval=function(){clearInterval(d.ticker);d.start_interval()};d.stop_interval=function(){clearInterval(d.ticker)};d.format_ticker=function(){if(typeof(d.options.max_items)!="undefined"&&d.options.max_items!=null){var f=d.options.row_height.replace(/px/i,"");var e=f*d.options.max_items;d.$el.css({height:e+"px",overflow:"hidden",})}else{d.$el.css({overflow:"hidden",})}};d.setup_nav=function(){if(typeof(d.options.stop)!="undefined"&&d.options.stop!=null){a(d.options.stop).click(function(){d.stop_interval();return false})}if(typeof(d.options.start)!="undefined"&&d.options.start!=null){a(d.options.start).click(function(){d.start_interval();return false})}if(typeof(d.options.previous)!="undefined"&&d.options.previous!=null){a(d.options.previous).click(function(){d.$el.find("li:last").detach().prependTo(d.$el).css("marginTop","-"+d.options.row_height);d.$el.find("li:first").animate({marginTop:"0px",},d.options.speed,function(){d.reset_interval()});return false})}if(typeof(d.options.next)!="undefined"&&d.options.next!=null){a(d.options.next).click(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0px").appendTo(d.$el);d.reset_interval()});return false})}if(typeof(d.options.mousestop)!="undefined"&&d.options.mousestop===true){d.$el.mouseenter(function(){d.stop_interval()}).mouseleave(function(){d.start_interval()})}};d.debug_info=function(){console.log(d.options)};d.init()};a.omr.totemticker.defaultOptions={message:"Ticker Loaded",next:null,previous:null,stop:null,start:null,row_height:"100px",speed:800,interval:4000,max_items:null,};a.fn.totemticker=function(b){return this.each(function(){(new a.omr.totemticker(this,b))})}})(jQuery);

$(document).ready(function() {	
	var bg_color = $('#stacks_in_12_page59').css('background-color');
	if (bg_color) { 
		$('#stacks_in_12_page59').css({'background-color': 'transparent'});	
		$('#totem_stacks_in_12_page59').css({'background-color': bg_color });	
	}
	$('#totem_stacks_in_12_page59').totemticker({
		row_height	:	'325px',
		next		:	'#totem-next-stacks_in_12_page59',
		previous	:	'#totem-previous-stacks_in_12_page59',
		stop		:	'#totem-stop-stacks_in_12_page59',
		start		:	'#totem-start-stacks_in_12_page59',
		mousestop	:	true,
        speed       :   1500,
        interval    :   5000,
        max_items   :   1
	});	
});


//-- End Totem Stack --//
	return stack;
})(stacks.stacks_in_12_page59);


// Javascript for stacks_in_25_page59
// ---------------------------------------------------------------------

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

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

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

//-- Popup Caption Stack v2.0.2 by Joe Workman --//
$(document).ready(function() {
	// Set Border
	var bg_border_style = $('#stacks_in_25_page59').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color = $('#stacks_in_25_page59').css('border-bottom-color');
		var bg_border_top = $('#stacks_in_25_page59').css('border-top-width');
		var bg_border_right = $('#stacks_in_25_page59').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_25_page59').css('border-bottom-width');
		var bg_border_left = $('#stacks_in_25_page59').css('border-left-width');
		$('#stacks_in_25_page59').css({'border-width':0});	
		$('#stacks_in_25_page59 .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_25_page59 .boxgrid img').height();
	var box_width = $('#stacks_in_25_page59 .boxgrid img').width();
	$('#stacks_in_25_page59 .boxgrid').height(box_height);
	$('#stacks_in_25_page59 .boxgrid').width(box_width);
	
	var caption_height = box_height * (29/100);
	var caption_reveal = box_height * (10/100);
	var init_caption = box_height - caption_reveal;
	$('#stacks_in_25_page59 .boxcaption').height(box_height);
	$('#stacks_in_25_page59 .caption_back').height(box_height);
	$('#stacks_in_25_page59 .captionfull .boxcaption').css({top: box_height});
	$('#stacks_in_25_page59 .caption .boxcaption').css({top: init_caption});
	$('#stacks_in_25_page59 .captionfulltop .boxcaption').css({bottom: box_height});
	$('#stacks_in_25_page59 .captiontop .boxcaption').css({bottom: init_caption});
	
	var speed = speed;
	//Caption Sliding (Partially Hidden to Visible)
	$('#stacks_in_25_page59 .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_25_page59 .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 Popup Caption Stack --//

	return stack;
})(stacks.stacks_in_25_page59);


// Javascript for stacks_in_31_page59
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Styled Stack v1.3.0 by Joe Workman
$(document).ready(function() {	
	var custom_bg_src = $("#custom_bg_stacks_in_31_page59 img").attr("src");
	if (custom_bg_src) { 
	    $("#stacks_in_31_page59").css({'background-image':'url(' + custom_bg_src + ')'});	
	}
	else {
	    var bg_src = 'files/styled-stack-images/stack-bg0.png';
    	if (0 != 0) { $("#stacks_in_31_page59").css({'background-image':'url(' + bg_src + ')'}); }
	}
});
// End Styled Stack

	return stack;
})(stacks.stacks_in_31_page59);


// Javascript for stacks_in_36_page59
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//-- Totem Stack v1.0.2 by Joe Workman --//

/*  Totem Ticker Plugin
 *	Copyright (c) 2011 Zach Dunn / www.buildinternet.com
 *	Released under MIT License
 *	--------------------------
 *	Structure based on Doug Neiner's jQuery plugin blueprint: http://starter.pixelgraphics.us/
 */
(function(a){if(!a.omr){a.omr=new Object()}a.omr.totemticker=function(c,b){var d=this;d.el=c;d.$el=a(c);d.$el.data("omr.totemticker",d);d.init=function(){d.options=a.extend({},a.omr.totemticker.defaultOptions,b);d.ticker;d.format_ticker();d.setup_nav();d.start_interval()};d.start_interval=function(){clearInterval(d.ticker);d.ticker=setInterval(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0").appendTo(d.$el)})},d.options.interval)};d.reset_interval=function(){clearInterval(d.ticker);d.start_interval()};d.stop_interval=function(){clearInterval(d.ticker)};d.format_ticker=function(){if(typeof(d.options.max_items)!="undefined"&&d.options.max_items!=null){var f=d.options.row_height.replace(/px/i,"");var e=f*d.options.max_items;d.$el.css({height:e+"px",overflow:"hidden",})}else{d.$el.css({overflow:"hidden",})}};d.setup_nav=function(){if(typeof(d.options.stop)!="undefined"&&d.options.stop!=null){a(d.options.stop).click(function(){d.stop_interval();return false})}if(typeof(d.options.start)!="undefined"&&d.options.start!=null){a(d.options.start).click(function(){d.start_interval();return false})}if(typeof(d.options.previous)!="undefined"&&d.options.previous!=null){a(d.options.previous).click(function(){d.$el.find("li:last").detach().prependTo(d.$el).css("marginTop","-"+d.options.row_height);d.$el.find("li:first").animate({marginTop:"0px",},d.options.speed,function(){d.reset_interval()});return false})}if(typeof(d.options.next)!="undefined"&&d.options.next!=null){a(d.options.next).click(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0px").appendTo(d.$el);d.reset_interval()});return false})}if(typeof(d.options.mousestop)!="undefined"&&d.options.mousestop===true){d.$el.mouseenter(function(){d.stop_interval()}).mouseleave(function(){d.start_interval()})}};d.debug_info=function(){console.log(d.options)};d.init()};a.omr.totemticker.defaultOptions={message:"Ticker Loaded",next:null,previous:null,stop:null,start:null,row_height:"100px",speed:800,interval:4000,max_items:null,};a.fn.totemticker=function(b){return this.each(function(){(new a.omr.totemticker(this,b))})}})(jQuery);

$(document).ready(function() {	
	var bg_color = $('#stacks_in_36_page59').css('background-color');
	if (bg_color) { 
		$('#stacks_in_36_page59').css({'background-color': 'transparent'});	
		$('#totem_stacks_in_36_page59').css({'background-color': bg_color });	
	}
	$('#totem_stacks_in_36_page59').totemticker({
		row_height	:	'325px',
		next		:	'#totem-next-stacks_in_36_page59',
		previous	:	'#totem-previous-stacks_in_36_page59',
		stop		:	'#totem-stop-stacks_in_36_page59',
		start		:	'#totem-start-stacks_in_36_page59',
		mousestop	:	true,
        speed       :   1500,
        interval    :   5000,
        max_items   :   1
	});	
});


//-- End Totem Stack --//
	return stack;
})(stacks.stacks_in_36_page59);



