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

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

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

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

/*  Totem Ticker Plugin
 *	Copyright (c) 2011 Zach Dunn / www.buildinternet.com
 *	Released under MIT License */
(function(a){if(!a.omr){a.omr=new Object()}a.omr.totemticker=function(c,b){var d=this;d.el=c;d.$el=a(c);d.$el.data("omr.totemticker",d);d.init=function(){d.options=a.extend({},a.omr.totemticker.defaultOptions,b);d.ticker;d.format_ticker();d.setup_nav();d.start_interval()};d.start_interval=function(){clearInterval(d.ticker);if(d.options.direction=="up"){d.ticker=setInterval(function(){d.$el.find("li:last").detach().prependTo(d.$el).css("marginTop","-"+d.options.row_height);d.$el.find("li:first").animate({marginTop:"0px",},d.options.speed,function(){})},d.options.interval)}else{d.ticker=setInterval(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0").appendTo(d.$el)})},d.options.interval)}};d.reset_interval=function(){clearInterval(d.ticker);d.start_interval()};d.stop_interval=function(){clearInterval(d.ticker)};d.format_ticker=function(){if(typeof(d.options.max_items)!="undefined"&&d.options.max_items!=null){var f=d.options.row_height.replace(/px/i,"");var e=f*d.options.max_items;d.$el.css({height:e+"px",overflow:"hidden",})}else{d.$el.css({overflow:"hidden",})}};d.setup_nav=function(){if(typeof(d.options.stop)!="undefined"&&d.options.stop!=null){a(d.options.stop).click(function(){d.stop_interval();return false})}if(typeof(d.options.start)!="undefined"&&d.options.start!=null){a(d.options.start).click(function(){d.start_interval();return false})}if(typeof(d.options.previous)!="undefined"&&d.options.previous!=null){a(d.options.previous).click(function(){d.$el.find("li:last").detach().prependTo(d.$el).css("marginTop","-"+d.options.row_height);d.$el.find("li:first").animate({marginTop:"0px",},d.options.speed,function(){d.reset_interval()});return false})}if(typeof(d.options.next)!="undefined"&&d.options.next!=null){a(d.options.next).click(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0px").appendTo(d.$el);d.reset_interval()});return false})}if(typeof(d.options.mousestop)!="undefined"&&d.options.mousestop===true){d.$el.mouseenter(function(){d.stop_interval()}).mouseleave(function(){d.start_interval()})}};d.debug_info=function(){console.log(d.options)};d.init()};a.omr.totemticker.defaultOptions={message:"Ticker Loaded",next:null,previous:null,stop:null,start:null,row_height:"100px",speed:800,interval:4000,max_items:null,mousestop:false,direction:"down",};a.fn.totemticker=function(b){return this.each(function(){(new a.omr.totemticker(this,b))})}})(jQuery);

jQuery.fn.exists = function(){return jQuery(this).length>0;}

$(document).ready(function() {	
	var bg_color = $('#stacks_in_6_page91').css('background-color');
	if (bg_color) { 
		$('#stacks_in_6_page91').css({'background-color': 'transparent'});	
		$('#totem_stacks_in_6_page91').css({'background-color': bg_color });	
	}
	var bg_border_style = $('#stacks_in_6_page91').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color  = $('#stacks_in_6_page91').css('border-bottom-color');
		var bg_border_top 	 = $('#stacks_in_6_page91').css('border-top-width');
		var bg_border_right  = $('#stacks_in_6_page91').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_6_page91').css('border-bottom-width');
		var bg_border_left 	 = $('#stacks_in_6_page91').css('border-left-width');
		$('#stacks_in_6_page91').css({'border-width':0});	
		$('#stacks_in_6_page91 .totem_wrapper').css({	'border-style':bg_border_style,
							 			'border-color':bg_border_color,
										'border-top-width':bg_border_top,
										'border-right-width':bg_border_right,
										'border-bottom-width':bg_border_bottom,	
										'border-left-width':bg_border_left
		});	
	}
	// Remove the Nav containers if images were not used.
	if (! $('#totem_next_stacks_in_6_page91 img').exists()) {
	    $('#totem_next_stacks_in_6_page91').remove();
	}
	if (! $('#totem_prev_stacks_in_6_page91 img').exists()) {
	    $('#totem_prev_stacks_in_6_page91').remove();
	}
	
	$('#totem_stacks_in_6_page91').totemticker({
		row_height	:	'410px',
		next		:	'#totem_next_stacks_in_6_page91',
		previous	:	'#totem_prev_stacks_in_6_page91',
		stop		:	'#totem_stop',
		start		:	'#totem_start',
		mousestop	:	true,
        speed       :   800,
        interval    :   6000,
        max_items   :   2
	});	
	// Take the bottom borders into effect when calculating the height
	$('#totem_stacks_in_6_page91').height( (2 * 410) + (2 - 1));
});


//-- End Totem Stack --//
	return stack;
})(stacks.stacks_in_6_page91);


// Javascript for stacks_in_59_page91
// ---------------------------------------------------------------------

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

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

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

//-- Vimeo Stack v1.7.0 by Joe Workman --//
var Froogaloop=function(){function g(a){return new g.fn.init(a)}function h(a,b,c){if(!c.contentWindow.postMessage)return!1;var f=c.getAttribute("src").split("?")[0];a=JSON.stringify({method:a,value:b});c.contentWindow.postMessage(a,f)}function i(a){if(a.origin!=playerDomain)return!1;var b=JSON.parse(a.data);a=b.value;var c=b.data,f=f==""?null:b.player_id;b=f?d[f][b.event||b.method]:d[b.event||b.method];var e=[];if(!b)return!1;a!==void 0&&e.push(a);c&&e.push(c);f&&e.push(f);return e.length>0?b.apply(null,
e):b.call()}function j(a,b,c){c?(d[c]||(d[c]={}),d[c][a]=b):d[a]=b}var d={},k=!1;g.fn=g.prototype={playerDomain:"",element:null,init:function(a){typeof a==="string"&&(a=document.getElementById(a));this.element=a;return this},api:function(a,b){if(!this.element||!a)return!1;var c=this.element,f=c.id!=""?c.id:null,e=!b||!b.constructor||!b.call||!b.apply?b:null,d=b&&b.constructor&&b.call&&b.apply?b:null;d&&j(a,d,f);h(a,e,c);return this},addEvent:function(a,b){if(!this.element)return!1;var c=this.element;
j(a,b,c.id!=""?c.id:null);a!="ready"&&h("addEventListener",a,c);if(k)return this;c=c.getAttribute("src").split("/");for(var d="",e=0,g=c.length;e<g;e++){if(e<3)d+=c[e];else break;e<2&&(d+="/")}playerDomain=d;window.addEventListener?window.addEventListener("message",i,!1):window.attachEvent("onmessage",i,!1);k=!0;return this},removeEvent:function(a){if(!this.element)return!1;var b=this.element,c;a:{if((c=b.id!=""?b.id:null)&&d[c]){if(!d[c][a]){c=!1;break a}d[c][a]=null}else{if(!d[a]){c=!1;break a}d[a]=
null}c=!0}a!="ready"&&c&&h("removeEventListener",a,b)}};g.fn.init.prototype=g.fn;return window.Froogaloop=window.$f=g}();
//-- End Vimeo Stack --//

	return stack;
})(stacks.stacks_in_59_page91);


// Javascript for stacks_in_65_page91
// ---------------------------------------------------------------------

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

// 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_65_page91 = (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($) {
	/*
		seyDoggy ZipList
	*/
	// remove empty List titles
	$('#stacks_in_65_page91 .sdZiplistTitle').each(function() {
		if ($(this).html() == '') $(this).remove();
	});
	// remove padding for non numbered/bulleted lists
	$('#stacks_in_65_page91 ul.sdZiplist').each(function() {
		if ($(this).css('list-style-type') == 'none') {
			$(this).css({'margin-left':'0','padding-left':'0'});
		}
	});
	// ALL THE ACTION
	//$('#stacks_in_65_page91 .sdZiplistItemTitle_stacks_in_65_page91:first').siblings().slideDown().end().children('a').removeClass('sdZiplistClick').html('[–]');
	$('#stacks_in_65_page91 .sdZiplistItemTitle_stacks_in_65_page91').each(function() {
		// that variable
		var that = '#stacks_in_65_page91 .sdZiplistItemTitle_stacks_in_65_page91';
		// if [+/-] not used, wrap title in anchor
		if ($(this).children('a').css('display') == 'none') $(this).wrapInner('<a href="#" class="sdZiplistClick"></a>');
		// prevent default click event
		$(this).children('a').css('text-decoration','none').click(function(event) {event.preventDefault()});
		// click function
	    $(this).click(function() {
			if ($(this).children('a').hasClass('sdZiplistShowHide')) {
				if ($(this).children('a').hasClass('sdZiplistClick')) {
					$(that).siblings().slideUp().end().children('a').addClass('sdZiplistClick').html('[+]');
					$(this).siblings().slideDown().end().children('a').removeClass('sdZiplistClick').html('[–]');
				} else {
					$(this).siblings().slideUp().end().children('a').addClass('sdZiplistClick').html('[+]');
				}
			} else {
				if ($(this).children().hasClass('sdZiplistClick')) {
					$(that).siblings().slideUp().end().children('a').addClass('sdZiplistClick');
					$(this).siblings().slideDown().end().children('a').removeClass('sdZiplistClick');
				} else {
					$(this).siblings().slideUp().end().children('a').addClass('sdZiplistClick');
				}
			}
	    });
	});
});
	return stack;
})(stacks.stacks_in_65_page91);


// Javascript for stacks_in_869_page91
// ---------------------------------------------------------------------

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

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

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

//-- Sweet Button Stack v1.5.2 by Joe Workman --//


//-- End Sweet Button Stack --//


	return stack;
})(stacks.stacks_in_869_page91);


// Javascript for stacks_in_63_page91
// ---------------------------------------------------------------------

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

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

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

//-- Sweet Button Stack v1.5.2 by Joe Workman --//


//-- End Sweet Button Stack --//


	return stack;
})(stacks.stacks_in_63_page91);


// Javascript for stacks_in_867_page91
// ---------------------------------------------------------------------

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

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

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

//-- Sweet Button Stack v1.5.2 by Joe Workman --//


//-- End Sweet Button Stack --//


	return stack;
})(stacks.stacks_in_867_page91);


// Javascript for stacks_in_868_page91
// ---------------------------------------------------------------------

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

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

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

//-- Sweet Button Stack v1.5.2 by Joe Workman --//


//-- End Sweet Button Stack --//


	return stack;
})(stacks.stacks_in_868_page91);



