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

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

// 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_589_page6 = (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_589_page6 #stacks_in_589_page6printbtn").click( function() {
                 $("#stacks_in_589_page6printbtn").hide();
                 $("#stacks_in_589_page6 #tick_container").hide();

                    $('#stacks_in_589_page6printablestack').jqprint();
                    return false;
                });
                
                $("#stacks_in_589_page6 #stacks_in_589_page6printbtn").click( function() {
                $("#stacks_in_589_page6printbtn").show();
                $("#stacks_in_589_page6printbtn").css("cursor","default");
                $("#stacks_in_589_page6 #tick_container").css("visibility","visible");
                $("#stacks_in_589_page6 #tick_container").show();
                });

            });

                




	return stack;
})(stacks.stacks_in_589_page6);


// Javascript for stacks_in_159_page6
// ---------------------------------------------------------------------

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

// 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_159_page6 = (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($) {
	/* SdCoMa (0.0.5) */var SdCoMa = function (rgb, factor, alpha, shade) { var factor = factor * 10; if (rgb.search('rgb') == -1) { var rgb = /^#?([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i.exec(rgb).slice(1); for (var i=0; i < rgb.length; i++) rgb[i] = parseInt(rgb[i], 16), rgbOrig = rgb[i]; } else { var rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/); rgb.splice(0,1); for (var i=0; i < rgb.length; i++) rgb[i] = parseInt(rgb[i]), rgbOrig = rgb[i]; } for (var i=0; i < rgb.length; i++) { if (shade == 1 || shade == 'light' || shade == true) rgb[i] = Math.floor(rgb[i] + factor); else if (shade == 0 || shade == 'dark' || shade == false) rgb[i] = Math.floor(rgb[i] - factor); }; if (rgb[0] <= 100 || rgb[1] <= 100 || rgb[2] <= 100) for (var i=0; i < rgb.length; i++) rgbOrig = rgb[i], rgb[i] = rgbOrig + (factor * 4); else if (rgb[0] >= 255 || rgb[1] >= 255 || rgb[2] >= 255) for (var i=0; i < rgb.length; i++) rgbOrig = rgb[i], rgb[i] = rgbOrig - (factor * 4); var isRGBA = (function() { if (! ('result' in arguments.callee)) { var scriptElement = document.getElementsByTagName('script')[0]; var prevColor = scriptElement.style.color; var testColor = 'rgba(0, 0, 0, 0.5)'; if (prevColor == testColor) { arguments.callee.result = true; } else { try { scriptElement.style.color = testColor; } catch(e) {} arguments.callee.result = scriptElement.style.color != prevColor; scriptElement.style.color = prevColor; } } return arguments.callee.result; })(); var RGBA = new Array(); if ( isRGBA != true) { RGBA[0] = 'rgb('; RGBA[1] = ''; } else { RGBA[0] = 'rgba('; RGBA[1] = ', '+alpha; } var rgbNew = RGBA[0]+rgb[0]+', '+rgb[1]+', '+rgb[2]+RGBA[1]+')'; return rgbNew; };
	
	/*
		# seyDoggy ZipBar #
	*/
	
	// VARIABLES
	var bgRGBOrig = $('#stacks_in_159_page6 .sdZipbar').css('background-color');/* background original rgb */
	var bgHover = SdCoMa(bgRGBOrig, 1.5, 1, 'light');/* background hover */
	var linkOrig = SdCoMa(bgRGBOrig, 4.0, 1, 'light');/* link original */
	var linkHover = SdCoMa(bgRGBOrig, 8.5, 0.5, 'light');/* link hover */
	var brdAll = SdCoMa(bgRGBOrig, 1.1, 1, 'light');/* border all */
	var brdLeft = SdCoMa(bgRGBOrig, 1.6, 0.8, 'dark');/* border left */
	var brdRight = SdCoMa(bgRGBOrig, 1.6, 0.5, 'light');/* border right */
		
	// GENERAL SETTINGS
	$('#stacks_in_159_page6 .sdZipbarWrapper').width($('#stacks_in_159_page6 .sdZipbar').outerWidth(true) + 1);/* set width of navbar to allow centering */
	$('#stacks_in_159_page6 .sdZipbar').css('border-color',brdAll)/* adjust border color to suit bg */
	$('#stacks_in_159_page6 .sdZipbarItemTitle').css('color',linkOrig);/* adjust color to suit bg */
	$('#stacks_in_159_page6 .sdZipbarItemTitle:first').css('border-left-style','none').addClass('sdRadiusLeft');/* add radius to first tab */
	$('#stacks_in_159_page6 .sdZipbarItemTitle:last').css('border-right-style','none').addClass('sdRadiusRight');/* add radius to last tab */
	
	// ALL THE ACTION
	// append first tab on page load
	$('#stacks_in_159_page6 div[rel="sdZipbarShow_0"]').show();
	$('#stacks_in_159_page6 .sdZipbarItem:first .sdZipbarItemTitle').addClass('sdZipbarActive').css({
		'background-color':bgHover,
		'color':linkHover
	});
	$('#stacks_in_159_page6 .sdZipbarItemTitle').each(function() {
		// that variable
		var that = '#stacks_in_159_page6 .sdZipbarItemTitle';
		// there variable
		var there = '#stacks_in_159_page6 .sdZipbarContent';
		// thereHeight variable
		var thereHeight = $(there).height();
		// thisThere variable
		var thisThere = $(this).attr('rel');
		thisThere = $('#stacks_in_159_page6 div[rel="' + thisThere + '"]')
		// function for border math between buttons
		$(this).css({'border-left-color':brdLeft,'border-right-color':brdRight});
		// move functions
		$(this).siblings().insertAfter($('#stacks_in_159_page6 .sdZipbarWrapper'));
		// click functions
		$(this).click(function() {
			if (!$(this).hasClass('sdZipbarActive')) {
				$(that).removeClass('sdZipbarActive').css({'background-color':bgRGBOrig,'color':linkOrig});
				$(there).slideUp(250);
				$(this).addClass('sdZipbarActive').css({'background-color':bgHover,'color':linkHover});
				$(thisThere).slideDown(500);
			}
		});
		// hover functions
		$(this).hover(function(){
			$(this).css({
				'background-color':bgHover,
				'color':linkHover
			});
		},function(){
			if (!$(this).hasClass('sdZipbarActive')) {
				$(this).css({
					'background-color':bgRGBOrig,
					'color':linkOrig
				});				
			}
		});
	});
	/* END seyDoggy ZipBar */
});
	return stack;
})(stacks.stacks_in_159_page6);


// Javascript for stacks_in_164_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//-- Power Grid Column Stack v1.1.0 by Joe Workman --//
$(document).ready(function(){
	// $("#stacks_in_164_page6 .rows_table tbody tr").mouseover(function(){$(this).addClass("rows_hover");}).mouseout(function(){$(this).removeClass("rows_hover");});
	$("#stacks_in_164_page6 .rows_table tbody tr:even").addClass("rows_even");
	$("#stacks_in_164_page6 .rows_table tbody tr:odd").addClass("rows_odd");
});
//-- End Power Grid Stack --//
	return stack;
})(stacks.stacks_in_164_page6);


// Javascript for stacks_in_420_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// imagelist Stack by http://www.doobox.co.uk
// Copyright@2010 Mr JG Simpson, trading as Doobox.
// all rights reserved.



$(document).ready(function() {


if("no" == "yes"){
var thefirstsource = $( "#stacks_in_420_page6:first-child img" ).attr("src");
$( "#stacks_in_420_page6 .listIcon .centered_image" ).each(function(){
$(this).html('<img width="128" height="128" src="' + thefirstsource + '" />');
});
}

else{

$("#stacks_in_420_page6 .listIcon").each(function(){
if(!$(this).find("img").attr("src")){
$(this).html('<img width="128" height="128" src="files/imagelistimages/tick.png" />');
}
});

}

$( "#stacks_in_420_page6 li" ).css("list-style-type", "none");
});

	return stack;
})(stacks.stacks_in_420_page6);


// Javascript for stacks_in_422_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/* Flex EZ Button Stack by RWExtras */
/* Copyright (C) 2011 by RWExtras (http://rwextras.com) */
jQuery(document).ready(function() {
if(jQuery('.ezbutton_stacks_in_422_page6 .ez_middle a').length == 0 ){jQuery('.ezbutton_stacks_in_422_page6 .ez_middle').html('<a href="#">Add link...</a>')};
var $shift = ('round' == 'square')?22:0;
var $left = -$shift;
var $right = -$shift - 10;
var $bg_top = - (7 -1)*76;
var $hov_top = - (4 -1)*76;
var $bg_topm = $bg_top - 38;
var $hov_topm = $hov_top - 38;
var $button = jQuery('.ezbutton_stacks_in_422_page6 a');
var $leftside = jQuery('.ezbutton_stacks_in_422_page6 .ez_left a');
var $rightside = jQuery('.ezbutton_stacks_in_422_page6 .ez_right a');
var $mainbutton = jQuery('.ezbutton_stacks_in_422_page6 .ez_middle a');
var $destination = $mainbutton.attr('href');
var $target = $mainbutton.attr('rel');
var $ezclass = $mainbutton.attr('class');
var $ezid = $mainbutton.attr('id');
var $title = $mainbutton.attr('title');
var $palette1 = 'bgsprite3.png';
var $palette2 = 'bgsprite1.png';
$button.css({'background':'url(files/ez_sprites/'+ $palette1 +') no-repeat'});
$leftside.attr({'href':$destination,'rel':$target,'class':$ezclass,'title':$title,'id':$ezid});
$rightside.attr({'href':$destination,'rel':$target,'class':$ezclass,'title':$title,'id':$ezid});
$mainbutton.css({'width':250-20+'px'});
$leftside.css({'background-position': $left +'px ' + $bg_top + 'px'});
$mainbutton.css({'background-position': '0px ' + $bg_topm +'px', 'color':'#FFFFFF', 'text-shadow':'none', 'background-repeat':'repeat-x'});
$rightside.css({'background-position': $right +'px ' + $bg_top + 'px'});
jQuery('.ezbutton_stacks_in_422_page6').hover(function(){
$button.css({'background':'url(files/ez_sprites/'+ $palette2 +') no-repeat'});
$leftside.css({'background-position': $left +'px ' + $hov_top +'px'});
$mainbutton.css({'background-position': '0px ' + $hov_topm +'px','color':'#000000','text-shadow':'none', 'background-repeat':'repeat-x'});
$rightside.css({'background-position': $right +'px ' + $hov_top + 'px'});
},function(){
$button.css({'background':'url(files/ez_sprites/'+ $palette1 +') no-repeat'});
$leftside.css({'background-position': $left +'px '+ $bg_top +'px'});
$mainbutton.css({'background-position': '0px ' + $bg_topm +'px', 'color':'#FFFFFF', 'text-shadow':'none', 'background-repeat':'repeat-x'});
$rightside.css({'background-position': $right +'px '+ $bg_top +'px'});
});
});
/* End of Flex EZ Button Stack */
	return stack;
})(stacks.stacks_in_422_page6);


// Javascript for stacks_in_439_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// imagelist Stack by http://www.doobox.co.uk
// Copyright@2010 Mr JG Simpson, trading as Doobox.
// all rights reserved.



$(document).ready(function() {


if("no" == "yes"){
var thefirstsource = $( "#stacks_in_439_page6:first-child img" ).attr("src");
$( "#stacks_in_439_page6 .listIcon .centered_image" ).each(function(){
$(this).html('<img width="128" height="128" src="' + thefirstsource + '" />');
});
}

else{

$("#stacks_in_439_page6 .listIcon").each(function(){
if(!$(this).find("img").attr("src")){
$(this).html('<img width="128" height="128" src="files/imagelistimages/tick.png" />');
}
});

}

$( "#stacks_in_439_page6 li" ).css("list-style-type", "none");
});

	return stack;
})(stacks.stacks_in_439_page6);


// Javascript for stacks_in_472_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_472_page6').show();
	
	//Hide the caption container on load
	//$ic('#imageCaptionBoxstacks_in_472_page6').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_472_page6').css('opacity', '0.75');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_472_page6 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_472_page6').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_472_page6');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	//$ic('#imageCaptionstacks_in_472_page6').hover(  
		//function () {  
		//show caption on hover  
		//$ic('#imageCaptionBoxstacks_in_472_page6', this).fadeIn(800);
		//},   
		//function () {  
		//hide caption again 
		//$ic('#imageCaptionBoxstacks_in_472_page6', this).fadeOut(300);          
		//}  
	//);  
});
	return stack;
})(stacks.stacks_in_472_page6);


// Javascript for stacks_in_478_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_478_page6').show();
	
	//Hide the caption container on load
	//$ic('#imageCaptionBoxstacks_in_478_page6').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_478_page6').css('opacity', '0.75');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_478_page6 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_478_page6').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_478_page6');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	//$ic('#imageCaptionstacks_in_478_page6').hover(  
		//function () {  
		//show caption on hover  
		//$ic('#imageCaptionBoxstacks_in_478_page6', this).fadeIn(800);
		//},   
		//function () {  
		//hide caption again 
		//$ic('#imageCaptionBoxstacks_in_478_page6', this).fadeOut(300);          
		//}  
	//);  
});
	return stack;
})(stacks.stacks_in_478_page6);


// Javascript for stacks_in_507_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_507_page6').show();
	
	//Hide the caption container on load
	//$ic('#imageCaptionBoxstacks_in_507_page6').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_507_page6').css('opacity', '0.93');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_507_page6 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_507_page6').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_507_page6');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	//$ic('#imageCaptionstacks_in_507_page6').hover(  
		//function () {  
		//show caption on hover  
		//$ic('#imageCaptionBoxstacks_in_507_page6', this).fadeIn(800);
		//},   
		//function () {  
		//hide caption again 
		//$ic('#imageCaptionBoxstacks_in_507_page6', this).fadeOut(300);          
		//}  
	//);  
});
	return stack;
})(stacks.stacks_in_507_page6);


// Javascript for stacks_in_513_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
var $ic = jQuery.noConflict();
$ic(document).ready(function () {
	
	//Show the caption container permanently if required
	$ic('#imageCaptionBoxstacks_in_513_page6').show();
	
	//Hide the caption container on load
	//$ic('#imageCaptionBoxstacks_in_513_page6').hide();
	
	//Make caption background transparent using jQuery
	$ic('#imageCaptionBoxstacks_in_513_page6').css('opacity', '0.75');
	
	//Fetches the image width to calculate caption width 
	var captionWidth = $ic('#imageCaptionstacks_in_513_page6 img').width();
	
	//Set width of caption to match image width  
	$ic('#imageCaptionBoxstacks_in_513_page6').css({'width':captionWidth});
	
	//Centers the caption horizontally, based on image size
	var captionCenter = $('#imageCaptionBoxstacks_in_513_page6');
	captionCenter.css({'z-index' : '999', position: 'absolute', left: '50%','margin-left': 0 - (captionCenter.width() / 2)
	});
	   
	//$ic('#imageCaptionstacks_in_513_page6').hover(  
		//function () {  
		//show caption on hover  
		//$ic('#imageCaptionBoxstacks_in_513_page6', this).fadeIn(800);
		//},   
		//function () {  
		//hide caption again 
		//$ic('#imageCaptionBoxstacks_in_513_page6', this).fadeOut(300);          
		//}  
	//);  
});
	return stack;
})(stacks.stacks_in_513_page6);


// Javascript for stacks_in_559_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//-- Gyro Stack v1.2 by Joe Workman --//

$(document).ready(function() {

	// Create the ribbon HTML
	createPager = function(){	
        $("#stacks_in_559_page6 .gyro_image_reel img").each(function(index) {
            $('<a href="#" rel="' + (index+1) + '">' + (index+1) + '</a>').appendTo('#stacks_in_559_page6 div.gyro_ribbon_middle');
        });
		// Need to swap the bragrounds when the ribbon is on the left
		if ('right' == 'left') {
			$('#stacks_in_559_page6 .gyro_ribbon_start').css("background", "url('rw_common/plugins/stacks/images/ribbon9/gyro_ribbon_right_end_9.png') no-repeat");
			$('#stacks_in_559_page6 .gyro_ribbon_end').css("background", "url('rw_common/plugins/stacks/images/ribbon9/gyro_ribbon_right_start_9.png') no-repeat");			
		}
		// This is to set some CSS styles for ribbons that don't  fit into the defaults set in the CSS file
		/* if ('9' == 2 || '9' == 3 || '9' == 4) {
			$('#stacks_in_559_page6 .gyro_ribbon').css("right", "-13px");
		}
		if ('9' == 5 || '9' == 6) {
			$('#stacks_in_559_page6 .gyro_ribbon_end').css("width", "32px");
		} */
	}; 
	createPager(); //Run function on launch

	//Set Default State of each portfolio piece
	 $("#stacks_in_559_page6 .gyro_ribbon").show();
	$("#stacks_in_559_page6 .gyro_ribbon a:first").addClass("active");

	//Get size of images, how many there are, then determin the size of the image reel.
	var imageHeight = $("#stacks_in_559_page6 .gyro_image_reel img:first").height();
	var imageWidth = $("#stacks_in_559_page6 .gyro_image_reel img:first").width();
	var imageSum = $("#stacks_in_559_page6 .gyro_image_reel img").size();
	var imageReelWidth = imageWidth * imageSum;
	
	//Adjust the image reel to its new size
	$("#stacks_in_559_page6 .gyro_container").css({'width' : imageWidth});
	$("#stacks_in_559_page6 .gyro_window").css({'width' : imageWidth});
	$("#stacks_in_559_page6 .gyro_window").css({'height' : imageHeight});
	$("#stacks_in_559_page6 .gyro_image_reel").css({'width' : imageReelWidth});
			
	//ribbon + Slider Function
	rotate = function(){	
		var triggerID = $active.attr("rel") - 1; //Get number of times to slide
		var image_reelPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide

		$("#stacks_in_559_page6 .gyro_ribbon a").removeClass('active'); //Remove all active class
		$active.addClass('active'); //Add active class (the $active is declared in the rotateSwitch function)
		
		//Slider Animation
		$("#stacks_in_559_page6 .gyro_image_reel").animate({ 
			left: -image_reelPosition
		}, 1000 );		
	}; 
	
	var play;
	//Rotation + Timing Event
	rotateSwitch = function(){		
		play = setInterval(function(){ //Set timer - this will repeat itself every 3 seconds
			$active = $('#stacks_in_559_page6 .gyro_ribbon a.active').next();
			if ( $active.length === 0) { //If ribbon reaches the end...
				$active = $('#stacks_in_559_page6 .gyro_ribbon a:first'); //go back to first
			}
			rotate(); //Trigger the ribbon and slider function
		}, 5000); //Timer speed in milliseconds
	};
	rotateSwitch(); //Run function on launch
	
	//On Hover
	$("#stacks_in_559_page6 .gyro_image_reel a").hover(function() {
		clearInterval(play); //Stop the rotation
	}, function() {
		rotateSwitch(); //Resume rotation
	});	

	//On Click
	$("#stacks_in_559_page6 .gyro_ribbon a").click(function() {	
		$active = $(this); //Activate the clicked ribbon
		//Reset Timer
		clearInterval(play); //Stop the rotation
		rotate(); //Trigger rotation immediately
		if (false) {
			clearInterval(play); //Stop the rotation
		}
		else {
			rotateSwitch(); // Resume rotation
		}
		return false; //Prevent browser jump to link anchor
	});	
});

//-- End Gyro Stack --//
	return stack;
})(stacks.stacks_in_559_page6);


// Javascript for stacks_in_332_page6
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/* SymfoniP.com (c) 2010 - Slidey Note Stack Code V1.0 03-Nov-2010
 * modified and derived from SlideNote - A jQuery Plugin for flexible, customizable sliding notifications.
 * Copyright 2010 Tom McFarlin, http://tommcfarlin.com Released under the MIT License
*/
(function(g){var e=0;g.fn.slideNote=function(h){e+=this.length;var i={where:640,corner:"right",url:null,container:"",closeImage:null,_bIsClosed:false};if(h){i=g.extend(i,h)}return this.each(function(){g(this).addClass("symNote"+i.corner);var k=f(this,i);var j=g.browser.msie===true?window:document;if(g(document).height()<=g(window).height()){k.trigger("slideIn")}g(j).scroll(function(){if(g(this).scrollTop()===0){i.bIsClosed=false}if(g(this).scrollTop()>i.where){if(!k.is(":visible")&&!i.bIsClosed){k.trigger("slideIn")}}else{if(g(this).scrollTop()<i.where&&k.queue("fx")[0]!=="inprogress"){if(k.is(":visible")){k.trigger("slideOut")}}}})})};function f(i,h){g(i).toggle().css(h.corner,-1*g(i).outerWidth()).css({position:"fixed",bottom:0}).bind("slideIn",function(j){c(j,i,h)}).bind("slideOut",function(j){d(j,i,h)});b(i,h);a(i,h);return g(i)}function c(h,k,i){var j=i.corner==="right"?{right:0}:{left:0};g(k).show().animate(j,1000,"swing")}function d(h,k,i){var j=i.corner==="right"?{right:-1*g(k).outerWidth()}:{left:-1*g(k).outerWidth()};g(k).animate(j,1000,"swing",function(){if(e===1){g(k).stop(true).hide()}else{g(k).hide()}});if(i.closeImage!==null&&h.target.id===g(k).attr("id")+"_close"){i.bIsClosed=true}}function b(j,i){if(i.url!==null){if(i.container.length!==0&&i.container.indexOf("#")===-1){i.container="#"+i.container}var h=i.container.length===0?i.url:i.url+" "+i.container;g(j).load(h,function(){if(i.closeImage!==null){a(j,i)}})}}function a(j,i){if(i.closeImage!==null){var h=document.createElement("img");g(h).attr("src",i.closeImage).attr("class","close").attr("alt","close").attr("id",g(j).attr("id")+"_close").hover(function(){g(this).css("cursor","pointer")}).click(function(k){k.stopPropagation();g(this).trigger("slideOut")});g(j).prepend(h)}}})(jQuery);
/* Make the Slidey Note go - SymfoniP.com */
jQuery(document).ready(function($) {
	$('#symSlideyNote_stacks_in_332_page6').slideNote({where: 50, closeImage: 'files/slideynote/slidenote.close.png', corner: 'right'});
});


	return stack;
})(stacks.stacks_in_332_page6);



