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

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

// 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_1636_page61 = (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_1636_page61thiscat;
      var stacks_in_1636_page61catTrimed;
	$("#stacks_in_1636_page61 .stacks_in_1636_page61dootabcontainer").each(function() {
		stacks_in_1636_page61thiscat = $(".stacks_in_1636_page61doocat .stacks_in_1636_page61tabname", this).text().trim();
		var stacks_in_1636_page61thiscatArray = stacks_in_1636_page61thiscat.split(',');
		var stacks_in_1636_page61doothis = $(this);
		// stacks_in_1636_page61thiscatArray 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_1636_page61thiscatArray, function(index, catname) {
		stacks_in_1636_page61catTrimed = catname.trim().replace(/[^a-z0-9]/gi,"");
		$(stacks_in_1636_page61doothis).addClass(stacks_in_1636_page61catTrimed);

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


       

   
   $(".stacks_in_1636_page61doofilter").click(function(){
        var thisFilter = $(this).attr("id");
        var filterboxheight = $("#stacks_in_1636_page61").height();
        $(".stacks_in_1636_page61overalltabcontainer").css("min-height",filterboxheight);
        $(".stacks_in_1636_page61dootabcontainer").slideUp();
        $("."+ thisFilter).slideDown('slow', function() {
        	 $(".stacks_in_1636_page61overalltabcontainer").animate({"min-height":"10px"},"slow");
 		 });
        $("#stacks_in_1636_page61tabpicker a").removeClass("stacks_in_1636_page61current");
        $(this).addClass("stacks_in_1636_page61current");
        return false;
   });
   

   $("#stacks_in_1636_page61tabpicker a:first-child").addClass("stacks_in_1636_page61current");


});



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


// Javascript for stacks_in_1645_page61
// ---------------------------------------------------------------------

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

// 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_1645_page61 = (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_1645_page61thiscat;
      var stacks_in_1645_page61catTrimed;
	$("#stacks_in_1645_page61 .stacks_in_1645_page61dootabcontainer").each(function() {
		stacks_in_1645_page61thiscat = $(".stacks_in_1645_page61doocat .stacks_in_1645_page61tabname", this).text().trim();
		var stacks_in_1645_page61thiscatArray = stacks_in_1645_page61thiscat.split(',');
		var stacks_in_1645_page61doothis = $(this);
		// stacks_in_1645_page61thiscatArray 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_1645_page61thiscatArray, function(index, catname) {
		stacks_in_1645_page61catTrimed = catname.trim().replace(/[^a-z0-9]/gi,"");
		$(stacks_in_1645_page61doothis).addClass(stacks_in_1645_page61catTrimed);

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


       

   
   $(".stacks_in_1645_page61doofilter").click(function(){
        var thisFilter = $(this).attr("id");
        var filterboxheight = $("#stacks_in_1645_page61").height();
        $(".stacks_in_1645_page61overalltabcontainer").css("min-height",filterboxheight);
        $(".stacks_in_1645_page61dootabcontainer").slideUp();
        $("."+ thisFilter).slideDown('slow', function() {
        	 $(".stacks_in_1645_page61overalltabcontainer").animate({"min-height":"10px"},"slow");
 		 });
        $("#stacks_in_1645_page61tabpicker a").removeClass("stacks_in_1645_page61current");
        $(this).addClass("stacks_in_1645_page61current");
        return false;
   });
   

   $("#stacks_in_1645_page61tabpicker a:first-child").addClass("stacks_in_1645_page61current");


});



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


// Javascript for stacks_in_1678_page61
// ---------------------------------------------------------------------

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

// 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_1678_page61 = (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($) {
    var opt;

    $.fn.jqprint = function (options) {
        opt = $.extend({}, $.fn.jqprint.defaults, options);

        var $element = (this instanceof jQuery) ? this : $(this);
        
        if (opt.operaSupport && $.browser.opera) 
        { 
            var tab = window.open("","jqPrint-preview");
            tab.document.open();

            var doc = tab.document;
        }
        else 
        {
            var $iframe = $("<iframe  />");
        
            if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }

            $iframe.appendTo("body");
            var doc = $iframe[0].contentWindow.document;
        }
        
        if (opt.importCSS)
        {
            if ($("link[media=print]").length > 0) 
            {
                $("link[media=print]").each( function() {
                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
                });
            }
            else 
            {
                $("link").each( function() {
                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
                });
            }
        }
        if (opt.printContainer) { doc.write($element.outer()); }
        else { $element.each( function() { doc.write($(this).html()); }); }

        doc.close();


        
        (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
        setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
    }
    
    $.fn.jqprint.defaults = {
		debug: false,
		importCSS: true, 
		printContainer: true,
		operaSupport: true
	};
    

    // Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
    jQuery.fn.outer = function() {
      return $($('<div></div>').html(this.clone())).html();
    } 
})(jQuery);


// start call


            $(function() {
                
                $("#stacks_in_1678_page61 #stacks_in_1678_page61printbtn").click( function() {
                 $("#stacks_in_1678_page61printbtn").hide();
                 $("#stacks_in_1678_page61 #tick_container").hide();

                    $('#stacks_in_1678_page61printablestack').jqprint();
                    return false;
                });
                
                $("#stacks_in_1678_page61 #stacks_in_1678_page61printbtn").click( function() {
                $("#stacks_in_1678_page61printbtn").show();
                $("#stacks_in_1678_page61printbtn").css("cursor","default");
                $("#stacks_in_1678_page61 #tick_container").css("visibility","visible");
                $("#stacks_in_1678_page61 #tick_container").show();
                });

            });

                




	return stack;
})(stacks.stacks_in_1678_page61);



