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

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

// 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_14_page6 = (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_14_page6 img").attr("src");
	if (custom_bg_src) { 
	    $("#stacks_in_14_page6").css({'background-image':'url(' + custom_bg_src + ')'});	
	}
	else {
	    var bg_src = 'files/styled-stack-images/stack-bg0.png';
    	if (0 != 0) { $("#stacks_in_14_page6").css({'background-image':'url(' + bg_src + ')'}); }
	}
});
// End Styled Stack

	return stack;
})(stacks.stacks_in_14_page6);


// Javascript for stacks_in_32_page6
// ---------------------------------------------------------------------

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

// 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_32_page6 = (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_32_page6 img").attr("src");
	if (custom_bg_src) { 
	    $("#stacks_in_32_page6").css({'background-image':'url(' + custom_bg_src + ')'});	
	}
	else {
	    var bg_src = 'files/styled-stack-images/stack-bg0.png';
    	if (0 != 0) { $("#stacks_in_32_page6").css({'background-image':'url(' + bg_src + ')'}); }
	}
});
// End Styled Stack

	return stack;
})(stacks.stacks_in_32_page6);


// Javascript for stacks_in_37_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
$(document).ready(function(){
	
	var $ns = jQuery.noConflict();
	var first = 0;
	var speed = 600;
	var pause = 5000;
	intervalstacks_in_37_page6 = setInterval(removeFirst, pause); 
	
		function removeFirst(){
			first = $ns('#newsSliderstacks_in_37_page6 div:first').html();
			$ns('#newsSliderstacks_in_37_page6 div:first')
			.animate({opacity: 0, height: 'hide'}, speed)
			.hide('slow', function() {$ns(this).remove();
			});
			addLast(first);
		}
		
		function addLast(first){
			last = '<div style="display:block">'+first+'</div>';
			$ns('#newsSliderstacks_in_37_page6').append(last)
			$ns('#newsSliderstacks_in_37_page6 div:last')
			.animate({opacity: 1, height: 'show'}, speed)
			.show('slow')
		}
		
		// Pauses news slider on hover
		$ns('#newsSliderstacks_in_37_page6').hover(function() {
		clearInterval(intervalstacks_in_37_page6);
		},
		function() {
		intervalstacks_in_37_page6 = setInterval(removeFirst, pause);
		});
		
});





	return stack;
})(stacks.stacks_in_37_page6);



