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

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

// 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_3813_page47 = (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_3813_page47thiscat;
      var stacks_in_3813_page47catTrimed;
	$("#stacks_in_3813_page47 .stacks_in_3813_page47dootabcontainer").each(function() {
		stacks_in_3813_page47thiscat = $(".stacks_in_3813_page47doocat .stacks_in_3813_page47tabname", this).text().trim();
		var stacks_in_3813_page47thiscatArray = stacks_in_3813_page47thiscat.split(',') 
		var stacks_in_3813_page47doothis = $(this);
		
		$.each(stacks_in_3813_page47thiscatArray, function(index, catname) {
		stacks_in_3813_page47catTrimed = catname.replace(/[^a-z0-9]/gi,"");
		$(stacks_in_3813_page47doothis).addClass(stacks_in_3813_page47catTrimed);
		var stacks_in_3813_page47isCatFound = $("#stacks_in_3813_page47tabpicker").html().search(catname);
		if(stacks_in_3813_page47isCatFound == -1){
		$("#stacks_in_3813_page47tabpicker").append('<a href="#" id="'+stacks_in_3813_page47catTrimed+'" class="stacks_in_3813_page47doofilter">'+catname+'</a> ');
		}
		});
	});


       

   
   $(".stacks_in_3813_page47doofilter").click(function(){
        var thisFilter = $(this).attr("id");
        var filterboxheight = $("#stacks_in_3813_page47").height();
        $(".stacks_in_3813_page47overalltabcontainer").css("min-height",filterboxheight);
        $(".stacks_in_3813_page47dootabcontainer").slideUp();
        $("."+ thisFilter).slideDown('slow', function() {
        	 $(".stacks_in_3813_page47overalltabcontainer").animate({"min-height":"10px"},"slow");
 		 });
        $("#stacks_in_3813_page47tabpicker a").removeClass("stacks_in_3813_page47current");
        $(this).addClass("stacks_in_3813_page47current");
        return false;
   });
   

   $("#stacks_in_3813_page47tabpicker a:first-child").addClass("stacks_in_3813_page47current");


});



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



