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

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

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

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

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// TABBY STACK BY http://www.doobox.co.uk XXXXXXX
// COPYRIGHT@2010 MR JG SIMPSON, TRADING AS DOOBOX
// ALL RIGHTS RESERVED XXXXXXXXXXXXXXXXXXXXXXXXXXX
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

/*
PIE: CSS3 rendering for IE
Version 1.0beta4
http://css3pie.com
Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2.
*/


$(document).ready(function() {

if(typeof String.prototype.trim !== 'function') {
			String.prototype.trim = function() {
			return this.replace(/^\s+|\s+$/, '');
			}
		}
       
      var stacks_in_371_page93thiscat;
      var stacks_in_371_page93catTrimed;
	$("#stacks_in_371_page93 .stacks_in_371_page93dootabcontainer").each(function() {
		stacks_in_371_page93thiscat = $(".stacks_in_371_page93doocat .stacks_in_371_page93tabname", this).text().trim();
		var stacks_in_371_page93thiscatArray = stacks_in_371_page93thiscat.split(',');
		var stacks_in_371_page93doothis = $(this);
		// stacks_in_371_page93thiscatArray now holds this instance of cats and any multi cats in this section
		// next we loop through each pulled cat from this section, each cat is in a var named catname.
		$.each(stacks_in_371_page93thiscatArray, function(index, catname) {
		stacks_in_371_page93catTrimed = catname.trim().replace(/[^a-z0-9]/gi,"");
		$(stacks_in_371_page93doothis).addClass(stacks_in_371_page93catTrimed);

		if($("#" + stacks_in_371_page93catTrimed).length == 0){
		$("#stacks_in_371_page93tabpicker").append('<a href="#" id="'+stacks_in_371_page93catTrimed+'" class="stacks_in_371_page93doofilter">'+catname+'</a> ');
		}
		});
	});


       

   
   $(".stacks_in_371_page93doofilter").click(function(){
        var thisFilter = $(this).attr("id");
        var filterboxheight = $("#stacks_in_371_page93").height();
        $(".stacks_in_371_page93overalltabcontainer").css("min-height",filterboxheight);
        $(".stacks_in_371_page93dootabcontainer").slideUp();
        $("."+ thisFilter).slideDown('slow', function() {
        	 $(".stacks_in_371_page93overalltabcontainer").animate({"min-height":"10px"},"slow");
 		 });
        $("#stacks_in_371_page93tabpicker a").removeClass("stacks_in_371_page93current");
        $(this).addClass("stacks_in_371_page93current");
        return false;
   });
   

   $("#stacks_in_371_page93tabpicker a:first-child").addClass("stacks_in_371_page93current");


});



// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// END DOOBOX TABBY STACK XXXXXXXXXXXXXXXXXXXX
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
	return stack;
})(stacks.stacks_in_371_page93);


// Javascript for stacks_in_387_page93
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Lightbox v2.1.1 by Joe Workman
$(document).ready(function() {
	if ('noncompliant' == 'noncompliant') {
    	var img_height = $('#compliant_stacks_in_387_page93 img').height();
    	var img_width = $('#compliant_stacks_in_387_page93 img').width();
    	var image_src = $("#compliant_stacks_in_387_page93 img").attr("src");

    	$('#compliant_stacks_in_387_page93').height(img_height);
    	$('#compliant_stacks_in_387_page93').width(img_width);
    	$('#compliant_stacks_in_387_page93 a').height(img_height);
    	$("#compliant_stacks_in_387_page93").css({'background-image':'url(' + image_src + ')'});
    	$("#compliant_stacks_in_387_page93 div").remove();
	}
});
// End Lightbox
	return stack;
})(stacks.stacks_in_387_page93);



