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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/*
* Slides, A Slideshow Plugin for jQuery
* Intructions: http://slidesjs.com
* By: Nathan Searles, http://nathansearles.com
* Version: 1.1.8
* Updated: June 1st, 2011
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(A){A.fn.slides=function(B){B=A.extend({},A.fn.slides.option,B);return this.each(function(){A("."+B.container,A(this)).children().wrapAll('<div class="slides_control"/>');var V=A(this),J=A(".slides_control",V),Z=J.children().size(),Q=J.children().outerWidth(),M=J.children().outerHeight(),D=B.start-1,L=B.effect.indexOf(",")<0?B.effect:B.effect.replace(" ","").split(",")[0],S=B.effect.indexOf(",")<0?L:B.effect.replace(" ","").split(",")[1],O=0,N=0,C=0,P=0,U,H,I,X,W,T,K,F;function E(c,b,a){if(!H&&U){H=true;B.animationStart(P+1);switch(c){case"next":N=P;O=P+1;O=Z===O?0:O;X=Q*2;c=-Q*2;P=O;break;case"prev":N=P;O=P-1;O=O===-1?Z-1:O;X=0;c=0;P=O;break;case"pagination":O=parseInt(a,10);N=A("."+B.paginationClass+" li."+B.currentClass+" a",V).attr("href").match("[^#/]+$");if(O>N){X=Q*2;c=-Q*2;}else{X=0;c=0;}P=O;break;}if(b==="fade"){if(B.crossfade){J.children(":eq("+O+")",V).css({zIndex:10}).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;});}else{J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;}});}else{J.children(":eq("+N+")",V).fadeOut(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing);});}else{J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(A.browser.msie){A(this).get(0).style.removeAttribute("filter");}});}B.animationComplete(O+1);H=false;});}}else{J.children(":eq("+O+")").css({left:X,display:"block"});if(B.autoHeight){J.animate({left:c,height:J.children(":eq("+O+")").outerHeight()},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}else{J.animate({left:c},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}}if(B.pagination){A("."+B.paginationClass+" li."+B.currentClass,V).removeClass(B.currentClass);A("."+B.paginationClass+" li:eq("+O+")",V).addClass(B.currentClass);}}}function R(){clearInterval(V.data("interval"));}function G(){if(B.pause){clearTimeout(V.data("pause"));clearInterval(V.data("interval"));K=setTimeout(function(){clearTimeout(V.data("pause"));F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);},B.pause);V.data("pause",K);}else{R();}}if(Z<2){return ;}if(D<0){D=0;}if(D>Z){D=Z-1;}if(B.start){P=D;}if(B.randomize){J.randomize();}A("."+B.container,V).css({overflow:"hidden",position:"relative"});J.children().css({position:"absolute",top:0,left:J.children().outerWidth(),zIndex:0,display:"none"});J.css({position:"relative",width:(Q*3),height:M,left:-Q});A("."+B.container,V).css({display:"block"});if(B.autoHeight){J.children().css({height:"auto"});J.animate({height:J.children(":eq("+D+")").outerHeight()},B.autoHeightSpeed);}if(B.preload&&J.find("img:eq("+D+")").length){A("."+B.container,V).css({background:"url("+B.preloadImage+") no-repeat 50% 50%"});var Y=J.find("img:eq("+D+")").attr("src")+"?"+(new Date()).getTime();if(A("img",V).parent().attr("class")!="slides_control"){T=J.children(":eq(0)")[0].tagName.toLowerCase();}else{T=J.find("img:eq("+D+")");}J.find("img:eq("+D+")").attr("src",Y).load(function(){J.find(T+":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){A(this).css({zIndex:5});A("."+B.container,V).css({background:""});U=true;B.slidesLoaded();});});}else{J.children(":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){U=true;B.slidesLoaded();});}if(B.bigTarget){J.children().css({cursor:"pointer"});J.children().click(function(){E("next",L);return false;});}if(B.hoverPause&&B.play){J.bind("mouseover",function(){R();});J.bind("mouseleave",function(){G();});}if(B.generateNextPrev){A("."+B.container,V).after('<a href="#" class="'+B.prev+'">Prev</a>');A("."+B.prev,V).after('<a href="#" class="'+B.next+'">Next</a>');}A("."+B.next,V).click(function(a){a.preventDefault();if(B.play){G();}E("next",L);});A("."+B.prev,V).click(function(a){a.preventDefault();if(B.play){G();}E("prev",L);});if(B.generatePagination){if(B.prependPagination){V.prepend("<ul class="+B.paginationClass+"></ul>");}else{V.append("<ul class="+B.paginationClass+"></ul>");}J.children().each(function(){A("."+B.paginationClass,V).append('<li><a href="#'+C+'">'+(C+1)+"</a></li>");C++;});}else{A("."+B.paginationClass+" li a",V).each(function(){A(this).attr("href","#"+C);C++;});}A("."+B.paginationClass+" li:eq("+D+")",V).addClass(B.currentClass);A("."+B.paginationClass+" li a",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$");if(P!=I){E("pagination",S,I);}return false;});A("a.link",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$")-1;if(P!=I){E("pagination",S,I);}return false;});if(B.play){F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);}});};A.fn.slides.option={preload:false,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:false,next:"next",prev:"prev",pagination:true,generatePagination:true,prependPagination:false,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:false,randomize:false,play:0,pause:0,hoverPause:false,autoHeight:false,autoHeightSpeed:350,bigTarget:false,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}};A.fn.randomize=function(C){function B(){return(Math.round(Math.random())-0.5);}return(A(this).each(function(){var F=A(this);var E=F.children();var D=E.length;if(D>1){E.hide();var G=[];for(i=0;i<D;i++){G[G.length]=i;}G=G.sort(B);A.each(G,function(I,H){var K=E.eq(H);var J=K.clone(true);J.show().appendTo(F);if(C!==undefined){C(K,J);}K.remove();});}}));};})(jQuery);

/* get it going - SymfoniP.com FreeStacks Slider Startup CopyRight 2011 - SymfoniP
 * 30-Jun-2011  - Version 1.0.3 New slides code
 * 27-May-2011  - Version 1.0.2 IE fix again for V9
*/
(function(a){a.fn.symImages=function(c){var d={width:960,height:200,dest:".slides_container"};a.extend(d,c);var b=a(d.dest);a("#pageheader .stacks_out").css("zIndex","150");return this.each(function(){var f;if(a.browser.msie && a.browser.version < 9){f=a(this).html().split(" ")}else{f=a(this).html().split("\n")}for(var e in f){if(f[e]==""){continue}b.append('<img src="'+f[e]+'" alt="" border="0" />')}})}})(jQuery);jQuery(document).ready(function(d){d("#slideHolder").symImages({dest:"#slidey .slides_container"});var e=d("#slidey");var c=d("#pageheader");e.prependTo(c);var b=c.width();var a=c.height();c.css({position:"relative",overflow:"hidden"});d("#slidey").css("position","absolute");d(".slides_container").css("width",b);d("#slidey").slides({preload:true,preloadImage:'files/symfreestackslide/loading.gif',play:3000,pause:1600,fadeSpeed: 700,crossfade:true,effect:"fade",generatePagination:false,hoverPause:true})});


	return stack;
})(stacks.stacks_in_1467_page0);


// Javascript for stacks_in_1470_page0
// ---------------------------------------------------------------------

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

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

jQuery(document).ready(function($){
	$('#nav ul li').hover(
		function(){
			$('ul:first',this).show();
		},
		function(){
			$('ul:first',this).hide();
		}
	);
});
	return stack;
})(stacks.stacks_in_1470_page0);


// Javascript for stacks_in_1505_page0
// ---------------------------------------------------------------------

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

// 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_1505_page0 = (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 SimpleBox /sympleBox /symBox Core Helper Scripts for RapidWeaver Stacks
 * SimpleBox /sympleBox is copyright (c) 2010 by Ronan Cashell and Kevin Burns - SymfoniP.com
 * Version 1.1
 * Also with with integrated Cookie jQuery plugin Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * jQuery Cookie Plugin Dual licensed under the MIT and GPL licenses:
 */
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires="; expires="+date.toUTCString()}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};(function($){$.fn.extend({sympleBox:function(options){var defaults={width:"",height:"",auto:null,opacity:0.8,cookie:null};var currentPop;var autoPop=false;if(typeof options=="object"){$.extend(defaults,options)}$("a.close, #symboxfade").live("click",function(){$("#symboxfade , .popup_block").fadeOut(function(){$("#symboxfade, a.close, #symClone").remove()});return false});$(document).keydown(function(e){if(e.which==27){$("a.close").click()}});return this.each(function(){var defaultOpts=new Object();$.extend(defaultOpts,defaults);var popID=$(this).attr("rel");var popHref=$(this).attr("href");var query="";if(popHref.length>2&&popHref.substr(1,1)=="?"){query=popHref.split("?")}var $this=$(this);$("#"+popID).addClass("sympleBoxPopup");if(query.length>1){var popOpts=query[1].split("&");for(key in popOpts){var opt=popOpts[key].split("=");switch(opt[0]){case"w":defaultOpts.width=opt[1];break;case"h":defaultOpts.height=opt[1];break;case"a":if($.cookie("symBoxPop")!="1"){if(!isNaN(opt[1])){defaultOpts.auto=Number(opt[1])}}break;case"c":if(!isNaN(opt[1])){defaultOpts.cookie=Number(opt[1]);if(defaultOpts.cookie<0){$.cookie("symBoxPop",null,{path:"/"})}}else{defaultOpts.cookie=1}break;case"o":if(!isNaN(opt[1])){defaultOpts.opacity=Number(opt[1])}}}}var popMargTop;var popMargLeft;var refObj=$("#"+$(this).attr("rel"));$("img",refObj).each(function(){$(this).load(function(){if(isNaN(defaultOpts.width)&&isNaN(defaultOpts.height)){if(defaultOpts.width==""||isNaN(defaultOpts.width)){defaultOpts.width=$(this).attr("width")}if(defaultOpts.height==""||isNaN(defaultOpts.height)){defaultOpts.height=refObj.height()}if(typeof defaultOpts.height=="undefined"||defaultOpts.height==""){popMargTop=(refObj.height()+80)/2}else{popMargTop=(parseInt(defaultOpts.height)+80)/2}if(typeof defaultOpts.width=="undefined"||defaultOpts.width==""){popMargLeft=(refObj.width()+80)/2}else{popMargLeft=(parseInt(defaultOpts.width)+80)/2}$(this).click(function(){var clone=$("#"+popID).clone(true);clone.attr("id","symClone");$("body").append(clone);if(typeof defaultOpts.height!="undefined"&&defaultOpts.height!=""){clone.css("height",defaultOpts.height)}clone.fadeIn().css({width:defaultOpts.width,"margin-top":-popMargTop,"margin-left":-popMargLeft}).prepend('<a href="#" class="close"><img src="files/symboximg/close_pop-1.png" class="btn_close" title="Close Window" alt="Close Window" /></a>');$("body").append('<div id="symboxfade"></div>');$("#symboxfade").css({filter:"alpha(opacity="+(defaultOpts.opacity*100)+")",opacity:defaultOpts.opacity}).fadeIn();return false})}})});if(defaultOpts.width==""||isNaN(defaultOpts.width)){if($.browser.msie&&parseInt($.browser.version)<=7){$("img, iframe, object, embed, video",refObj).each(function(){if($(this)[0].nodeName=="IMG"){var htmlText=$(this).parent().html();htmlText=htmlText.toLowerCase();var widthLoc=htmlText.indexOf("width");if(widthLoc<0){defaultOpts.width=""}else{defaultOpts.width=parseInt(htmlText.substr(widthLoc+6))}}else{defaultOpts.width=$(this).attr("width")}})}else{defaultOpts.width=refObj.width()}}if(defaultOpts.height==""||isNaN(defaultOpts.height)){if($.browser.msie&&parseInt($.browser.version)<=7){$("img, iframe, object, embed, video",refObj).each(function(){if($(this)[0].nodeName=="IMG"){var htmlText=$(this).parent().html();htmlText=htmlText.toLowerCase();var heightLoc=htmlText.indexOf("height");if(heightLoc<0){defaultOpts.height=""}else{defaultOpts.height=parseInt(htmlText.substr(heightLoc+7))}}else{defaultOpts.height=$(this).attr("height")}})}else{defaultOpts.height=refObj.height()}}if(typeof defaultOpts.height=="undefined"||defaultOpts.height==""){popMargTop=(refObj.height()+80)/2}else{popMargTop=(parseInt(defaultOpts.height)+80)/2}if(typeof defaultOpts.width=="undefined"||defaultOpts.width==""){popMargLeft=(refObj.width()+80)/2}else{popMargLeft=(parseInt(defaultOpts.width)+80)/2}$(this).click(function(){var clone=$("#"+popID).clone(true);clone.attr("id","symClone");$("body").append(clone);if(typeof defaultOpts.height!="undefined"&&defaultOpts.height!=""){clone.css("height",defaultOpts.height+"px")}clone.fadeIn();if(defaultOpts.width==""){defaultOpts.width=$("#"+popID).width()}clone.css({width:defaultOpts.width+"px","margin-top":-popMargTop+"px","margin-left":-popMargLeft+"px"});clone.prepend('<a href="#" class="close"><img src="files/symboximg/close_pop-1.png" class="btn_close" title="Close Window" alt="Close Window" /></a>');$("body").append('<div id="symboxfade"></div>');$("#symboxfade").css({filter:"alpha(opacity="+(defaultOpts.opacity*100)+")",opacity:defaultOpts.opacity}).fadeIn();return false});if(!autoPop&&typeof defaultOpts.auto!="undefined"&&defaultOpts.auto!=null){setTimeout(function(){$this.click()},parseInt(defaultOpts.auto)*1000);autoPop=true;if(!isNaN(defaultOpts.cookie)&&defaultOpts.cookie>0){$.cookie("symBoxPop","1",{expires:defaultOpts.cookie,path:"/"})}}})}})})(jQuery);$(document).ready(function(){$("a[rel^=symbox]").sympleBox({opacity:0.85})});
	return stack;
})(stacks.stacks_in_1505_page0);



