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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//(function (jsp) {
//jsp.topZIndex = function (selector) {
//        return Math.max(0, Math.max.apply(null, jsp.map(jsp(selector || ".SPactive *"), 
//                function (v) {
//                        return parseInt(jsp(v).css("z-index")) || null;
//                }
//        )));
//};

//jsp.fn.topZIndex = function (opt) {
//        if (this.length === 0) {
//                return this;
//        }
//        opt = jsp.extend({increment: 1, selector: ".SPactive *"}, opt);
//        var zmax = jsp.topZIndex(opt.selector), inc = opt.increment;
//        return this.each(function () {
//                jsp(this).css("z-index", zmax += inc);
//        });
//};
//})(jQuery);

var jsp = jQuery.noConflict();
(function (jQuery) {
	jsp.fn.SPbutton_stacks_in_1_page4 = function (options) 
	{
		jsp(this).html('<div id="SPbutton_stacks_in_1_page4"></div><div id="SPBlock_stacks_in_1_page4"></div>');
		//jsp(this).addClass('SPactive');
		jsp('div#SPbutton_stacks_in_1_page4').toggle(function () 
		{
			//
			//closePanels();
			
			//jsp("#SPBlock_stacks_in_1_page4").topZIndex( { increment: 5 } );
			//jsp("#SPbutton_stacks_in_1_page4").topZIndex( { increment: 5 } );
			jsp(this).animate({"marginTop": "-=2px"},"fast");
			jsp('#SPBlock_stacks_in_1_page4').animate({"marginTop": "-=0px"},"fast");
			jsp(this).animate({"marginTop": "+=600px"},"slow");
			jsp('#SPBlock_stacks_in_1_page4').animate({"marginTop": "+=600px"},"slow");
						
			// Make active
			//jsp(this).addClass('activeslp');
		},
		function () 
		{
			jsp('#SPBlock_stacks_in_1_page4').animate({"marginTop": "-=600px"},"slow");
			jsp(this).animate({"marginTop": "-=600px"},"slow").animate({"marginTop": "+=2px"},"fast");
			// active
			//jsp(this).removeClass('activeslp');
		});//toggle
	}
})(jQuery);

	jQuery(function(){
		jsp('body').append('<div id="SlidingPanel_stacks_in_1_page4"></div>');
		jsp('#SlidingPanel_stacks_in_1_page4').SPbutton_stacks_in_1_page4();
		jsp('#SPBlock_stacks_in_1_page4').html( jsp('#SlidingPanelContent_stacks_in_1_page4').html() );
		jsp('#SPbutton_stacks_in_1_page4').html( jsp('#button_stacks_in_1_page4').html() );
		jsp('#SlidingPanelContent_stacks_in_1_page4').remove();
		jsp('#button_stacks_in_1_page4').remove();
		var oldheight = jsp('#SPBlock_stacks_in_1_page4').height();
		var newheight = oldheight - 2;
		jsp('#SPBlock_stacks_in_1_page4').height( newheight ); 
	});

//	function closePanels() {
//		jsp("div[id^='SPbutton']").each(function(){
//			if( jsp(this).hasClass('activeslp') )
//			{
//				jsp(this).click();
//			}
//		});
//	}
	return stack;
})(stacks.stacks_in_1_page4);


// Javascript for stacks_in_475_page4
// ---------------------------------------------------------------------

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

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

	return stack;
})(stacks.stacks_in_475_page4);


// Javascript for stacks_in_482_page4
// ---------------------------------------------------------------------

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

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

	return stack;
})(stacks.stacks_in_482_page4);


// Javascript for stacks_in_493_page4
// ---------------------------------------------------------------------

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

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

	return stack;
})(stacks.stacks_in_493_page4);



