
// '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_0_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_0_page0 = {};

// 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_0_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;
	

/*
FX Slider Stack 1.0.1 - http://www.weaveraddons.com/stacks/fx-slider for more information
*/

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

/*
 Dual licensed under the MIT or GPL Version 2 licenses
 @example http://thiagosf.net/projects/jquery/skitter/
*/

var img=new Image;img.src="rw_common/plugins/stacks/fxslider/ajax-loader.gif";jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(c,a,d,b,e){return jQuery.easing[jQuery.easing.def](c,a,d,b,e)},easeInQuad:function(c,a,d,b,e){return b*(a/=e)*a+d},easeOutQuad:function(c,a,d,b,e){return-b*(a/=e)*(a-2)+d},easeInOutQuad:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a+d:-b/2*(--a*(a-2)-1)+d},easeInCubic:function(c,a,d,b,e){return b*(a/=e)*a*a+d},easeOutCubic:function(c,a,d,b,e){return b*((a=a/e-1)*a*a+1)+d},easeInOutCubic:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a*a+d:b/
2*((a-=2)*a*a+2)+d},easeInQuart:function(c,a,d,b,e){return b*(a/=e)*a*a*a+d},easeOutQuart:function(c,a,d,b,e){return-b*((a=a/e-1)*a*a*a-1)+d},easeInOutQuart:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a*a*a+d:-b/2*((a-=2)*a*a*a-2)+d},easeInQuint:function(c,a,d,b,e){return b*(a/=e)*a*a*a*a+d},easeOutQuint:function(c,a,d,b,e){return b*((a=a/e-1)*a*a*a*a+1)+d},easeInOutQuint:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a*a*a*a+d:b/2*((a-=2)*a*a*a*a+2)+d},easeInSine:function(c,a,d,b,e){return-b*Math.cos(a/
e*(Math.PI/2))+b+d},easeOutSine:function(c,a,d,b,e){return b*Math.sin(a/e*(Math.PI/2))+d},easeInOutSine:function(c,a,d,b,e){return-b/2*(Math.cos(Math.PI*a/e)-1)+d},easeInExpo:function(c,a,d,b,e){return a==0?d:b*Math.pow(2,10*(a/e-1))+d},easeOutExpo:function(c,a,d,b,e){return a==e?d+b:b*(-Math.pow(2,-10*a/e)+1)+d},easeInOutExpo:function(c,a,d,b,e){return a==0?d:a==e?d+b:(a/=e/2)<1?b/2*Math.pow(2,10*(a-1))+d:b/2*(-Math.pow(2,-10*--a)+2)+d},easeInCirc:function(c,a,d,b,e){return-b*(Math.sqrt(1-(a/=e)*
a)-1)+d},easeOutCirc:function(c,a,d,b,e){return b*Math.sqrt(1-(a=a/e-1)*a)+d},easeInOutCirc:function(c,a,d,b,e){return(a/=e/2)<1?-b/2*(Math.sqrt(1-a*a)-1)+d:b/2*(Math.sqrt(1-(a-=2)*a)+1)+d},easeInElastic:function(c,a,d,b,e){var c=1.70158,f=0,m=b;if(a==0)return d;if((a/=e)==1)return d+b;f||(f=e*0.3);m<Math.abs(b)?(m=b,c=f/4):c=f/(2*Math.PI)*Math.asin(b/m);return-(m*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/f))+d},easeOutElastic:function(c,a,d,b,e){var c=1.70158,f=0,m=b;if(a==0)return d;if((a/=
e)==1)return d+b;f||(f=e*0.3);m<Math.abs(b)?(m=b,c=f/4):c=f/(2*Math.PI)*Math.asin(b/m);return m*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/f)+b+d},easeInOutElastic:function(c,a,d,b,e){var c=1.70158,f=0,m=b;if(a==0)return d;if((a/=e/2)==2)return d+b;f||(f=e*0.3*1.5);m<Math.abs(b)?(m=b,c=f/4):c=f/(2*Math.PI)*Math.asin(b/m);return a<1?-0.5*m*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/f)+d:m*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/f)*0.5+b+d},easeInBack:function(c,a,d,b,e,f){f==void 0&&
(f=1.70158);return b*(a/=e)*a*((f+1)*a-f)+d},easeOutBack:function(c,a,d,b,e,f){f==void 0&&(f=1.70158);return b*((a=a/e-1)*a*((f+1)*a+f)+1)+d},easeInOutBack:function(c,a,d,b,e,f){f==void 0&&(f=1.70158);return(a/=e/2)<1?b/2*a*a*(((f*=1.525)+1)*a-f)+d:b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+d},easeInBounce:function(c,a,d,b,e){return b-jQuery.easing.easeOutBounce(c,e-a,0,b,e)+d},easeOutBounce:function(c,a,d,b,e){return(a/=e)<1/2.75?b*7.5625*a*a+d:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+d:a<2.5/2.75?b*
(7.5625*(a-=2.25/2.75)*a+0.9375)+d:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+d},easeInOutBounce:function(c,a,d,b,e){return a<e/2?jQuery.easing.easeInBounce(c,a*2,0,b,e)*0.5+d:jQuery.easing.easeOutBounce(c,a*2-e,0,b,e)*0.5+b*0.5+d}});
Utils=function(){return{wait:function(c){var c=$.extend({until:function(){return false},success:function(){},error:function(){Galleria.raise("Could not complete wait function.")},timeout:3E3},c),a=Utils.timestamp(),d,b,e=function(){b=Utils.timestamp();d=b-a;if(c.until(d))return c.success(),false;if(b>=a+c.timeout)return c.error(),false;window.setTimeout(e,10)};window.setTimeout(e,10)},timestamp:function(){return(new Date).getTime()},toggleQuality:function(c,a){if(!(IE!==7&&IE!==8)&&c)typeof a==="undefined"&&
(a=c.style.msInterpolationMode==="nearest-neighbor"),c.style.msInterpolationMode=a?"bicubic":"nearest-neighbor"}}}();
(function(c){var a=0,d=[];c.fn.skitter=function(h){return this.each(function(){c(this).data("skitter_number",a);d.push(new e(this,h,a));++a})};var b={v:1,i:2500,a:"",nr:true,n:true,lb:true,b:null,ti:null,il:null,ia:null,lia:null,laa:null,w:null,h:null,ii:1,ian:false,ih:false,ria:null,sr:false,th:false,aou:{backgroundColor:"#333",color:"#fff"},ao:{backgroundColor:"#000",color:"#fff"},aa:{backgroundColor:"#cc3333",color:"#fff"},ht:false,f:false,x:false,d:false,wl:null,o:0.75,iie:300,ioe:500,l:null,
is:null,mnh:20,ls:true,fl:1,ahl:true,s:'<a href="#" class="prev_button">prev</a><a href="#" class="next_button">next</a><span class="info_slide"></span><div class="border_skitter"><div class="container_skitter"><div class="image"><a href=""><img class="image_main" /></a><div class="label_skitter"></div></div></div></div>'};c.skitter=function(h,a,o){this.b=c(h);this.timer=null;this.s=c.extend({},b,a||{});this.number_skitter=o;this.ca=0;this.oc=this.at=false;this.setup()};var e=c.skitter;e.fn=e.prototype=
{};e.fn.extend=c.extend;e.fn.extend({setup:function(){var h=this;this.at=this.s.a.replace(/,/g," ").split(/\s+/);if(this.at.length<=1)this.at=false;this.b.append(this.s.s);if(this.s.v>=2)this.s.v=1.3;if(this.s.v<=0)this.s.v=1;!this.s.nr&&!this.s.th&&!this.s.d&&this.b.find(".info_slide").hide();this.s.lb||this.b.find(".label_skitter").hide();this.s.n||(this.b.find(".prev_button").hide(),this.b.find(".next_button").hide());if(this.s.f)this.s.w=c(window).width(),this.s.h=c(window).height(),this.b.css({position:"absolute",
top:0,left:0,"z-index":1E3}),c("body").css({overflown:"hidden"});else if(!this.s.w||!this.s.h){var a=h.b.find(".skitter_size_info:first"),o=h.b.find("img:first");if(a.length)this.s.w=a.data("width")||a.attr("data-width"),this.s.h=a.data("height")||a.attr("data-height");else if(o.length){if(this.s.w=o.attr("width"),this.s.h=o.attr("height"),!this.s.w||!this.s.h){a=false;o=o.parent().html();if(a=o.match(/width\s*=\s*["']?([0-9]+)/))this.s.w=a[1];if(a=o.match(/height\s*=\s*["']?([0-9]+)/))this.s.h=a[1]}}else this.s.w=
800,this.s.h=300}this.s.w=parseInt(this.s.w,10);this.s.h=parseInt(this.s.h,10);if(this.s.w==0||this.s.h==0)this.s.w=800,this.s.h=300;this.b.width(this.s.w+this.s.bw*2).height(this.s.h+this.s.bw*2);this.b.find(".container_skitter").width(this.s.w).height(this.s.h);this.s.bw&&this.b.find(".border_skitter").css("border","0px solid #000000");this.s.sbr&&this.b.css({"margin-bottom":this.s.sbr+5+"px","margin-top":this.s.sbr+5+"px"});o=this.s.wl?this.s.wl:this.s.w;this.b.find(".label_skitter").width(o);
var o=" image_number_select",k=0;this.s.il=[];this.s.x?c.ajax({type:"GET",url:this.s.x,async:false,dataType:"xml",success:function(a){c("<ul></ul>");c(a).find("skitter slide").each(function(){++k;var a=c(this).find("link").text()?c(this).find("link").text():"#",o=c(this).find("image").text(),g=c(this).find("image").attr("type"),b=c(this).find("label").text();h.s.il.push([o,a,g,b])})}}):this.s.json||this.b.find("ul li").each(function(){++k;var a=c(this).find("a").length?c(this).find("a").attr("href"):
"#",o=c(this).find("img").attr("src"),g=c(this).find("img").attr("alt");g&&g.match(/Stacks Image [0-9+]/i)&&(g="");typeof o!="undefined"&&h.s.il.push([o,a,"",g])});if(this.s.il.length>1){this.s.sr&&this.s.il.sort(function(){return Math.random()-0.5});for(i=0;i<this.s.il.length;i++)this.s.th?(a="",a=this.s.w>this.s.h?'height="100"':'width="100"',this.b.find(".info_slide").append('<span class="image_number'+o+'" rel="'+i+'" id="image_n_'+(i+1)+"_"+this.number_skitter+'"><img src="'+this.s.il[i][0]+
'" '+a+" /></span> ")):this.b.find(".info_slide").append('<span class="image_number'+o+'" rel="'+i+'" id="image_n_'+(i+1)+"_"+this.number_skitter+'">'+(i+1)+"</span> "),o=""}if(h.s.th){h.s.aou={opacity:0.5,width:"70px"};h.s.ao={opacity:1,width:"70px"};h.s.aa={opacity:1,width:"70px"};h.b.find(".info_slide").addClass("info_slide_thumb");o=k*55+75;h.b.find(".info_slide_thumb").width(o);h.b.css({height:h.b.height()+h.b.find(".info_slide").height()+5});h.s.lb=false;h.s.nl=="top"?h.b.find(".border_skitter").prepend('<div class="container_thumbs"></div>'):
(h.s.nl="bottom",h.b.find(".border_skitter").append('<div class="container_thumbs"></div>'));a=h.b.find(".info_slide").clone();h.b.find(".info_slide").remove();h.b.find(".container_thumbs").width(h.s.w).height(50).append(a);var b=0,u=this.s.w,j=this.s.h,g=0,d=h.b.find(".info_slide_thumb"),e=h.b.offset().left,n=h.b.offset().top;d.find(".image_number").each(function(){b+=c(this).width()+parseInt(c(this).css("marginLeft"))+parseInt(c(this).css("marginRight"))+parseInt(c(this).css("paddingLeft"))+parseInt(c(this).css("paddingRight"))});
d.width(b+"px");g=d.width();width_valor=this.s.w;width_valor=u-100;e+=90;o>h.s.w&&h.b.mousemove(function(a){var c=a.pageX,a=a.pageY,k=0;c-=e;a-=n;novo_width=g-width_valor;k=-(novo_width*c/width_valor);k>0&&(k=0);k<-(g-u-5)&&(k=-(g-u-5));(h.s.nl=="bottom"&&a>j||h.s.nl=="top"&&a<50)&&d.css({left:k})});h.b.find(".scroll_thumbs").css({left:10});o<h.s.w&&(h.b.find(".info_slide").width(h.s.w),h.b.find(".box_scroll_thumbs").hide())}else if(h.s.d||h.s.nr){o={};h.s.d?(a=Math.round(h.s.ds*1.8),a<15?a=15:a>
50&&(a=45)):a=30;if(h.s.nl=="top")o.top="-"+a+"px",o.bottom="auto",(!this.s.sbr||this.s.sbr<a)&&h.b.css("margin-top",a+"px");else if(h.s.nl=="bottom")o.bottom="-"+a+"px",o.top="auto",(!this.s.sbr||this.s.sbr<a)&&h.b.css("margin-bottom",a+"px");a=h.b.find(".info_slide");if(h.s.d)a.addClass("info_slide_dots").removeClass("info_slide");else if(h.s.nl=="top"||h.s.nl=="bottom")a.addClass("info_slide_numbers"),a.height()>h.s.mnh&&a.hide();h.s.nl=="top"||h.s.nl=="bottom"?o.left=(h.s.w+this.s.bw*2-a.width())/
2:(o.top=15+this.s.bw,o.left=15+this.s.bw);a.css(o)}this.b.find("ul").hide();this.s.ia=this.s.il[0][0];this.s.lia=this.s.il[0][1];this.s.laa=this.s.il[0][3];this.s.il.length>1&&(this.b.find(".prev_button").click(function(){var a=h.s.ii-2;a<0&&(a=h.s.il.length+a);h.jumpToImage(a);return false}),this.b.find(".next_button").click(function(){h.jumpToImage(h.s.ii);return false}),this.b.find(".next_button, .prev_button").hover(function(){c(this).stop().animate({opacity:1},200)},function(){c(this).stop().animate({opacity:0.75},
200)}),this.b.find(".image_number").hover(function(){c(this).attr("class")!="image_number image_number_select"&&c(this).css(h.s.ao)},function(){c(this).attr("class")!="image_number image_number_select"&&c(this).css(h.s.aou)}),this.b.find(".image_number").click(function(){if(c(this).attr("class")!="image_number image_number_select"){var a=c(this).attr("rel");h.jumpToImage(a)}return false}),this.b.find(".image_number").css(h.s.aou),this.b.find(".image_number:eq(0)").css(h.s.aa));this.s.ht&&this.hideTools();
this.loadImages()},loadImages:function(){var h=this;this.b.append(c('<div class="loading">Loading</div>'));var a=this.s.il.length,o=0;c.each(this.s.il,function(){var k=c('<span class="image_loading"></span>');k.css({position:"absolute",top:"-9999em"});h.b.append(k);k=new Image;c(k).load(function(){++o;o==a&&(h.b.find(".loading").remove(),h.b.find(".image_loading").remove(),h.start())}).error(function(){h.b.find(".loading, .image_loading, .image_number, .next_button, .prev_button").remove();h.b.html('<p style="color:white;background:black;">Error loading images. One or more images were not found.</p>')}).attr("src",
this[0])})},start:function(){var h=this;this.setLinkAtual();this.b.find(".image a img").attr({src:this.s.ia});img_link=this.b.find(".image a");img_link=this.resizeImage(img_link);img_link.find("img").fadeIn(1500);this.setValueBoxText();this.showBoxText();this.stopOnMouseOver();this.s.il.length>1?this.timer=setTimeout(function(){h.nextImage()},this.s.i):this.b.find(".loading, .image_loading, .image_number, .next_button, .prev_button").remove();c.isFunction(this.s.l)&&this.s.l()},jumpToImage:function(h){this.s.ian==
false?(this.b.find(".box_clone").stop(),this.clearTimer(true),this.s.ii=Math.floor(h),this.b.find(".image a").attr({href:this.s.lia}),this.b.find(".image_main").attr({src:this.s.ia}),this.b.find(".box_clone").remove(),this.nextImage()):this.oc=h},nextImage:function(){animations_functions="cube,cuberandom,block,cubestop,cubestoprandom,cubehide,cubesize,horizontal,showbars,showbarsrandom,tube,fade,fadefour,paralell,blind,blindheight,blindwidth,directiontop,directionbottom,directionright,directionleft,cubespread,glasscube,glassblock,circles,circlesinside,circlesrotate".split(",");
if(this.at&&!this.s.il[this.s.ii][2]){if(animation_type=this.at[this.ca],this.ca++,this.ca>=this.at.length)this.ca=0}else animation_type=this.s.il[this.s.ii][2]?this.s.il[this.s.ii][2]:this.s.a==""?"randomsmart":this.s.a;if(animation_type=="randomsmart"){if(!this.s.ria)animations_functions.sort(function(){return 0.5-Math.random()}),this.s.ria=animations_functions;animation_type=this.s.ria[this.s.ii]}else if(animation_type=="random"){var h=parseInt(Math.random()*animations_functions.length);animation_type=
animations_functions[h]}animation_type=animation_type.toLowerCase();h={};if(animation_type.match(/random/i))animation_type=animation_type.replace(/random/i,""),h.random=true;else{var a={blindheight:{height:true},blindwidth:{height:false,time_animate:400,delay:50},directiontop:{direction:"top"},directionbottom:{direction:"bottom"},directionright:{direction:"right",total:5},directionleft:{direction:"left",total:5}};a[animation_type]&&(h=a[animation_type],animation_type=animation_type.replace(/width|height|top|bottom|left|right/i,
""))}easing="easeOutQuad";this.s.ian=true;a="animation"+animation_type.charAt(0).toUpperCase()+animation_type.slice(1);if(this[a])this[a](h);else this.animationTube()},animationCube:function(h){var a=this;easing="easeOutBack";var c=700/this.s.v;this.setActualLevel();var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/(this.s.h/3)),u=k*b,k=Math.ceil(this.s.w/k),j=Math.ceil(this.s.h/b),g=init_left=this.s.h+200,d=0,e=0;for(i=0;i<u;i++){var n=this.getBoxClone();n.hide();var f={left:this.s.w/2,
top:this.s.h+50,width:k,height:j};if(h.random)f.left=(i%2==0?init_left:-init_left)+k*e+e*50+"px",f.top=(i%2==0?g:-g)+j*d+d*50+"px";n.css(f);n.find("img").css({left:-(k*e),top:-(j*d)});this.addBoxClone(n);var f=40*e,p=i==u-1?function(){a.finishAnimation()}:"";n.show().delay(f).animate({top:j*d+"px",left:k*e+"px"},c,easing,p);d++;d==b&&(d=0,e++)}},animationBlock:function(){var h=this,a=500/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/10)),k=Math.ceil(this.s.w/c),b=this.s.h;for(i=
0;i<c;i++){var d=k*i,j=this.getBoxClone();j.css({left:this.s.w,top:0,width:k,height:b});j.find("img").css({left:-(k*i),top:0});this.addBoxClone(j);var g=i==c-1?function(){h.finishAnimation()}:"";j.delay(80*i).animate({top:0,left:d,opacity:"show"},a,easing,g)}},animationCubestop:function(h){var a=this;easing="easeOutBack";var c=800/this.s.v,k=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var b=Math.ceil(this.s.w/(this.s.w/
8)),d=Math.ceil(this.s.h/(this.s.w/8)),j=b*d,b=Math.ceil(this.s.w/b),g=Math.ceil(this.s.h/d),e=0,l=0,n=0,f=0,p=this.s.w/16;for(i=0;i<j;i++){var e=i%2==0?e:-e,l=i%2==0?l:-l,q=e+g*n,m=l+b*f,t=-(g*n),v=-(b*f),x=q-p,w=m-p,s=this.getBoxClone(k);s.css({left:m+"px",top:q+"px",width:b,height:g});s.find("img").css({left:v,top:t});this.addBoxClone(s);s.show();t=30*i;h.random&&(c=1E3/this.s.v,x=q,w=m,t=30*Math.random()*30);q=i==j-1?function(){a.finishAnimation()}:"";s.delay(t).animate({opacity:"hide",top:x+
"px",left:w+"px"},c,easing,q);n++;n==d&&(n=0,f++)}},animationCubehide:function(){var h=this,a=500/this.s.v,c=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/(this.s.h/3)),d=k*b,k=Math.ceil(this.s.w/k),j=Math.ceil(this.s.h/b),g=0,e=0,l=0,n=0;for(i=0;i<d;i++){var g=i%2==0?g:-g,e=i%2==0?e:-e,f=g+j*l,p=e+k*n,q=-(j*l),m=-(k*n),t=this.getBoxClone(c);t.css({left:p+
"px",top:f+"px",width:k,height:j});t.find("img").css({left:m,top:q});this.addBoxClone(t);t.show();f=50*i;f=i==d-1?d*50:f;p=i==d-1?function(){h.finishAnimation()}:"";t.delay(f).animate({opacity:"hide"},a,easing,p);l++;l==b&&(l=0,n++)}},animationCubejelly:function(){var h=this;easing="easeInBack";var a=300/this.s.v,c=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/
(this.s.h/3)),d=k*b,k=Math.ceil(this.s.w/k),e=Math.ceil(this.s.h/b),g=0,r=0,l=0,f=0,m=-1;for(i=0;i<d;i++){f%2!=0?(l==0&&(m=m+b+1),m--):(f>0&&l==0&&(m+=2),m++);var g=i%2==0?g:-g,r=i%2==0?r:-r,p=g+e*l,q=r+k*f,s=-(e*l),t=-(k*f),v=this.getBoxClone(c);v.css({left:q+"px",top:p+"px",width:k,height:e});v.find("img").css({left:t,top:s});this.addBoxClone(v);v.show();p=i==d-1?function(){h.finishAnimation()}:"";v.delay(50*i).animate({width:"+=100px",height:"+=100px",top:"-=20px",left:"-=20px",opacity:"hide"},
a,easing,p);l++;l==b&&(l=0,f++)}},animationCubesize:function(){var h=this;easing="easeInOutQuad";var a=600/this.s.v,c=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/(this.s.h/3)),d=k*b,k=Math.ceil(this.s.w/k),e=Math.ceil(this.s.h/b),g=0,f=0,l=0,n=0;Math.ceil(this.s.w/6);for(i=0;i<d;i++){var g=i%2==0?g:-g,f=i%2==0?f:-f,m=g+e*l,p=f+k*n,q=-(e*l),s=-(k*n),t=this.getBoxClone(c);
t.css({left:p,top:m,width:k,height:e});t.find("img").css({left:s,top:q});this.addBoxClone(t);t.show();q=i==d-1?function(){h.finishAnimation()}:"";t.delay(50*i).animate({opacity:"hide",width:"hide",height:"hide",top:m+k*1.5,left:p+e*1.5},a,easing,q);l++;l==b&&(l=0,n++)}},animationHorizontal:function(){var h=this;easing="easeOutExpo";var a=700/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/7)),k=this.s.w,b=Math.ceil(this.s.h/c);for(i=0;i<c;i++){var d=(i%2==0?"":"")+k,e=i*b,g=this.getBoxClone();
g.css({left:d+"px",top:e+"px",width:k,height:b});g.find("img").css({left:0,top:-e});this.addBoxClone(g);d=i==c-1?function(){h.finishAnimation()}:"";g.delay(70*i).animate({opacity:"show",top:e,left:0},a,easing,d)}},animationShowbars:function(h){var a=this,c=400/this.s.v;this.setActualLevel();var k=Math.ceil(this.s.w/(this.s.w/10)),b=Math.ceil(this.s.w/k),d=this.s.h;for(i=0;i<k;i++){var e=b*i,g=this.getBoxClone();g.css({left:e,top:-50,width:b,height:d});g.find("img").css({left:-(b*i),top:0});this.addBoxClone(g);
if(h.random)var f=50*this.getRandom(k),f=i==k-1?50*k:f;else f=70*i,c-=i*2;var l=i==k-1?function(){a.finishAnimation()}:"";g.delay(f).animate({opacity:"show",top:"0px",left:e+"px"},c,easing,l)}},animationTube:function(){var h=this;easing="easeOutElastic";var a=600/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/10)),b=Math.ceil(this.s.w/c),d=this.s.h;for(i=0;i<c;i++){var e=d,j=b*i,g=this.getBoxClone();g.css({left:j,top:e,height:d,width:b});g.find("img").css({left:-j});this.addBoxClone(g);
e=40*this.getRandom(c);j=i==c-1?function(){h.finishAnimation()}:"";g.show().delay(e).animate({top:0},a,easing,j)}},animationFade:function(){var h=this,a=800/this.s.v;this.setActualLevel();var c=this.s.w,b=this.s.h;for(i=0;i<2;i++){var d=this.getBoxClone();d.css({left:0,top:0,width:c,height:b});this.addBoxClone(d);d.animate({opacity:"show",left:0,top:0},a,easing,i==1?function(){h.finishAnimation()}:"")}},animationFadefour:function(){var h=this,a=500/this.s.v;this.setActualLevel();var c=this.s.w,b=
this.s.h;for(i=0;i<4;i++){if(i==0)var d="-100px",e="-100px";else i==1?(d="-100px",e="100px"):i==2?(d="100px",e="-100px"):i==3&&(e=d="100px");var j=this.getBoxClone();j.css({left:e,top:d,width:c,height:b});this.addBoxClone(j);j.animate({opacity:"show",left:0,top:0},a,easing,i==3?function(){h.finishAnimation()}:"")}},animationParalell:function(){var h=this;easing="easeOutCirc";var a=400/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/16)),b=Math.ceil(this.s.w/c),d=this.s.h;for(i=0;i<
c;i++){var e=b*i,j=this.getBoxClone();j.css({left:e,top:0-this.s.h,width:b,height:d});j.find("img").css({left:-(b*i),top:0});this.addBoxClone(j);var g;i<=c/2-1?g=1400-i*200:i>c/2-1&&(g=(i-c/2)*200);g/=2.5;var f=i==c-1?function(){h.finishAnimation()}:"";j.show().delay(g).animate({top:"0px",left:e+"px"},a,easing,f)}},animationBlind:function(h){var a=this,c=400/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/16)),d=Math.ceil(this.s.w/b),e=this.s.h;for(i=0;i<b;i++){var j=d*i,g=this.getBoxClone();
g.css({left:j,top:0,width:d,height:e});g.find("img").css({left:-(d*i),top:0});this.addBoxClone(g);var f;if(h.height)i<=b/2-1?f=200+i*200:i>b/2-1&&(f=(b/2-i)*200+b*100),l=i==b/2?function(){a.finishAnimation()}:"";else{i<=b/2-1?f=1400-i*200:i>b/2-1&&(f=(i-b/2)*200);var l=i==b-1?function(){a.finishAnimation()}:""}f/=2.5;h.height?(c+=i*2,easing="easeOutQuad",g.delay(f).animate({opacity:"show",top:"0px",left:j+"px",height:"show"},c,easing,l)):g.delay(f).animate({opacity:"show",top:"0px",left:j+"px",width:"show"},
c,easing,l)}},animationBlinddimension:function(a){var b=this,a=c.extend({},{height:true,time_animate:500,delay:100},a||{}),d=a.time_animate/this.s.v;this.setActualLevel();var e=Math.ceil(this.s.w/(this.s.w/16)),f=Math.ceil(this.s.w/e),u=this.s.h;for(i=0;i<e;i++){var j=f*i,g=this.getBoxClone();g.css({left:j,top:0,width:f,height:u});g.find("img").css({left:-(f*i),top:0});this.addBoxClone(g);var r=a.delay*i,l=i==e-1?function(){b.finishAnimation()}:"";a.height?(easing="easeOutQuad",g.delay(r).animate({opacity:"show",
top:"0px",left:j+"px",height:"show"},d,easing,l)):g.delay(r).animate({opacity:"show",top:"0px",left:j+"px",width:"show"},d,easing,l)}},animationDirection:function(a){var b=this,a=c.extend({},{direction:"top",delay_type:"sequence",total:7},a||{});easing="easeInOutExpo";var d=1200/this.s.v,e=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});this.b.find(".image_main").hide();var f=a.total;for(i=0;i<f;i++){switch(a.direction){default:case "top":var u=
Math.ceil(this.s.w/f),j=this.s.h,g=0,r=u*i,l=-j,n=r,m=j,p=r,q=0,s=r,t=0,v=-r;break;case "bottom":u=Math.ceil(this.s.w/f);j=this.s.h;g=0;r=u*i;l=j;n=r;m=-j;p=r;q=0;s=r;t=0;v=-r;break;case "right":u=this.s.w;j=Math.ceil(this.s.h/f);g=j*i;r=0;l=g;n=u;m=g;p=-n;q=g;s=0;t=-g;v=0;break;case "left":u=this.s.w,j=Math.ceil(this.s.h/f),g=j*i,r=0,l=g,n=-u,m=g,p=-n,q=g,s=0,t=-g,v=0}switch(a.delay_type){default:var x=i%2==0?0:150;break;case "random":x=30*Math.random()*30;break;case "sequence":x=i*100}var w=this.getBoxClone(e);
w.find("img").css({left:v,top:t});w.css({top:g,left:r,width:u,height:j});this.addBoxClone(w);w.show();w.delay(x).animate({top:l,left:n},d,easing);g=this.getBoxClone();g.find("img").css({left:v,top:t});g.css({top:m,left:p,width:u,height:j});this.addBoxClone(g);g.show();u=i==f-1?function(){b.finishAnimation()}:"";g.delay(x).animate({top:q,left:s},d,easing,u)}},animationCubespread:function(){var a=this;easing="easeInOutQuad";var c=700/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/
8)),d=Math.ceil(this.s.h/(this.s.w/8)),e=b*d,b=Math.ceil(this.s.w/b),f=Math.ceil(this.s.h/d),j=0,g=0,r=0,l=0,n=[],m=[];for(i=0;i<e;i++){var j=i%2==0?j:-j,g=i%2==0?g:-g,p=j+f*r,q=g+b*l;n[i]=[p,q];r++;r==d&&(r=0,l++)}for(i=l=r=0;i<e;i++)m[i]=i;m=a.shuffleArray(m);for(i=0;i<e;i++){var j=i%2==0?j:-j,g=i%2==0?g:-g,p=j+f*r,q=g+b*l,s=-(f*r),t=-(b*l),v=p,x=q,p=n[m[i]][0],q=n[m[i]][1],w=this.getBoxClone();w.css({left:q+"px",top:p+"px",width:b,height:f});w.find("img").css({left:t,top:s});this.addBoxClone(w);
p=30*Math.random()*30;i==e-1&&(p=900);q=i==e-1?function(){a.finishAnimation()}:"";w.delay(p).animate({opacity:"show",top:v+"px",left:x+"px"},c,easing,q);r++;r==d&&(r=0,l++)}},animationGlasscube:function(){var a=this;easing="easeOutExpo";var c=500/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/10))*2,d=Math.ceil(this.s.w/b)*2,e=this.s.h/2,f=0;for(i=0;i<b;i++){mod=i%2==0?true:false;var j=d*f,g=mod?-a.s.h:a.s.h,m=d*f,l=mod?0:e,n=-(d*f),s=mod?0:-e,p=120*f,q=this.getBoxClone();q.css({left:j,
top:g,width:d,height:e});q.find("img").css({left:n+d/1.5,top:s}).delay(p).animate({left:n,top:s},c*1.9,"easeOutQuad");this.addBoxClone(q);j=i==b-1?function(){a.finishAnimation()}:"";q.show().delay(p).animate({top:l,left:m},c,easing,j);i%2!=0&&f++}},animationGlassblock:function(){var a=this;easing="easeOutExpo";var c=700/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/10)),d=Math.ceil(this.s.w/b),e=this.s.h;for(i=0;i<b;i++){var f=d*i,j=d*i,g=-(d*i),m=100*i,l=this.getBoxClone();l.css({left:f,
top:0,width:d,height:e});l.find("img").css({left:g+d/1.5,top:0}).delay(m).animate({left:g,top:0},c*1.1,"easeInOutQuad");this.addBoxClone(l);f=i==b-1?function(){a.finishAnimation()}:"";l.delay(m).animate({top:0,left:j,opacity:"show"},c,easing,f)}},animationCircles:function(){var a=this;easing="easeInQuad";var c=500/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/10)),d=100,e=Math.sqrt(Math.pow(this.s.w,2)+Math.pow(this.s.h,2)),e=Math.ceil(e);for(i=0;i<b;i++){var f=a.s.w/2-d/2,j=a.s.h/
2-d/2,g=f,m=j,l=this.getBoxClone();l.css({left:f,top:j,width:d,height:d}).css3({"border-radius":e+"px"});l.find("img").css({left:-f,top:-j});d+=100;this.addBoxClone(l);f=i==b-1?function(){a.finishAnimation()}:"";l.delay(70*i).animate({top:m,left:g,opacity:"show"},c,easing,f)}},animationCirclesinside:function(){var a=this;easing="easeInQuad";var c=500/this.s.v,b=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var d=Math.ceil(this.s.w/
(this.s.w/10)),e=Math.sqrt(Math.pow(this.s.w,2)+Math.pow(this.s.h,2)),f=e=Math.ceil(e);for(i=0;i<d;i++){var j=a.s.w/2-f/2,g=a.s.h/2-f/2,m=j,l=g,n=this.getBoxClone(b);n.css({left:j,top:g,width:f,height:f}).css3({"border-radius":e+"px"});n.find("img").css({left:-j,top:-g});f-=100;this.addBoxClone(n);n.show();j=i==d-1?function(){a.finishAnimation()}:"";n.delay(70*i).animate({top:l,left:m,opacity:"hide"},c,easing,j)}},animationCirclesrotate:function(){var a=this,c=500/this.s.v,b=this.b.find(".image_main").attr("src");
this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var d=Math.ceil(this.s.w/(this.s.w/10)),e=Math.sqrt(Math.pow(this.s.w,2)+Math.pow(this.s.h,2)),f=e=Math.ceil(e);for(i=0;i<d;i++){var j=a.s.w/2-f/2,g=a.s.h/2-f/2,m=j,l=g,n=this.getBoxClone(b);n.css({left:j,top:g,width:f,height:f}).css3({"border-radius":e+"px"});n.find("img").css({left:-j,top:-g});f-=100;this.addBoxClone(n);n.show();j=i==d-1?function(){a.finishAnimation()}:"";g=i%2==0?"20deg":"-20deg";n.delay(100*
i).animate({top:l,left:m,opacity:"hide",rotate:g},c,easing,j)}},finishAnimation:function(){var a=this;this.b.find(".image_main").show();this.showBoxText();this.s.ian=false;if(a.oc!==false)a.jumpToImage(a.oc),a.oc=false;else if((!this.s.poh||!this.s.ih)&&(this.s.ls||this.s.fl))this.timer=setTimeout(function(){a.completeMove()},this.s.i),this.b.find(".image_main").attr({src:this.s.ia}),this.b.find(".image a").attr({href:this.s.lia})},completeMove:function(){var a=true;if(!this.s.ls&&this.s.fl&&(this.s.fl++,
this.s.fl>=this.s.il.length))a=this.s.fl=false;this.clearTimer(true);this.b.find(".box_clone").remove();a&&this.nextImage()},setActualLevel:function(){var a=this;c.isFunction(this.s.is)&&this.s.imageSwitched(this.s.ii,this);var b=this.s.il[this.s.ii][1],d=this.s.il[this.s.ii][3];this.s.ia=this.s.il[this.s.ii][0];this.s.lia=b;this.s.laa=d;this.b.find(".image_number_select").css(a.s.aou).removeClass("image_number_select");c("#image_n_"+(this.s.ii+1)+"_"+a.number_skitter).css(a.s.aa).addClass("image_number_select");
this.s.ahl?this.b.find(".label_skitter").slideUp(200,function(){a.setValueBoxText()}):(a.setValueBoxText(),(this.s.laa==void 0||this.s.laa=="")&&this.b.find(".label_skitter").css("display","none"));this.s.ii++;if(this.s.ii==this.s.il.length)this.s.ii=0},getBoxClone:function(a){a=this.s.lia!="#"?c('<a href="'+this.s.lia+'"><img src="'+(a?a:this.s.ia)+'" /></a>'):c('<img src="'+(a?a:this.s.ia)+'" />');a=this.resizeImage(a);return c('<div class="box_clone"></div>').append(a)},resizeImage:function(a){this.s.f&&
a.find("img").height(this.s.h);return a},addBoxClone:function(a){this.b.find(".container_skitter").append(a)},getRandom:function(a){return Math.floor(Math.random()*a)},setValueBoxText:function(){this.b.find(".label_skitter").html("<p>"+this.s.laa+"</p>")},showBoxText:function(){this.s.laa!=void 0&&this.s.laa!=""&&this.s.lb&&(this.s.ahl?this.b.find(".label_skitter").slideDown(400):this.b.find(".label_skitter").css("display","block"))},stopOnMouseOver:function(){var a=this,c=a.s.o,b=a.s.iie,d=a.s.iie;
a.b.hover(function(){a.s.ht&&(a.s.nl!="top"&&a.s.nl!="bottom"&&a.b.find(".info_slide,.info_slide_dots").show().css({opacity:0}).animate({opacity:c},b),a.s.n&&(a.b.find(".prev_button").show().css({opacity:0}).animate({opacity:c},b),a.b.find(".next_button").show().css({opacity:0}).animate({opacity:c},b)));a.s.poh&&a.clearTimer(true);a.s.ih=true},function(){a.s.ht&&(a.s.nl!="top"&&a.s.nl!="bottom"&&a.b.find(".info_slide,.info_slide_dots").queue("fx",[]).show().css({opacity:c}).animate({opacity:0},d),
a.s.n&&(a.b.find(".prev_button").queue("fx",[]).show().css({opacity:c}).animate({opacity:0},d),a.b.find(".next_button").queue("fx",[]).show().css({opacity:c}).animate({opacity:0},d)));if(a.s.poh&&(a.clearTimer(true),!a.s.ian&&a.s.il.length>1&&(a.s.fl||a.s.ls)))a.timer=setTimeout(function(){a.timer=setTimeout(function(){a.completeMove()},a.s.i);a.b.find(".image_main").attr({src:a.s.ia});a.b.find(".image a").attr({href:a.s.lia})},a.s.i);a.s.ih=false})},clearTimer:function(){clearInterval(this.timer)},
setLinkAtual:function(){this.s.lia!="#"?this.b.find(".image a").attr({href:this.s.lia}):this.b.find(".image a").removeAttr("href")},hideTools:function(){this.s.nl!="top"&&this.s.nl!="bottom"&&this.b.find(".info_slide,.info_slide_dots").hide();this.b.find(".prev_button,.next_button,.label_skitter").hide()},shuffleArray:function(a){for(var c=[],b;a.length>0;)b=this.randomUnique(0,a.length-1),c[c.length]=a[b],a.splice(b,1);return c},randomUnique:function(a,c){var b;do b=Math.random();while(b==1);return b*
(c-a+1)+a|0}});c.fn.css3=function(a){var c={},b=["moz","ms","o","webkit"],d;for(d in a){for(var e=0;e<b.length;e++)c["-"+b[e]+"-"+d]=a[d];c[d]=a[d]}this.css(c);return this};var f="deg";c.fn.rotate=function(a){var b=c(this).css("transform")||"none";if(typeof a=="undefined")return b&&(a=b.match(/rotate\(([^)]+)\)/))&&a[1]?a[1]:0;if(a=a.toString().match(/^(-?\d+(\.\d+)?)(.+)?$/))a[3]&&(f=a[3]),c(this).css("transform",b.replace(/none|rotate\([^)]*\)/,"")+"rotate("+a[1]+f+")");return this};c.fn.scale=
function(a){var b=c(this).css("transform");if(typeof a=="undefined")return b&&(a=b.match(/scale\(([^)]+)\)/))&&a[1]?a[1]:1;c(this).css("transform",b.replace(/none|scale\([^)]*\)/,"")+"scale("+a+")");return this};var m=c.fx.prototype.cur;c.fx.prototype.cur=function(){if(this.prop=="rotate")return parseFloat(c(this.elem).rotate());else if(this.prop=="scale")return parseFloat(c(this.elem).scale());return m.apply(this,arguments)};c.fx.step.rotate=function(a){c(a.elem).rotate(a.now+f)};c.fx.step.scale=
function(a){c(a.elem).scale(a.now)};var y=c.fn.animate;c.fn.animate=function(a){if(typeof a.rotate!="undefined"){var b=a.rotate.toString().match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);b&&b[5]&&(f=b[5]);a.rotate=b[1]}return y.apply(this,arguments)};var s=null,z=c.fn.css;c.fn.css=function(a,b){s===null&&(s=typeof c.cssProps!="undefined"?c.cssProps:typeof c.props!="undefined"?c.props:{});if(typeof s.transform=="undefined"&&(a=="transform"||typeof a=="object"&&typeof a.transform!="undefined")){var d=s,e;
a:{e=this.get(0);for(var f=["transform","WebkitTransform","msTransform","MozTransform","OTransform"],m;m=f.shift();)if(typeof e.style[m]!="undefined"){e=m;break a}e="transform"}d.transform=e}if(s.transform!="transform")if(a=="transform"){if(a=s.transform,typeof b=="undefined"&&jQuery.style)return jQuery.style(this.get(0),a)}else if(typeof a=="object"&&typeof a.transform!="undefined")a[s.transform]=a.transform,delete a.transform;return z.apply(this,arguments)}})(jQuery);


$(function(){
	$('#stacks_in_0_page0images img').appendTo($('#stacks_in_0_page0container'));
	$('#stacks_in_0_page0container').skitter({'a': 'fade', 
								 'd': ('dots'.match(/dots/i) != null), 
								 'nr': ('dots'.match(/number/i) != null), 
								 'th': ('dots'.match(/thumb/i) != null),
								 'ds': 20,
								 'nl': 'inside', 
								 'al': '',
								 'sr': false, 
								 'i': 3.5*1000, 
								 'ls': true,
								 'ht': false,
								 'ahl': true,
								 'bw': 0, 
								 'sbr': 0,								
								 'aou': {backgroundColor: '#333333', color: '#FFFFFF'},
								 'ao': {backgroundColor: '#000000', color: '#FFFFFF'},
								 'aa': {backgroundColor: '#E6E6E6', color: '#FFFFFF'}, 
								 'poh': true});
});

	return stack;
})(stacks.stacks_in_0_page0);


// Javascript for stacks_in_7_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_7_page0 = {};

// 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_7_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;
	
//-- Tabulous Stack v1.2.4 by Joe Workman --//

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */

/*
	jQuery Coda-Slider v2.0 - http://www.ndoherty.biz/coda-slider
	Copyright (c) 2009 Niall Doherty
	This plugin available for use in all personal or commercial projects under both MIT and GPL licenses.
*/
$(function(){
	// Remove the coda-slider-no-js class from the body
	$("body").removeClass("coda-slider-no-js");
	// Preloader
	$(".coda-slider").children('.panel').hide().end().prepend('<p class="loading">Loading...<br /><img src="files/tabulous-images/ajax-loader.gif" alt="loading..." /></p>');
});

var sliderCount = 1;

$.fn.codaSlider = function(settings) {

	settings = $.extend({
		autoHeight: true,
		autoHeightEaseDuration: 1000,
		autoHeightEaseFunction: "easeInOutExpo",
		autoSlide: false,
		autoSlideInterval: 7000,
		autoSlideStopWhenClicked: true,
		crossLinking: true,
		dynamicArrows: true,
		dynamicArrowLeftText: "&#171; left",
		dynamicArrowRightText: "right &#187;",
		dynamicTabs: true,
		dynamicTabsAlign: "center",
		dynamicTabsPosition: "top",
		externalTriggerSelector: "a.xtrig",
		firstPanelToLoad: 1,
		panelTitleSelector: "h2.title",
		slideEaseDuration: 1000,
		slideEaseFunction: "easeInOutExpo"
	}, settings);
	
	return this.each(function(){
		
		// Uncomment the line below to test your preloader
		// alert("Testing preloader");
		
		var slider = $(this);
		
		// If we need arrows
		if (settings.dynamicArrows) {
			slider.parent().addClass("arrows");
			slider.before('<div class="coda-nav-left" id="coda-nav-left-' + sliderCount + '"><a href="#">' + settings.dynamicArrowLeftText + '</a></div>');
			slider.after('<div class="coda-nav-right" id="coda-nav-right-' + sliderCount + '"><a href="#">' + settings.dynamicArrowRightText + '</a></div>');
		};
		
		// Joe Workman - I changed the following lines to allow for fluid layouts with 100% widths.
		var panelWidth = slider.width();
		$(".panel", slider).css({ width: panelWidth });
		
		var panelCount = slider.find(".panel").size();
		var panelContainerWidth = panelWidth*panelCount;
		var navClicks = 0; // Used if autoSlideStopWhenClicked = true
		
		// Surround the collection of panel divs with a container div (wide enough for all panels to be lined up end-to-end)
		$('.panel', slider).wrapAll('<div class="panel-container"></div>');
		// Specify the width of the container div (wide enough for all panels to be lined up end-to-end)
		$(".panel-container", slider).css({ width: panelContainerWidth });
		
		// Specify the current panel.
		// If the loaded URL has a hash (cross-linking), we're going to use that hash to give the slider a specific starting position...
		if (settings.crossLinking && location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
			var currentPanel = parseInt(location.hash.slice(1));
			var offset = - (panelWidth*(currentPanel - 1));
			$('.panel-container', slider).css({ marginLeft: offset });
		// If that's not the case, check to see if we're supposed to load a panel other than Panel 1 initially...
		} else if (settings.firstPanelToLoad != 1 && settings.firstPanelToLoad <= panelCount) { 
			var currentPanel = settings.firstPanelToLoad;
			var offset = - (panelWidth*(currentPanel - 1));
			$('.panel-container', slider).css({ marginLeft: offset });
		// Otherwise, we'll just set the current panel to 1...
		} else { 
			var currentPanel = 1;
		};
			
		// Left arrow click
		$("#coda-nav-left-stacks_in_7_page0 a").click(function(){
			navClicks++;
			if (currentPanel == 1) {
				offset = - (panelWidth*(panelCount - 1));
				alterPanelHeight(panelCount - 1);
				currentPanel = panelCount;
				slider.siblings('.coda-nav').find('a.current').removeClass('current').parents('ul').find('li:last a').addClass('current');
			} else {
				currentPanel -= 1;
				alterPanelHeight(currentPanel - 1);
				offset = - (panelWidth*(currentPanel - 1));
				slider.siblings('.coda-nav').find('a.current').removeClass('current').parent().prev().find('a').addClass('current');
			};
			$('.panel-container', slider).animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
			if (settings.crossLinking) { location.hash = currentPanel }; // Change the URL hash (cross-linking)
			return false;
		});
			
		// Right arrow click
		$('#coda-nav-right-stacks_in_7_page0 a').click(function(){
			navClicks++;
			if (currentPanel == panelCount) {
				offset = 0;
				currentPanel = 1;
				alterPanelHeight(0);
				slider.siblings('.coda-nav').find('a.current').removeClass('current').parents('ul').find('a:eq(0)').addClass('current');
			} else {
				offset = - (panelWidth*currentPanel);
				alterPanelHeight(currentPanel);
				currentPanel += 1;
				slider.siblings('.coda-nav').find('a.current').removeClass('current').parent().next().find('a').addClass('current');
			};
			$('.panel-container', slider).animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
			if (settings.crossLinking) { location.hash = currentPanel }; // Change the URL hash (cross-linking)
			return false;
		});
		
		// If we need a dynamic menu
		if (settings.dynamicTabs) {
			var dynamicTabs = '<div class="coda-nav" id="coda-nav-' + sliderCount + '"><ul></ul></div>';
			switch (settings.dynamicTabsPosition) {
				case "bottom":
					slider.parent().append(dynamicTabs);
					break;
				default:
					slider.parent().prepend(dynamicTabs);
					break;
			};
			ul = $('#coda-nav-' + sliderCount + ' ul');
			// Create the nav items
			$('.panel', slider).each(function(n) {
				ul.append('<li class="tab' + (n+1) + '"><a class="tab_link" href="#' + (n+1) + '">' + $(this).find(settings.panelTitleSelector).text() + '</a></li>');												
			});
			// Joe Workman Added this if statement. This is a bug in the plugin IMHO.
			// If dynamicTabs are used but not DynamicArrows, then the Nav Width got set wrong.  
			if (settings.dynamicArrows) {
				navContainerWidth = slider.width() + slider.siblings('.coda-nav-left').width() + slider.siblings('.coda-nav-right').width();
			}
			else {
				navContainerWidth = slider.width();
			}
			ul.parent().css({ width: navContainerWidth });

			switch (settings.dynamicTabsAlign) {
				case "center":
				// Joe Workman completely changed this center logic to calculate the width of the ul then center it
					//ul.css({ width: ($("li", ul).width() + 2) * panelCount });
					//Joe Workman - I am setting the width of the coda-nav div to the width of the tabs. 
					var ul_width = 0;
					$('.coda-nav ul li').each(function(index) {
					    ul_width += $(this).outerWidth();
					});
					if ($.browser.msie) {
						$('.coda-nav').css('width', ul_width + panelCount);//IE Hack
					}
					else {
						$('.coda-nav').css('width', ul_width);						
					}
					$('.coda-nav').css('margin-left', 'auto');
					$('.coda-nav').css('margin-right', 'auto');
					break;
				case "right":
					//Joe Workman - I am setting the width of the coda-nav div to the width of the tabs. 
					var ul_width = 0;
					$('.coda-nav ul li').each(function(index) {
					    ul_width += $(this).outerWidth();
					});
					if ($.browser.msie) {
						$('.coda-nav').css('width', ul_width + panelCount);//IE Hack
					}
					else {
						$('.coda-nav').css('width', ul_width);						
					}
					$('.coda-nav').css('float','right');
					break;
				case "full":
				// Joe Workman - added this option to allow for full width. 
					$('.coda-nav ul li a').css('padding-left',0);
					$('.coda-nav ul li a').css('padding-right',0);
					var navWidth = $('.coda-nav').outerWidth();
					var tabWidth = Math.floor(navWidth/panelCount) - 1; //take into account 1px margin on each tab
					var lastTabWidth = tabWidth + 1; //last tab has no margin
					var remainder = navWidth - (lastTabWidth*panelCount);
					$('.coda-nav ul li a').css('width',tabWidth); 
					if ($.browser.msie) {
						$('.coda-nav ul li a').last().css('width', tabWidth+remainder ); // IE Sucks
					}
					else {
						$('.coda-nav ul li a').last().css('width', lastTabWidth+remainder ); // add the remainder to the last tab
					}
					break;
			};
		};
			
		// If we need a tabbed nav
		$('#coda-nav-' + sliderCount + ' a').each(function(z) {
			// What happens when a nav link is clicked
			$(this).bind("click", function() {
				navClicks++;
				$(this).addClass('current').parents('ul').find('a').not($(this)).removeClass('current');
				offset = - (panelWidth*z);
				alterPanelHeight(z);
				currentPanel = z + 1;
				$('.panel-container', slider).animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
				if (!settings.crossLinking) { return false }; // Don't change the URL hash unless cross-linking is specified
			});
		});
		
		// External triggers (anywhere on the page)
		$(settings.externalTriggerSelector).each(function() {
			// Make sure this only affects the targeted slider
			if (sliderCount == parseInt($(this).attr("rel").slice(12))) {
				$(this).bind("click", function() {
					navClicks++;
					targetPanel = parseInt($(this).attr("href").slice(1));
					offset = - (panelWidth*(targetPanel - 1));
					alterPanelHeight(targetPanel - 1);
					currentPanel = targetPanel;
					// Switch the current tab:
					slider.siblings('.coda-nav').find('a').removeClass('current').parents('ul').find('li:eq(' + (targetPanel - 1) + ') a').addClass('current');
					// Slide
					$('.panel-container', slider).animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
					if (!settings.crossLinking) { return false }; // Don't change the URL hash unless cross-linking is specified
				});
			};
		});
			
		// Specify which tab is initially set to "current". Depends on if the loaded URL had a hash or not (cross-linking).
		if (settings.crossLinking && location.hash && parseInt(location.hash.slice(1)) <= panelCount) {
			$("#coda-nav-" + sliderCount + " a:eq(" + (location.hash.slice(1) - 1) + ")").addClass("current");
		// If there's no cross-linking, check to see if we're supposed to load a panel other than Panel 1 initially...
		} else if (settings.firstPanelToLoad != 1 && settings.firstPanelToLoad <= panelCount) {
			$("#coda-nav-" + sliderCount + " a:eq(" + (settings.firstPanelToLoad - 1) + ")").addClass("current");
		// Otherwise we must be loading Panel 1, so make the first tab the current one.
		} else {
			$("#coda-nav-" + sliderCount + " a:eq(0)").addClass("current");
		};
		
		// Set the height of the first panel
		if (settings.autoHeight) {
			panelHeight = $('.panel:eq(' + (currentPanel - 1) + ')', slider).height();
			slider.css({ height: panelHeight });
		};
		
		// Trigger autoSlide
		if (settings.autoSlide) {
			slider.ready(function() {
				setTimeout(autoSlide,settings.autoSlideInterval);
			});
		};
		
		function alterPanelHeight(x) {
			if (settings.autoHeight) {
				panelHeight = $('.panel:eq(' + x + ')', slider).height()
				slider.animate({ height: panelHeight }, settings.autoHeightEaseDuration, settings.autoHeightEaseFunction);
			};
		};
		
		function autoSlide() {
			if (navClicks == 0 || !settings.autoSlideStopWhenClicked) {
				if (currentPanel == panelCount) {
					var offset = 0;
					currentPanel = 1;
				} else {
					var offset = - (panelWidth*currentPanel);
					currentPanel += 1;
				};
				alterPanelHeight(currentPanel - 1);
				// Switch the current tab:
				slider.siblings('.coda-nav').find('a').removeClass('current').parents('ul').find('li:eq(' + (currentPanel - 1) + ') a').addClass('current');
				// Slide:
				$('.panel-container', slider).animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
				setTimeout(autoSlide,settings.autoSlideInterval);
			};
		};
		
		// Kill the preloader
		$('.panel', slider).show().end().find("p.loading").remove();
		slider.removeClass("preload");
		
		sliderCount++;
	});
};

$(document).ready(function(){
	var bg_color = $('#stacks_in_7_page0').css('background-color');
	if (bg_color) { 
		$('#stacks_in_7_page0').css({'background-color': 'transparent'});	
		$('#stacks_in_7_page0 .coda-slider').css({'background-color': bg_color });	
	}
	if ('true' == 'false') {
		$('#stacks_in_7_page0 .coda-slider-wrapper').addClass('no_tabs');
	}
	if ('none' == 'none') {
		$('#stacks_in_7_page0 .coda-slider').removeClass('nav');
	}

	var bg_border_style = $('#stacks_in_7_page0').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color = $('#stacks_in_7_page0').css('border-bottom-color');
		var bg_border_top = $('#stacks_in_7_page0').css('border-top-width');
		var bg_border_right = $('#stacks_in_7_page0').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_7_page0').css('border-bottom-width');
		var bg_border_left = $('#stacks_in_7_page0').css('border-left-width');
		$('#stacks_in_7_page0').css({'border-width':0});	
		$('#coda-slider-stacks_in_7_page0').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
		});	
	}
	
	$("#coda-slider-stacks_in_7_page0").codaSlider({ 
		dynamicArrows: false, 
		dynamicTabsAlign: "full",
		panelTitleSelector: ".panel_title_stacks_in_7_page0",
		autoHeight: true,
		autoSlide: false,
		autoHeightEaseFunction: "easeInOutExpo",
		autoSlideInterval: 5000,
		autoSlideStopWhenClicked: true,
		dynamicTabs: true,
		dynamicTabsPosition: "top",
		slideEaseFunction: "easeInOutExpo"
	});
	// Ease Functions: http://www.robertpenner.com/easing/easing_demo.html
});

//-- End Tabulous Stack --//
	return stack;
})(stacks.stacks_in_7_page0);


// Javascript for stacks_in_110_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_110_page0 = {};

// 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_110_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;
	
//-- Google Maps Stack v1.0.5 by Joe Workman --//

function clean_location(str) {
	str = str ? str : 'San Francisco,CA';
	str = str.replace(/\<\s*br\s*\/\>/g,',');
	str = str.replace(/[\s]+/g,'+');
	str = str.replace(/\s*\,+\s*/g,',');
	return $.trim(str);
}
$(document).ready(function() {	
	var map_height = 300;
	var map_width = 600;
	var map_zoom = 16;
	var map_center = ''; 
	var map_type = 'roadmap'; //roadmap, satellite, hybrid, and terrain
	var marker_size = 'mid';
	var marker_color = '0080FF';
	var map_url = 'http://maps.google.com/maps/api/staticmap?sensor=false&size='+ map_width +'x'+ map_height +'&maptype='+ map_type +'&zoom='+ map_zoom;
	
	if ( 'true' == 'true' ) {
		// foreach marker add the following data to the map_url: &markers=size:mid|label:S|color:red|San+Jose,CA
		$('#marker_data_stacks_in_110_page0 li').each(function(index) {
		    var marker_url = '&markers=size:'+ marker_size +'|color:0x'+ marker_color +'|';
			var label = $.trim($(this).attr('data-label'));
			if (label != '') { marker_url += 'label:'+ label.substr(0,1) +'|'; }
			marker_url += clean_location($(this).attr('data-location'));
			map_url += marker_url;
		});
	}
	else {
		map_url += '&center='+ clean_location(map_center);
	}
	// Add the map to the page
	$('#stacks_in_110_page0').append('<img src="'+ map_url +'" id="map_stacks_in_110_page0" alt=""/>');
});

//-- End Google Maps Stack --//
	return stack;
})(stacks.stacks_in_110_page0);


// Javascript for stacks_in_151_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_151_page0 = {};

// 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_151_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;
	
// Load supporting cast of jQuery plugins that are needed...

//
// jQuery blockUI plugin - Version 2.33 (29-MAR-2010) - Copyright (c) 2007-2008 M. Alsup
//
(function(b){function s(c,a){var e=c==window,d=a&&a.message!==undefined?a.message:undefined;a=b.extend({},b.blockUI.defaults,a||{});a.overlayCSS=b.extend({},b.blockUI.defaults.overlayCSS,a.overlayCSS||{});var g=b.extend({},b.blockUI.defaults.css,a.css||{}),j=b.extend({},b.blockUI.defaults.themedCSS,a.themedCSS||{});d=d===undefined?a.message:d;e&&k&&o(window,{fadeOut:0});if(d&&typeof d!="string"&&(d.parentNode||d.jquery)){var h=d.jquery?d[0]:d,f={};b(c).data("blockUI.history",f);f.el=h;f.parent=h.parentNode;
f.display=h.style.display;f.position=h.style.position;f.parent&&f.parent.removeChild(h)}f=a.baseZ;var l=b.browser.msie||a.forceIframe?b('<iframe class="blockUI" style="z-index:'+f++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+a.iframeSrc+'"></iframe>'):b('<div class="blockUI" style="display:none"></div>');h=b('<div class="blockUI blockOverlay" style="z-index:'+f++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
f=b(a.theme&&e?'<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+f+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(a.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>':a.theme?'<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+f+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(a.title||
"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>':e?'<div class="blockUI blockMsg blockPage" style="z-index:'+f+';display:none;position:fixed"></div>':'<div class="blockUI blockMsg blockElement" style="z-index:'+f+';display:none;position:absolute"></div>');if(d)if(a.theme){f.css(j);f.addClass("ui-widget-content")}else f.css(g);if(!a.applyPlatformOpacityRules||!(b.browser.mozilla&&/Linux/.test(navigator.platform)))h.css(a.overlayCSS);h.css("position",e?"fixed":"absolute");
if(b.browser.msie||a.forceIframe)l.css("opacity",0);g=[l,h,f];var A=e?b("body"):b(c);b.each(g,function(){this.appendTo(A)});a.theme&&a.draggable&&b.fn.draggable&&f.draggable({handle:".ui-dialog-titlebar",cancel:"li"});g=B&&(!b.boxModel||b("object,embed",e?null:c).length>0);if(t||g){e&&a.allowBodyStretch&&b.boxModel&&b("html,body").css("height","100%");if((t||!b.boxModel)&&!e){g=n(c,"borderTopWidth");j=n(c,"borderLeftWidth");var u=g?"(0 - "+g+")":0,v=j?"(0 - "+j+")":0}b.each([l,h,f],function(p,i){i=
i[0].style;i.position="absolute";if(p<2){e?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+a.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"');e?i.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"');v&&i.setExpression("left",v);u&&i.setExpression("top",u)}else if(a.centerY){e&&
i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');i.marginTop=0}else if(!a.centerY&&e){p="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(a.css&&a.css.top?parseInt(a.css.top):0)+') + "px"';i.setExpression("top",p)}})}if(d){a.theme?f.find(".ui-widget-content").append(d):
f.append(d);if(d.jquery||d.nodeType)b(d).show()}if((b.browser.msie||a.forceIframe)&&a.showOverlay)l.show();if(a.fadeIn){g=a.onBlock?a.onBlock:q;l=a.showOverlay&&!d?g:q;g=d?g:q;a.showOverlay&&h._fadeIn(a.fadeIn,l);d&&f._fadeIn(a.fadeIn,g)}else{a.showOverlay&&h.show();d&&f.show();a.onBlock&&a.onBlock()}w(1,c,a);if(e){k=f[0];m=b(":input:enabled:visible",k);a.focusInput&&setTimeout(x,20)}else C(f[0],a.centerX,a.centerY);if(a.timeout){d=setTimeout(function(){e?b.unblockUI(a):b(c).unblock(a)},a.timeout);
b(c).data("blockUI.timeout",d)}}function o(c,a){var e=c==window,d=b(c),g=d.data("blockUI.history"),j=d.data("blockUI.timeout");if(j){clearTimeout(j);d.removeData("blockUI.timeout")}a=b.extend({},b.blockUI.defaults,a||{});w(0,c,a);var h;h=e?b("body").children().filter(".blockUI").add("body > .blockUI"):b(".blockUI",c);if(e)k=m=null;if(a.fadeOut){h.fadeOut(a.fadeOut);setTimeout(function(){y(h,g,a,c)},a.fadeOut)}else y(h,g,a,c)}function y(c,a,e,d){c.each(function(){this.parentNode&&this.parentNode.removeChild(this)});
if(a&&a.el){a.el.style.display=a.display;a.el.style.position=a.position;a.parent&&a.parent.appendChild(a.el);b(d).removeData("blockUI.history")}typeof e.onUnblock=="function"&&e.onUnblock(d,e)}function w(c,a,e){var d=a==window;a=b(a);if(!(!c&&(d&&!k||!d&&!a.data("blockUI.isBlocked")))){d||a.data("blockUI.isBlocked",c);!e.bindEvents||c&&!e.showOverlay||(c?b(document).bind("mousedown mouseup keydown keypress",e,z):b(document).unbind("mousedown mouseup keydown keypress",z))}}function z(c){if(c.keyCode&&
c.keyCode==9)if(k&&c.data.constrainTabKey){var a=m,e=c.shiftKey&&c.target==a[0];if(!c.shiftKey&&c.target==a[a.length-1]||e){setTimeout(function(){x(e)},10);return false}}if(b(c.target).parents("div.blockMsg").length>0)return true;return b(c.target).parents().children().filter("div.blockUI").length==0}function x(c){if(m)(c=m[c===true?m.length-1:0])&&c.focus()}function C(c,a,e){var d=c.parentNode,g=c.style,j=(d.offsetWidth-c.offsetWidth)/2-n(d,"borderLeftWidth");c=(d.offsetHeight-c.offsetHeight)/2-
n(d,"borderTopWidth");if(a)g.left=j>0?j+"px":"0";if(e)g.top=c>0?c+"px":"0"}function n(c,a){return parseInt(b.css(c,a))||0}if(/1\.(0|1|2)\.(0|1|2)/.test(b.fn.jquery)||/^1.1/.test(b.fn.jquery))alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+b.fn.jquery);else{b.fn._fadeIn=b.fn.fadeIn;var q=function(){},r=document.documentMode||0,B=b.browser.msie&&(b.browser.version<8&&!r||r<8),t=b.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!r;b.blockUI=function(c){s(window,c)};b.unblockUI=
function(c){o(window,c)};b.growlUI=function(c,a,e,d){var g=b('<div class="growlUI"></div>');c&&g.append("<h1>"+c+"</h1>");a&&g.append("<h2>"+a+"</h2>");if(e==undefined)e=3E3;b.blockUI({message:g,fadeIn:700,fadeOut:1E3,centerY:false,timeout:e,showOverlay:false,onUnblock:d,css:b.blockUI.defaults.growlCSS})};b.fn.block=function(c){return this.unblock({fadeOut:0}).each(function(){if(b.css(this,"position")=="static")this.style.position="relative";if(b.browser.msie)this.style.zoom=1;s(this,c)})};b.fn.unblock=
function(c){return this.each(function(){o(this,c)})};b.blockUI.version=2.33;b.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",
opacity:0.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1E3,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4};var k=null,
m=[]}})(jQuery);




/*
 * jQuery Form Plugin
 * version: 2.84 (12-AUG-2011)
 * @requires jQuery v1.3.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this;}var method,action,url,$form=this;if(typeof options=="function"){options={success:options};}method=this.attr("method");action=this.attr("action");url=(typeof action==="string")?$.trim(action):"";url=url||window.location.href||"";if(url){url=(url.match(/^([^#]+)/)||[])[1];}options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},options);var veto={};this.trigger("form-pre-serialize",[this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log("ajaxSubmit: submit aborted via beforeSerialize callback");return this;}var n,v,a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(n in options.data){if($.isArray(options.data[n])){for(var k in options.data[n]){a.push({name:n,value:options.data[n][k]});}}else{v=options.data[n];v=$.isFunction(v)?v():v;a.push({name:n,value:v});}}}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[a,this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var q=$.param(a);if(options.type.toUpperCase()=="GET"){options.url+=(options.url.indexOf("?")>=0?"&":"?")+q;options.data=null;}else{options.data=q;}var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}if(options.clearForm){callbacks.push(function(){$form.clearForm();});}if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?"replaceWith":"html";$(options.target)[fn](data).each(oldSuccess,arguments);});}else{if(options.success){callbacks.push(options.success);}}options.success=function(data,status,xhr){var context=options.context||options;for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(context,[data,status,xhr||$form,$form]);}};var fileInputs=$("input:file",this).length>0;var mp="multipart/form-data";var multipart=($form.attr("enctype")==mp||$form.attr("encoding")==mp);if(options.iframe!==false&&(fileInputs||options.iframe||multipart)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){fileUpload(a);});}else{fileUpload(a);}}else{if($.browser.msie&&method=="get"){var ieMeth=$form[0].getAttribute("method");if(typeof ieMeth==="string"){options.type=ieMeth;}}$.ajax(options);}this.trigger("form-submit-notify",[this,options]);return this;function fileUpload(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var useProp=!!$.fn.prop;if(a){for(i=0;i<a.length;i++){el=$(form[a[i].name]);el[useProp?"prop":"attr"]("disabled",false);}}if($(":input[name=submit],:input[id=submit]",form).length){alert('Error: Form elements must not have name or id of "submit".');return;}s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id="jqFormIO"+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr("name");if(n==null){$io.attr("name",id);}else{id=n;}}else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />');$io.css({position:"absolute",top:"-1000px",left:"-1000px"});}io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==="timeout"?"timeout":"aborted");log("aborting upload... "+e);this.aborted=1;$io.attr("src",s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,e,status);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,s]);}if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}return;}if(xhr.aborted){return;}sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+".x"]=form.clk_x;s.extraData[n+".y"]=form.clk_y;}}}var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc;}function doSubmit(){var t=$form.attr("target"),a=$form.attr("action");form.setAttribute("target",id);if(!method){form.setAttribute("method","POST");}if(a!=s.url){form.setAttribute("action",s.url);}if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);}function checkState(){try{var state=getDoc(io).readyState;log("state = "+state);if(state.toLowerCase()=="uninitialized"){setTimeout(checkState,50);}}catch(e){log("Server abort: ",e," (",e.name,")");cb(SERVER_ABORT);timeoutHandle&&clearTimeout(timeoutHandle);timeoutHandle=undefined;}}var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){extraInputs.push($('<input type="hidden" name="'+n+'" />').attr("value",s.extraData[n]).appendTo(form)[0]);}}if(!s.iframeTarget){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);}setTimeout(checkState,15);form.submit();}finally{form.setAttribute("action",a);if(t){form.setAttribute("target",t);}else{$form.removeAttr("target");}$(extraInputs).remove();}}if(s.forceSync){doSubmit();}else{setTimeout(doSubmit,10);}var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;}try{doc=getDoc(io);}catch(ex){log("cannot access response document: ",ex);e=SERVER_ABORT;}if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort("timeout");return;}else{if(e==SERVER_ABORT&&xhr){xhr.abort("server abort");return;}}if(!doc||doc.location.href==s.iframeSrc){if(!timedOut){return;}}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var status="success",errMsg;try{if(timedOut){throw"timeout";}var isXml=s.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);log("isXml="+isXml);if(!isXml&&window.opera&&(doc.body==null||doc.body.innerHTML=="")){if(--domCheckCount){log("requeing onLoad callback, DOM not available");setTimeout(cb,250);return;}}var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml){s.dataType="xml";}xhr.getResponseHeader=function(header){var headers={"content-type":s.dataType};return headers[header];};if(docRoot){xhr.status=Number(docRoot.getAttribute("status"))||xhr.status;xhr.statusText=docRoot.getAttribute("statusText")||xhr.statusText;}var dt=s.dataType||"";var scr=/(json|script|text)/.test(dt.toLowerCase());if(scr||s.textarea){var ta=doc.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute("status"))||xhr.status;xhr.statusText=ta.getAttribute("statusText")||xhr.statusText;}else{if(scr){var pre=doc.getElementsByTagName("pre")[0];var b=doc.getElementsByTagName("body")[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerHTML;}else{if(b){xhr.responseText=b.innerHTML;}}}}}else{if(s.dataType=="xml"&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}}try{data=httpData(xhr,s.dataType,s);}catch(e){status="parsererror";xhr.error=errMsg=(e||status);}}catch(e){log("error caught: ",e);status="error";xhr.error=errMsg=(e||status);}if(xhr.aborted){log("upload aborted");status=null;}if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?"success":"error";}if(status==="success"){s.success&&s.success.call(s.context,data,"success",xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}else{if(status){if(errMsg==undefined){errMsg=xhr.statusText;}s.error&&s.error.call(s.context,xhr,status,errMsg);g&&$.event.trigger("ajaxError",[xhr,s,errMsg]);}}g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}s.complete&&s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout){clearTimeout(timeoutHandle);}setTimeout(function(){if(!s.iframeTarget){$io.remove();}xhr.responseXML=null;},100);}var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return(doc&&doc.documentElement&&doc.documentElement.nodeName!="parsererror")?doc:null;};var parseJSON=$.parseJSON||function(s){return window["eval"]("("+s+")");};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror"){$.error&&$.error("parsererror");}if(s&&s.dataFilter){data=s.dataFilter(data,type);}if(typeof data==="string"){if(type==="json"||!type&&ct.indexOf("json")>=0){data=parseJSON(data);}else{if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}}}return data;};}};$.fn.ajaxForm=function(options){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(options);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.ajaxFormUnbind().bind("submit.form-plugin",function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options);}}).bind("click.form-plugin",function(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(":submit");if(t.length==0){return;}target=t[0];}var form=this;form.clk=target;if(target.type=="image"){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin");};$.fn.formToArray=function(semantic){var a=[];if(this.length===0){return a;}var form=this[0];var els=semantic?form.getElementsByTagName("*"):form.elements;if(!els){return a;}var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});}continue;}v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=="image"){a.push({name:n,value:$input.val()});a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});}}return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(successful===undefined){successful=true;}if(successful&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var index=el.selectedIndex;if(index<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;}if(one){return v;}a.push(v);}}return a;}return $(el).val();};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select===undefined){select=true;}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=select;}else{if(this.tagName.toLowerCase()=="option"){var $sel=$(this).parent("select");if(select&&$sel[0]&&$sel[0].type=="select-one"){$sel.find("option").selected(false);}this.selected=select;}}});};function log(){var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(msg);}else{if(window.opera&&window.opera.postError){window.opera.postError(msg);}}}})(jQuery);

/*

Uniform v1.7.5
Copyright © 2009 Josh Pyles / Pixelmatrix Design LLC
http://pixelmatrixdesign.com

Requires jQuery 1.4 or newer

Much thanks to Thomas Reynolds and Buck Wilson for their help and advice on this

Disabling text selection is made possible by Mathias Bynens <http://mathiasbynens.be/>
and his noSelect plugin. <http://github.com/mathiasbynens/noSelect-jQuery-Plugin>

Also, thanks to David Kaneda and Eugene Bond for their contributions to the plugin

License:
MIT License - http://www.opensource.org/licenses/mit-license.php

Enjoy!

*/
(function(a){a.uniform={options:{selectClass:"selector",radioClass:"radio",checkboxClass:"checker",fileClass:"uploader",filenameClass:"filename",fileBtnClass:"action",fileDefaultText:"No file selected",fileBtnText:"Choose File",checkedClass:"checked",focusClass:"focus",disabledClass:"disabled",buttonClass:"button",activeClass:"active",hoverClass:"hover",useID:true,idPrefix:"uniform",resetSelector:false,autoHide:true},elements:[]};if(a.browser.msie&&a.browser.version<7){a.support.selectOpacity=false}else{a.support.selectOpacity=true}a.fn.uniform=function(k){k=a.extend(a.uniform.options,k);var d=this;if(k.resetSelector!=false){a(k.resetSelector).mouseup(function(){function l(){a.uniform.update(d)}setTimeout(l,10)})}function j(l){$el=a(l);$el.addClass($el.attr("type"));b(l)}function g(l){a(l).addClass("uniform");b(l)}function i(o){var m=a(o);var p=a("<div>"),l=a("<span>");p.addClass(k.buttonClass);if(k.useID&&m.attr("id")!=""){p.attr("id",k.idPrefix+"-"+m.attr("id"))}var n;if(m.is("a")||m.is("button")){n=m.text()}else{if(m.is(":submit")||m.is(":reset")||m.is("input[type=button]")){n=m.attr("value")}}n=n==""?m.is(":reset")?"Reset":"Submit":n;l.html(n);m.css("opacity",0);m.wrap(p);m.wrap(l);p=m.closest("div");l=m.closest("span");if(m.is(":disabled")){p.addClass(k.disabledClass)}p.bind({"mouseenter.uniform":function(){p.addClass(k.hoverClass)},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(r){if(a(r.target).is("span")||a(r.target).is("div")){if(o[0].dispatchEvent){var q=document.createEvent("MouseEvents");q.initEvent("click",true,true);o[0].dispatchEvent(q)}else{o[0].click()}}}});o.bind({"focus.uniform":function(){p.addClass(k.focusClass)},"blur.uniform":function(){p.removeClass(k.focusClass)}});a.uniform.noSelect(p);b(o)}function e(o){var m=a(o);var p=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){p.hide()}p.addClass(k.selectClass);if(k.useID&&o.attr("id")!=""){p.attr("id",k.idPrefix+"-"+o.attr("id"))}var n=o.find(":selected:first");if(n.length==0){n=o.find("option:first")}l.html(n.html());o.css("opacity",0);o.wrap(p);o.before(l);p=o.parent("div");l=o.siblings("span");o.bind({"change.uniform":function(){l.text(o.find(":selected").html());p.removeClass(k.activeClass)},"focus.uniform":function(){p.addClass(k.focusClass)},"blur.uniform":function(){p.removeClass(k.focusClass);p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"mouseenter.uniform":function(){p.addClass(k.hoverClass)},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);p.removeClass(k.activeClass)},"keyup.uniform":function(){l.text(o.find(":selected").html())}});if(a(o).attr("disabled")){p.addClass(k.disabledClass)}a.uniform.noSelect(l);b(o)}function f(n){var m=a(n);var o=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){o.hide()}o.addClass(k.checkboxClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))}a(n).wrap(o);a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)}else{l.addClass(k.checkedClass)}},"mousedown.uniform touchbegin.uniform":function(){o.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform":function(){o.addClass(k.hoverClass)},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function c(n){var m=a(n);var o=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){o.hide()}o.addClass(k.radioClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))}a(n).wrap(o);a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)}else{var p=k.radioClass.split(" ")[0];a("."+p+" span."+k.checkedClass+":has([name='"+a(n).attr("name")+"'])").removeClass(k.checkedClass);l.addClass(k.checkedClass)}},"mousedown.uniform touchend.uniform":function(){if(!a(n).is(":disabled")){o.addClass(k.activeClass)}},"mouseup.uniform touchbegin.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform touchend.uniform":function(){o.addClass(k.hoverClass)},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function h(q){var o=a(q);var r=a("<div />"),p=a("<span>"+k.fileDefaultText+"</span>"),m=a("<span>"+k.fileBtnText+"</span>");if(!o.css("display")=="none"&&k.autoHide){r.hide()}r.addClass(k.fileClass);p.addClass(k.filenameClass);m.addClass(k.fileBtnClass);if(k.useID&&o.attr("id")!=""){r.attr("id",k.idPrefix+"-"+o.attr("id"))}o.wrap(r);o.after(m);o.after(p);r=o.closest("div");p=o.siblings("."+k.filenameClass);m=o.siblings("."+k.fileBtnClass);if(!o.attr("size")){var l=r.width();o.attr("size",l/10)}var n=function(){var s=o.val();if(s===""){s=k.fileDefaultText}else{s=s.split(/[\/\\]+/);s=s[(s.length-1)]}p.text(s)};n();o.css("opacity",0).bind({"focus.uniform":function(){r.addClass(k.focusClass)},"blur.uniform":function(){r.removeClass(k.focusClass)},"mousedown.uniform":function(){if(!a(q).is(":disabled")){r.addClass(k.activeClass)}},"mouseup.uniform":function(){r.removeClass(k.activeClass)},"mouseenter.uniform":function(){r.addClass(k.hoverClass)},"mouseleave.uniform":function(){r.removeClass(k.hoverClass);r.removeClass(k.activeClass)}});if(a.browser.msie){o.bind("click.uniform.ie7",function(){setTimeout(n,0)})}else{o.bind("change.uniform",n)}if(o.attr("disabled")){r.addClass(k.disabledClass)}a.uniform.noSelect(p);a.uniform.noSelect(m);b(q)}a.uniform.restore=function(l){if(l==undefined){l=a(a.uniform.elements)}a(l).each(function(){if(a(this).is(":checkbox")){a(this).unwrap().unwrap()}else{if(a(this).is("select")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is(":radio")){a(this).unwrap().unwrap()}else{if(a(this).is(":file")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is("button, :submit, :reset, a, input[type='button']")){a(this).unwrap().unwrap()}}}}}a(this).unbind(".uniform");a(this).css("opacity","1");var m=a.inArray(a(l),a.uniform.elements);a.uniform.elements.splice(m,1)})};function b(l){l=a(l).get();if(l.length>1){a.each(l,function(m,n){a.uniform.elements.push(n)})}else{a.uniform.elements.push(l)}}a.uniform.noSelect=function(l){function m(){return false}a(l).each(function(){this.onselectstart=this.ondragstart=m;a(this).mousedown(m).css({MozUserSelect:"none"})})};a.uniform.update=function(l){if(l==undefined){l=a(a.uniform.elements)}l=a(l);l.each(function(){var n=a(this);if(n.is("select")){var m=n.siblings("span");var p=n.parent("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.html(n.find(":selected").html());if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":checkbox")){var m=n.closest("span");var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);if(n.is(":checked")){m.addClass(k.checkedClass)}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":radio")){var m=n.closest("span");var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);if(n.is(":checked")){m.addClass(k.checkedClass)}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":file")){var p=n.parent("div");var o=n.siblings(k.filenameClass);btnTag=n.siblings(k.fileBtnClass);p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);o.text(n.val());if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":submit")||n.is(":reset")||n.is("button")||n.is("a")||l.is("input[type=button]")){var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}}}}}})};return this.each(function(){if(a.support.selectOpacity){var l=a(this);if(l.is("select")){if(l.attr("multiple")!=true){if(l.attr("size")==undefined||l.attr("size")<=1){e(l)}}}else{if(l.is(":checkbox")){f(l)}else{if(l.is(":radio")){c(l)}else{if(l.is(":file")){h(l)}else{if(l.is(":text, :password, input[type='email']")){j(l)}else{if(l.is("textarea")){g(l)}else{if(l.is("a")||l.is(":submit")||l.is(":reset")||l.is("button")||l.is("input[type=button]")){i(l)}}}}}}}}})}})(jQuery);


//
// Copyright (c) 2011; Inc.
// formsnap Javascript 
// Modified 12-12-2011 02:19:35 PM
//

function stacks_in_151_page0_formsnap($) {



//----------------------------------------------------------//
// + SET VARS   
//----------------------------------------------------------//


    // CSS class names
    var requiredClass   = 'required';   // class for required inputs
    var errorClass      = 'error';      // class for inline error messages (invalid coupon, etc)
    var incompleteClass = 'incomplete'; // class for required inputs that fail validation
    
    // Redirects
    var redirectOnSuccess = false;
    var successUrl 		= '';
    var redirectOnError = false;
    var errorUrl 		= '';
    
    // What form class to bind to
    var formSelector = '#stacks_in_151_page0 .formsnap-form';
    var outputSelector = '#stacks_in_151_page0 div.formsnap-output';
    var requiredTextInputSelector = formSelector + ' input.' + requiredClass;
    var recaptcha_public_key = ('' == '') ? '6LcJG8ESAAAAAH8FTVf0Sq8ePv8ienj8iGW7woC2' : '';
    


// clear default block styles
$.blockUI.defaults.css = {};
$.blockUI.defaults.centerY = false;
$.blockUI.defaults.overlayCSS = { backgroundColor: '#000', opacity: '0.3' };


$.blockAndSpin = function() {
	$.blockUI({ message: null });
	$('body').fancyLoad();
};
$.unblockAndSpin = function() {
	$.unblockUI();
	$('body').fancyLoad('stop');
};
$.fn.fancyLoad = function(opt) {
	return this.each(function() {
		var $this = $(this);
		var timeout, $fancy = $this.find('.ydfs-loader');
		if (opt == 'stop') {
			if ($fancy.length) {
				var timeout = $fancy.hide().data('fancy-timeout');
				clearInterval(timeout);
			}
			return;
		}
		if ($fancy.length) {
			timeout = $fancy.hide().data('fancy-timeout');
			clearInterval(timeout);
		}
		else {
			var markup = '<div class="ydfs-loader"><div></div></div>';
			$fancy = $(markup).appendTo(this);
			if ($.browser.msie)
				$fancy.find('div').fixPNG();
		}

		var frame = 1, w = $this.width(), h = $this.height();
		h += $this.scrollTop();
		$fancy.css({'left': ((w - 40) / 2), 'top': ((h - 80) / 2)}).show();

		timeout = setInterval(function() {
			$fancy.find('div').css('top', (frame * -40) + 'px');
			frame = (frame + 1) % 12;
		}, 66);
		$fancy.data('fancy-timeout', timeout);
	});
};


$.fn.fixPNG = function() {
	return this.each(function () {
		var image = $(this).css('backgroundImage');

		if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
			image = RegExp.$1;
			$(this).css({
				'backgroundImage': 'none',
				'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')"
			}).each(function () {
				var position = $(this).css('position');
				if (position != 'absolute' && position != 'relative')
					$(this).css('position', 'relative');
			});
		}
	});
};


//
// bootstrap
//

$(document).ready(function() {
	
	// get/set error message from parent page
	var formSubmitErrorMessage = '<h3>' + $(formSelector +' input[name="ydfs_error"]').val() + '</h3>';
	var OKbutton = '<button alt="OK" id="block-button" class="hud-button" >' + $(formSelector +' input[name="ok_button"]').val() + '</button>';

   
	$(formSelector).submit(function(e){
		e.preventDefault();
		$('#stacks_in_151_page0 label').removeClass('alert');
		submitForm.apply(this);
		return false;
	});
	
	// for use with reset image type button
	$(formSelector + " .formsnap_reset").click(function() {
	   $(this).closest('form').resetForm();
	   
	   
	   
	});
	
   //----------------------------------------------------------//
   // + AJAX METHODS   
   //----------------------------------------------------------//	
	function submitForm() {
		$.blockAndSpin();
		$(this).ajaxSubmit({
			type:	'POST',
			data: { ajax: true },
			timeout: 60000, // 60 seconds
			success: onSubmitSuccess,
			error: onSubmitError
		});
	};
		 
   //----------------------------------------------------------//
   // + CALLBACKS	
   //----------------------------------------------------------//
	 
	function onSubmitError() {
		$.unblockAndSpin();
		$.blockUI({ message : formSubmitErrorMessage + '<p>'+OKbutton+'</p>' });
		$('#block-button', '.blockMsg').click($.unblockUI);
		
		$('label').removeClass('alert');
	};
	 
	function onSubmitSuccess(responseText, statusText, xhr, $form) {
		var rs = $(responseText).find(outputSelector).html();
		var json = $.parseJSON(rs);
		var result = json.result;
		var msg = json.msg;
			
		// redirect?
		if(result == 'good')
		{
			// reset form if result is good...
			$(formSelector).resetForm();
			
			
				
				
				if(redirectOnSuccess){
				
					$('body').fancyLoad('stop');
					$.blockUI({ message :  msg });
					setTimeout(successRedirectUser, 5000); // 5 seconds
					
				}else{
					
					$.unblockAndSpin();
					$.blockUI({ message :  msg + '<p>' + OKbutton + '</p>' });
					$('#block-button', '.blockMsg').click($.unblockUI);
					
				}
				
		}else{
			
				if(redirectOnError) {
					
					$('body').fancyLoad('stop');
					$.blockUI({ message :  msg });
					setTimeout(errorRedirectUser, 5000); // 5 seconds
					
				}else{
					
					// loop thru required fields and apply class to them...
					$.each(json.required, function(key,value) { 
						$("#stacks_in_151_page0 label[for="+value+"]").addClass('alert');  
					});
					
					
					$.unblockAndSpin();
					$.blockUI({ message :  msg + '<p>' + OKbutton + '</p>' });
					$('#block-button', '.blockMsg').click($.unblockUI);
					
				}
					
				
		}
			
		
	}; 
	 
	function successRedirectUser(){
		window.location = successUrl;
	}
	 
	function errorRedirectUser(){
		window.location = errorUrl;
	}
		
});


$(window).load(function(){

	
	
	  
	 
	   
	
	// Make sure everything is entered....
	var from_name	= 'Sweatshop Website';
	var from_email	= 'admin@seamstress.com.au';
	var to_email	= 'david@seamstress.com.au, bookings@seamstress.com.au, tallykonstas@gmail.com';
	var reply_to	= 'email';
	var subject_item	= 'subject';
	var donotsend  = 'false';
	
	if(!from_name && donotsend != 'true')
		$('#stacks_in_151_page0 .formsnap-php').before('<p class="ydfs-error">A <b>From Name</b> is Required for Form to Function Properly.</p>');
	
	if(!from_email && donotsend != 'true')
		$('#stacks_in_151_page0 .formsnap-php').before('<p class="ydfs-error">A Valid <b>From Email Address</b> is Required for Form to Function Properly.</p>');
	
	if(!to_email && donotsend != 'true')
		$('#stacks_in_151_page0 .formsnap-php').before('<p class="ydfs-error">A Valid <b>To Email Address</b> is Required for Form to Function Properly.</p>');	
		
	if (($('#stacks_in_151_page0 #'+ reply_to ).length < 1 || !reply_to ) && donotsend != 'true' )
		$('#stacks_in_151_page0 .formsnap-php').before('<p class="ydfs-error">A <b>Reply To Item</b> is Required for Form to Function Properly.</p>');
		
	if (($('#stacks_in_151_page0 #'+ subject_item ).length < 1 || !subject_item) && donotsend != 'true' )
		$('#stacks_in_151_page0 .formsnap-php').before('<p class="ydfs-error">A <b>Subject Item</b> is Required for Form to Function Properly.</p>');
});

}; // stacks_in_151_page0_formsnap fn

stacks_in_151_page0_formsnap($);
	return stack;
})(stacks.stacks_in_151_page0);


// Javascript for stacks_in_62_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_62_page0 = {};

// 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_62_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;
	
/**
 *
 * Date picker
 * Author: Stefan Petre www.eyecon.ro
 * 
 * Dual licensed under the MIT and GPL licenses
 * 
 */
(function(f){var q=function(){var q={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},z='<td>,<table cellspacing="0" cellpadding="0">,<thead>,<tr>,<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>,<th colspan="6" class="datepickerMonth"><a href="#"><span></span></a></th>,<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>,</tr>,<tr class="datepickerDoW">,<th><span><%=week%></span></th>,<th><span><%=day1%></span></th>,<th><span><%=day2%></span></th>,<th><span><%=day3%></span></th>,<th><span><%=day4%></span></th>,<th><span><%=day5%></span></th>,<th><span><%=day6%></span></th>,<th><span><%=day7%></span></th>,</tr>,</thead>,</table></td>'.split(","),
A='<tbody class="datepickerDays">,<tr>,<th class="datepickerWeek"><a href="#"><span><%=weeks[0].week%></span></a></th>,<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>,<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>,<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>,<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>,<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>,<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>,<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>,</tr>,<tr>,<th class="datepickerWeek"><a href="#"><span><%=weeks[1].week%></span></a></th>,<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>,<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>,<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>,<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>,<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>,<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>,<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>,</tr>,<tr>,<th class="datepickerWeek"><a href="#"><span><%=weeks[2].week%></span></a></th>,<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>,<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>,<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>,<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>,<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>,<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>,<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>,</tr>,<tr>,<th class="datepickerWeek"><a href="#"><span><%=weeks[3].week%></span></a></th>,<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>,<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>,<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>,<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>,<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>,<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>,<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>,</tr>,<tr>,<th class="datepickerWeek"><a href="#"><span><%=weeks[4].week%></span></a></th>,<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>,<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>,<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>,<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>,<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>,<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>,<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>,</tr>,<tr>,<th class="datepickerWeek"><a href="#"><span><%=weeks[5].week%></span></a></th>,<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>,<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>,<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>,<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>,<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>,<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>,<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>,</tr>,</tbody>'.split(","),
v='<tbody class="<%=className%>">,<tr>,<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>,</tr>,<tr>,<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>,</tr>,<tr>,<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>,<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>,</tr>,</tbody>'.split(","),
B={flat:!1,starts:1,prev:"&#9664;",next:"&#9654;",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday".split(","),daysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun".split(","),daysMin:"Su,Mo,Tu,We,Th,Fr,Sa,Su".split(","),months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),
monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekMin:"wk"}},r=function(a){var d=f(a).data("datepicker"),a=f(a),c=Math.floor(d.calendars/2),b,e,g,m,j=0,h,i,l,n,o;a.find("td>table tbody").remove();for(var k=0;k<d.calendars;k++){b=new Date(d.current);b.addMonths(-c+k);o=a.find("table").eq(k+1);switch(o[0].className){case "datepickerViewDays":g=t(b,"B, Y");break;case "datepickerViewMonths":g=b.getFullYear();break;case "datepickerViewYears":g=b.getFullYear()-6+" - "+(b.getFullYear()+
5)}o.find("thead tr:first th:eq(1) span").text(g);g=b.getFullYear()-6;e={data:[],className:"datepickerYears"};for(m=0;12>m;m++)e.data.push(g+m);n=tmpl(v.join(""),e);b.setDate(1);e={weeks:[],test:10};m=b.getMonth();g=(b.getDay()-d.starts)%7;b.addDays(-(g+(0>g?7:0)));for(j=0;42>j;){i=parseInt(j/7,10);l=j%7;e.weeks[i]||(h=b.getWeekNumber(),e.weeks[i]={week:h,days:[]});e.weeks[i].days[l]={text:b.getDate(),classname:[]};m!=b.getMonth()&&e.weeks[i].days[l].classname.push("datepickerNotInMonth");0==b.getDay()&&
e.weeks[i].days[l].classname.push("datepickerSunday");6==b.getDay()&&e.weeks[i].days[l].classname.push("datepickerSaturday");h=d.onRender(b);var p=b.valueOf();(h.selected||d.date==p||-1<f.inArray(p,d.date)||"range"==d.mode&&p>=d.date[0]&&p<=d.date[1])&&e.weeks[i].days[l].classname.push("datepickerSelected");h.disabled&&e.weeks[i].days[l].classname.push("datepickerDisabled");h.className&&e.weeks[i].days[l].classname.push(h.className);e.weeks[i].days[l].classname=e.weeks[i].days[l].classname.join(" ");
j++;b.addDays(1)}n=tmpl(A.join(""),e)+n;e={data:d.locale.monthsShort,className:"datepickerMonths"};n=tmpl(v.join(""),e)+n;o.append(n)}},s=function(a,d){if(a.constructor==Date)return new Date(a);for(var c=a.split(/\W+/),b=d.split(/\W+/),e,g,f,j,h,i=new Date,l=0;l<c.length;l++)switch(b[l]){case "d":case "e":e=parseInt(c[l],10);break;case "m":g=parseInt(c[l],10)-1;break;case "Y":case "y":f=parseInt(c[l],10);f+=100<f?0:29>f?2E3:1900;break;case "H":case "I":case "k":case "l":j=parseInt(c[l],10);break;
case "P":case "p":/pm/i.test(c[l])&&12>j?j+=12:/am/i.test(c[l])&&12<=j&&(j-=12);break;case "M":h=parseInt(c[l],10)}return new Date(void 0===f?i.getFullYear():f,void 0===g?i.getMonth():g,void 0===e?i.getDate():e,void 0===j?i.getHours():j,void 0===h?i.getMinutes():h,0)},t=function(a,d){var c=a.getMonth(),b=a.getDate(),e=a.getFullYear();a.getWeekNumber();var f=a.getDay(),m=a.getHours(),j=12<=m,h=j?m-12:m,i=a.getDayOfYear();0==h&&(h=12);for(var l=a.getMinutes(),n=a.getSeconds(),o=d.split(""),k,p=0;p<
o.length;p++){k=o[p];switch(o[p]){case "a":k=a.getDayName();break;case "A":k=a.getDayName(!0);break;case "b":k=a.getMonthName();break;case "B":k=a.getMonthName(!0);break;case "C":k=1+Math.floor(e/100);break;case "d":k=10>b?"0"+b:b;break;case "e":k=b;break;case "H":k=10>m?"0"+m:m;break;case "I":k=10>h?"0"+h:h;break;case "j":k=100>i?10>i?"00"+i:"0"+i:i;break;case "k":k=m;break;case "l":k=h;break;case "m":k=9>c?"0"+(1+c):1+c;break;case "M":k=10>l?"0"+l:l;break;case "p":case "P":k=j?"PM":"AM";break;case "s":k=
Math.floor(a.getTime()/1E3);break;case "S":k=10>n?"0"+n:n;break;case "u":k=f+1;break;case "w":k=f;break;case "y":k=(""+e).substr(2,2);break;case "Y":k=e}o[p]=k}return o.join("")},C=function(a){if(!Date.prototype.tempDate)Date.prototype.tempDate=null,Date.prototype.months=a.months,Date.prototype.monthsShort=a.monthsShort,Date.prototype.days=a.days,Date.prototype.daysShort=a.daysShort,Date.prototype.getMonthName=function(a){return this[a?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=
function(a){return this[a?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(a){this.setDate(this.getDate()+a);this.tempDate=this.getDate()},Date.prototype.addMonths=function(a){if(null==this.tempDate)this.tempDate=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+a);this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(a){if(null==this.tempDate)this.tempDate=this.getDate();this.setDate(1);this.setFullYear(this.getFullYear()+a);this.setDate(Math.min(this.tempDate,
this.getMaxDays()))},Date.prototype.getMaxDays=function(){var a=new Date(Date.parse(this)),c=28,b;b=a.getMonth();for(c=28;a.getMonth()==b;)c++,a.setDate(c);return c-1},Date.prototype.getFirstDay=function(){var a=new Date(Date.parse(this));a.setDate(1);return a.getDay()},Date.prototype.getWeekNumber=function(){var a=new Date(this);a.setDate(a.getDate()-(a.getDay()+6)%7+3);var c=a.valueOf();a.setMonth(0);a.setDate(4);return Math.round((c-a.valueOf())/6048E5)+1},Date.prototype.getDayOfYear=function(){var a=
new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),c=new Date(this.getFullYear(),0,0,0,0,0);return Math.floor(36E5*((a-c)/24))}},u=function(a){var d=f(a).data("datepicker"),c=f("#"+d.id);if(!d.extraHeight)a=f(a).find("div"),d.extraHeight=a.get(0).offsetHeight+a.get(1).offsetHeight,d.extraWidth=a.get(2).offsetWidth+a.get(3).offsetWidth;var b=c.find("table:first").get(0),a=b.offsetWidth,b=b.offsetHeight;c.css({width:a+d.extraWidth+"px",height:b+d.extraHeight+"px"}).find("div.datepickerContainer").css({width:a+
"px",height:b+"px"})},D=function(a){if(f(a.target).is("span"))a.target=a.target.parentNode;var d=f(a.target);if(d.is("a")){a.target.blur();if(d.hasClass("datepickerDisabled"))return!1;var c=f(this).data("datepicker"),a=d.parent(),b=a.parent().parent().parent(),e=f("table",this).index(b.get(0))-1,g=new Date(c.current),m=!1,j=!1;if(a.is("th"))if(a.hasClass("datepickerWeek")&&"range"==c.mode&&!a.next().hasClass("datepickerDisabled")){var h=parseInt(a.next().text(),10);g.addMonths(e-Math.floor(c.calendars/
2));a.next().hasClass("datepickerNotInMonth")&&g.addMonths(15<h?-1:1);g.setDate(h);c.date[0]=g.setHours(0,0,0,0).valueOf();g.setHours(23,59,59,0);g.addDays(6);c.date[1]=g.valueOf();m=j=!0;c.lastSel=!1}else if(a.hasClass("datepickerMonth"))switch(g.addMonths(e-Math.floor(c.calendars/2)),b.get(0).className){case "datepickerViewDays":b.get(0).className="datepickerViewMonths";d.find("span").text(g.getFullYear());break;case "datepickerViewMonths":b.get(0).className="datepickerViewYears";d.find("span").text(g.getFullYear()-
6+" - "+(g.getFullYear()+5));break;case "datepickerViewYears":b.get(0).className="datepickerViewDays",d.find("span").text(t(g,"B, Y"))}else{if(a.parent().parent().is("thead")){switch(b.get(0).className){case "datepickerViewDays":c.current.addMonths(a.hasClass("datepickerGoPrev")?-1:1);break;case "datepickerViewMonths":c.current.addYears(a.hasClass("datepickerGoPrev")?-1:1);break;case "datepickerViewYears":c.current.addYears(a.hasClass("datepickerGoPrev")?-12:12)}j=!0}}else if(a.is("td")&&!a.hasClass("datepickerDisabled")){switch(b.get(0).className){case "datepickerViewMonths":c.current.setMonth(b.find("tbody.datepickerMonths td").index(a));
c.current.setFullYear(parseInt(b.find("thead th.datepickerMonth span").text(),10));c.current.addMonths(Math.floor(c.calendars/2)-e);b.get(0).className="datepickerViewDays";break;case "datepickerViewYears":c.current.setFullYear(parseInt(d.text(),10));b.get(0).className="datepickerViewMonths";break;default:switch(h=parseInt(d.text(),10),g.addMonths(e-Math.floor(c.calendars/2)),a.hasClass("datepickerNotInMonth")&&g.addMonths(15<h?-1:1),g.setDate(h),c.mode){case "multiple":h=g.setHours(0,0,0,0).valueOf();
-1<f.inArray(h,c.date)?f.each(c.date,function(a,b){if(b==h)return c.date.splice(a,1),!1}):c.date.push(h);break;case "range":c.lastSel||(c.date[0]=g.setHours(0,0,0,0).valueOf());h=g.setHours(23,59,59,0).valueOf();h<c.date[0]?(c.date[1]=c.date[0]+86399E3,c.date[0]=h-86399E3):c.date[1]=h;c.lastSel=!c.lastSel;break;default:c.date=g.valueOf()}}m=j=!0}j&&r(this);m&&c.onChange.apply(this,w(c))}return!1},w=function(a){var d;if("single"==a.mode)return d=new Date(a.date),[t(d,a.format),d,a.el];d=[[],[],a.el];
f.each(a.date,function(c,b){var e=new Date(b);d[0].push(t(e,a.format));d[1].push(e)});return d},E=function(a,d,c){if(a==d)return!0;if(a.contains)return a.contains(d);if(a.compareDocumentPosition)return!!(a.compareDocumentPosition(d)&16);for(d=d.parentNode;d&&d!=c;){if(d==a)return!0;d=d.parentNode}return!1},y=function(){var a,d,c,b,e=f("#"+f(this).data("datepickerId"));if(!e.is(":visible")){var g=e.get(0);r(g);var m=e.data("datepicker");m.onBeforeShow.apply(this,[e.get(0)]);var j=f(this).offset();
b="CSS1Compat"==document.compatMode;a=window.pageXOffset||(b?document.documentElement.scrollLeft:document.body.scrollLeft);d=window.pageYOffset||(b?document.documentElement.scrollTop:document.body.scrollTop);c=window.innerWidth||(b?document.documentElement.clientWidth:document.body.clientWidth);b=window.innerHeight||(b?document.documentElement.clientHeight:document.body.clientHeight);var h=j.top,i=j.left;f.curCSS(g,"display");e.css({visibility:"hidden",display:"block"});u(g);switch(m.position){case "top":h-=
g.offsetHeight;break;case "left":i-=g.offsetWidth;break;case "right":i+=this.offsetWidth;break;case "bottom":h+=this.offsetHeight}h+g.offsetHeight>d+b&&(h=j.top-g.offsetHeight);h<d&&(h=j.top+this.offsetHeight+g.offsetHeight);i+g.offsetWidth>a+c&&(i=j.left-g.offsetWidth);i<a&&(i=j.left+this.offsetWidth);e.css({visibility:"visible",display:"block",top:h+"px",left:i+"px"});!1!=m.onShow.apply(this,[e.get(0)])&&e.show();f(document).bind("mousedown",{cal:e,trigger:this},x)}return!1},x=function(a){a.target!=
a.data.trigger&&!E(a.data.cal.get(0),a.target,a.data.cal.get(0))&&(!1!=a.data.cal.data("datepicker").onHide.apply(this,[a.data.cal.get(0)])&&a.data.cal.hide(),f(document).unbind("mousedown",x))};return{init:function(a){a=f.extend({},B,a||{});C(a.locale);a.calendars=Math.max(1,parseInt(a.calendars,10)||1);a.mode=/single|multiple|range/.test(a.mode)?a.mode:"single";return this.each(function(){if(!f(this).data("datepicker")){a.el=this;if(a.date.constructor==String)a.date=s(a.date,a.format),a.date.setHours(0,
0,0,0);if("single"!=a.mode)if(a.date.constructor!=Array)a.date=[a.date.valueOf()],"range"==a.mode&&a.date.push((new Date(a.date[0])).setHours(23,59,59,0).valueOf());else{for(var d=0;d<a.date.length;d++)a.date[d]=s(a.date[d],a.format).setHours(0,0,0,0).valueOf();"range"==a.mode&&(a.date[1]=(new Date(a.date[1])).setHours(23,59,59,0).valueOf())}else a.date=a.date.valueOf();a.current=a.current?s(a.current,a.format):new Date;a.current.setDate(1);a.current.setHours(0,0,0,0);var d="datepicker_"+parseInt(1E3*
Math.random()),c;a.id=d;f(this).data("datepickerId",a.id);var b=f('<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>').attr("id",d).bind("click",
D).data("datepicker",a);a.className&&b.addClass(a.className);for(var e="",d=0;d<a.calendars;d++)c=a.starts,0<d&&(e+='<td class="datepickerSpace"><div></div></td>'),e+=tmpl(z.join(""),{week:a.locale.weekMin,prev:a.prev,next:a.next,day1:a.locale.daysMin[c++%7],day2:a.locale.daysMin[c++%7],day3:a.locale.daysMin[c++%7],day4:a.locale.daysMin[c++%7],day5:a.locale.daysMin[c++%7],day6:a.locale.daysMin[c++%7],day7:a.locale.daysMin[c++%7]});b.find("tr:first").append(e).find("table").addClass(q[a.view]);r(b.get(0));
a.flat?(b.appendTo(this).show().css("position","relative"),u(b.get(0))):(b.appendTo(document.body),f(this).bind(a.eventName,y))}})},showPicker:function(){return this.each(function(){f(this).data("datepickerId")&&y.apply(this)})},hidePicker:function(){return this.each(function(){f(this).data("datepickerId")&&f("#"+f(this).data("datepickerId")).hide()})},setDate:function(a,d){return this.each(function(){if(f(this).data("datepickerId")){var c=f("#"+f(this).data("datepickerId")),b=c.data("datepicker");
b.date=a;if(b.date.constructor==String)b.date=s(b.date,b.format),b.date.setHours(0,0,0,0);if("single"!=b.mode)if(b.date.constructor!=Array)b.date=[b.date.valueOf()],"range"==b.mode&&b.date.push((new Date(b.date[0])).setHours(23,59,59,0).valueOf());else{for(var e=0;e<b.date.length;e++)b.date[e]=s(b.date[e],b.format).setHours(0,0,0,0).valueOf();"range"==b.mode&&(b.date[1]=(new Date(b.date[1])).setHours(23,59,59,0).valueOf())}else b.date=b.date.valueOf();if(d)b.current=new Date("single"!=b.mode?b.date[0]:
b.date);r(c.get(0))}})},getDate:function(a){if(0<this.size())return w(f("#"+f(this).data("datepickerId")).data("datepicker"))[a?0:1]},clear:function(){return this.each(function(){if(f(this).data("datepickerId")){var a=f("#"+f(this).data("datepickerId")),d=a.data("datepicker");if("single"!=d.mode)d.date=[],r(a.get(0))}})},fixLayout:function(){return this.each(function(){if(f(this).data("datepickerId")){var a=f("#"+f(this).data("datepickerId"));a.data("datepicker").flat&&u(a.get(0))}})}}}();f.fn.extend({DatePicker:q.init,
DatePickerHide:q.hidePicker,DatePickerShow:q.showPicker,DatePickerSetDate:q.setDate,DatePickerGetDate:q.getDate,DatePickerClear:q.clear,DatePickerLayout:q.fixLayout})})(jQuery);


(function(){
  var cache = {};
 
  this.tmpl = function tmpl(str, data){
    // Figure out if we're getting a template, or if we need to
    // load the template - and be sure to cache the result.
    var fn = !/\W/.test(str) ?
      cache[str] = cache[str] ||
        tmpl(document.getElementById(str).innerHTML) :
     
      // Generate a reusable function that will serve as a template
      // generator (and which will be cached).
      new Function("obj",
        "var p=[],print=function(){p.push.apply(p,arguments);};" +
       
        // Introduce the data as local variables using with(){}
        "with(obj){p.push('" +
       
        // Convert the template into pure JavaScript
        str
          .replace(/[\r\t\n]/g, " ")
          .split("<%").join("\t")
          .replace(/((^|%>)[^\t]*)'/g, "$1\r")
          .replace(/\t=(.*?)%>/g, "',$1,'")
          .split("\t").join("');")
          .split("%>").join("p.push('")
          .split("\r").join("\\'")
      + "');}return p.join('');");
   
    // Provide some basic currying to the user
    return data ? fn( data ) : fn;
  };
})();


//
// Copyright (c) 2011; Inc.
// formsnap datepicker Javascript 
// Modified 12-20-2011 02:19:35 PM
//

function stacks_in_62_page0_formsnap($) {
 
//
// bootstrap
//

$(document).ready(function() {
	
	var stacks_in_62_page0 = $('#stacks_in_62_page0 input.formsnap_date').val();
	$('#stacks_in_62_page0 input.formsnap_date').DatePicker({
	    format:'d-m-Y',
	    date: stacks_in_62_page0,
	    current: stacks_in_62_page0,
	    starts: 1,
	    position: 'r',
	    locale: {
	   		daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
	    	months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
	    	monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
	    	weekMin: 'Wk'
		},
	    onBeforeShow: function(){
	        $('#stacks_in_62_page0 input.formsnap_date').DatePickerSetDate($('#stacks_in_62_page0 input.formsnap_date').val(), true);
	    },
	    onChange: function(formated, dates){
	        $('#stacks_in_62_page0 input.formsnap_date').val(formated);
	    }
	});
	
			
});


$(window).load(function(){

});

}; // stacks_in_62_page0_formsnap fn

stacks_in_62_page0_formsnap($);
	return stack;
})(stacks.stacks_in_62_page0);



