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

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

// 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_16_page12 = (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 $fis = jQuery.noConflict();
$fis(window).load(function(){
	$fis('#fadeInStackstacks_in_16_page12').hide().delay(0).fadeIn(2000);
});
	return stack;
})(stacks.stacks_in_16_page12);


// Javascript for stacks_in_21_page12
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/*** danceSwitcher - A unique content switcher with a dazzling effect**** Copyright (C) 2011 by Adrian Sinclair http://forrst.me/adrusi**** This program is free software: you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation, either version 3 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program.  If not, see <http://www.gnu.org/licenses/>.*//* Adapted to Stacks by Mauricio Sabene at RWExtras.com version 2.0 */(function($) {  $.fn.extend({    danceSwitcher: function(options) {      var defaults = {        speed: 1,        collapsedWidth: 230,        collapsedHeight: 80,        collapsedMPB: [10, 10, 10, 10],        collapsedLineHeight: '80px',        activeLineHeight: '48px',        animationSequence: 'prevnext'      },      options = $.extend(defaults, options);      return $(this).each(function() {        var $this = $(this),            speed = options.speed,            first = $(this).children('div').eq(0), // the first child of the switcher, so that it is open by default            i;          $this.css('height', ($this.children('div').length - 1) * (options.collapsedHeight + options.collapsedMPB[0] + options.collapsedMPB[2]) + 'px'); // set the height of the switcher to the appropriate value        first.addClass('active'); // make the first box active        for (i = 1; i < $this.children('div').length; i++) { // position all of the boxes appropriately          $this.children('div').eq(i).css('top', (i - 1) * (options.collapsedHeight + options.collapsedMPB[0] + options.collapsedMPB[2]) + 'px');        }        if (options.animationSequence === 'prevnext') { // using the default animation          $this.children('div').click(function() { // bind a click event to all the boxes            var $$this = $(this);            if (!$$this.hasClass('active') && !$this.hasClass('inprogress')) { // if the box clicked isn't already active and there isn't already animation going on              var next, prev;              $this.addClass('inprogress'); // make sure 2 animations don't happen at once              $this.children('.active').children('.ds_content').animate({ // fade out the content of the active box                opacity: 0              }, 750 / speed);              $this.children('.active').children('h3').animate({ // animate the active header line height                lineHeight: options.collapsedLineHeight              }, 750 / speed);              if ($$this.next(':not(.active)').get(0)) { // if the clicked box isn't last                next = $(this).next();                prev = false;              }              else {                next = $$this.prev();                prev = true;              }              $$this.css({ // convert the height property of the clicked box to the bottom property                bottom: $this.height() - $$this.position().top - (options.collapsedHeight + options.collapsedMPB[0] + options.collapsedMPB[2]),                height: 'auto'              });              $this.children('.active').animate({                top: next.css('top'), // move the active box to the vertical position of its final destination                height: options.collapsedHeight // make its height the height of a collapsed box              }, 750 / speed, function() {                $$this.animate({ // move the clicked box out until it's the same dimensions as the previously active box                  left: 0,                  right: (options.collapsedWidth + options.collapsedMPB[1] + options.collapsedMPB[3])                }, 500 / speed, function() {                  next.animate({ // move the box next to the previously active box (to the right) to the place where the clicked box used to be                    top: $$this.css('top')                  }, 750 / speed, function() {                    $this.children('.active').animate({ // move the previously active box to where the last animated box just was                      left: next.position().left,                      right: 0                    }, 750 / speed, function() {                      $$this.children('h3').animate({ // animate the line height of the clicked box to the height of an active box                        lineHeight: options.activeLineHeight // , paddingBottom: 0                      }, 750 / speed );                      $$this.children('.ds_content').animate({ // and make its content opaque                        opacity: 1                      }, 1500 / speed ); // changed from 750 (MS)                      $$this.animate({ // and give it the dimensions of an active box                        top: 0,                        bottom: 0                      }, 750 / speed, function() {                        if (!prev) {                          $this.children('.active').insertAfter(next); // if the "next" box was the box underneath the now active box, mave its position in the DOM to where it now is visually on the page                        }                        else if (prev) {                          $this.children('.active').insertBefore(next); // same thing but if it was above the now active box                        }                        $this.children('.active').removeClass('active'); // remove the active class from the box that is no longer active                        $$this.addClass('active'); // and add it to the now active box                        $$this.prependTo($$this.parent()); // move the now active box to the top of the switcher DOM tree                        $this.removeClass('inprogress'); // and set the switcher to not animating                      });                    });                  });                });              });            }          });        }        else if (options.animationSequence === 'firstlast'){          $this.children('div').click(function() {            var $$this = $(this), active = $this.children('.active'), last = !$$this.next().get(0), alreadyCalled = false,                callback = function() {                  active.css('bottom', 'auto').animate({                    right: 0,                    left: $this.width() - (options.collapsedWidth + options.collapsedMPB[1] + options.collapsedMPB[3])                  }, 750 / speed, function() {                    $$this.animate({                      top: 0,                      bottom: 0                    }, 750 / speed).children('h3').animate({                      lineHeight: options.activeLineHeight // , paddingBottom: 0                    }, 750 / speed);					$$this.children('.ds_content').animate({                      opacity: 1                    }, 1500 / speed, function() { // changed from 750 (MS)                      if (!last) {                        active.appendTo($this).removeClass('active');					  }                      else {                        active.prependTo($this).removeClass('active');					  }	                      $$this.prependTo($this).addClass('active');                      $this.removeClass('inprogress');                    });                  });                };            if (!$$this.hasClass('active') && !$this.hasClass('inprogress')) {              $this.addClass('inprogress');              active.children('h3').animate({                lineHeight: options.collapsedLineHeight              }, 750 / speed);              active.children('.ds_content').animate({                opacity: 0              });              active.animate({                top: (!last) ? $this.height() - options.collapsedHeight - options.collapsedMPB[0] - options.collapsedMPB[2] : 0,                bottom: (!last) ? 0 : $this.height() - options.collapsedHeight - options.collapsedMPB[0] - options.collapsedMPB[2]              }, 750 / speed, function() {                active.css({                  top: (!last) ? $this.height() - active.height() - options.collapsedMPB[0] - options.collapsedMPB[2] : 0,                  height: active.height()                });                $$this.css({                  bottom: $this.height() - $$this.position().top - (options.collapsedHeight + options.collapsedMPB[0] + options.collapsedMPB[2]),                  height: 'auto'                });                $$this.animate({                  left: 0,                  right: (options.collapsedWidth + options.collapsedMPB[1] + options.collapsedMPB[3])                }, 500 / speed, function() {                  if (!last) {                    $$this.nextAll('div').each(function() {                      var $$$this = $(this);                      $$$this.animate({                        top: $$$this.position().top - (options.collapsedHeight + options.collapsedMPB[0] + options.collapsedMPB[2])                      }, 750 / speed, function() {                        if (!alreadyCalled) callback();                        alreadyCalled = true;                      });                    });                  }                  else {                    $$this.prevAll('div:not(.active)').each(function() {                      var $$$this = $(this);                      $$$this.animate({                        top: $$$this.position().top + (options.collapsedHeight + options.collapsedMPB[0] + options.collapsedMPB[2])                      }, 750 / speed, function() {                        if (!alreadyCalled) callback();                        alreadyCalled = true;                      });                    });                  }                });              });            }          });        }      });    }  });})(jQuery);jQuery(document).ready(function(){jQuery('#switcherstacks_in_21_page12').danceSwitcher({        speed: 4,        collapsedWidth: 182,        collapsedHeight: 83,        collapsedMPB: [9, 9, 9, 9],        collapsedLineHeight: '83px',        activeLineHeight: '48px',        animationSequence: 'firstlast'      });});
	return stack;
})(stacks.stacks_in_21_page12);


// Javascript for stacks_in_39_page12
// ---------------------------------------------------------------------

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

// 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_39_page12 = (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.6.1 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_39_page12);



