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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
jQuery(document).ready(function($) {
	/*
		seyDoggy ZipList
	*/
	// remove empty List titles
	$('#stacks_in_1930_page9 .sdZiplistTitle').each(function() {
		if ($(this).html() == '') $(this).remove();
	});
	// remove padding for non numbered/bulleted lists
	$('#stacks_in_1930_page9 ul.sdZiplist').each(function() {
		if ($(this).css('list-style-type') == 'none') {
			$(this).css({'margin-left':'0','padding-left':'0'});
		}
	});
	// ALL THE ACTION
	$('#stacks_in_1930_page9 .sdZiplistItemTitle_stacks_in_1930_page9:first').siblings().slideDown().end().children('a').removeClass('sdZiplistClick').html('[–]');
	$('#stacks_in_1930_page9 .sdZiplistItemTitle_stacks_in_1930_page9').each(function() {
		// that variable
		var that = '#stacks_in_1930_page9 .sdZiplistItemTitle_stacks_in_1930_page9';
		// if [+/-] not used, wrap title in anchor
		if ($(this).children('a').css('display') == 'none') $(this).wrapInner('<a href="#" class="sdZiplistClick"></a>');
		// prevent default click event
		$(this).children('a').css('text-decoration','none').click(function(event) {event.preventDefault()});
		// click function
	    $(this).click(function() {
			if ($(this).children('a').hasClass('sdZiplistShowHide')) {
				if ($(this).children('a').hasClass('sdZiplistClick')) {
					$(that).siblings().slideUp().end().children('a').addClass('sdZiplistClick').html('[+]');
					$(this).siblings().slideDown().end().children('a').removeClass('sdZiplistClick').html('[–]');
				} else {
					$(this).siblings().slideUp().end().children('a').addClass('sdZiplistClick').html('[+]');
				}
			} else {
				if ($(this).children().hasClass('sdZiplistClick')) {
					$(that).siblings().slideUp().end().children('a').addClass('sdZiplistClick');
					$(this).siblings().slideDown().end().children('a').removeClass('sdZiplistClick');
				} else {
					$(this).siblings().slideUp().end().children('a').addClass('sdZiplistClick');
				}
			}
	    });
	});
});
	return stack;
})(stacks.stacks_in_1930_page9);



