
// '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_41_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_41_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_41_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;
	
/*
 *
 * Scroll Pane Enclosure stack by Tsooj Media
 * Version 1.1.0
 *
 * Visit http://www.tsooj.net for more information on how to use this stacks product for RapidWeaver.
 *
 */


/* Make sure that jQuery library is loaded. */

var atmAttempts = 15;

var atmJqueryLoaded = function() {
if (typeof(jQuery) == "undefined" || typeof(jQuery) != "function" || jQuery("*") === null) {
	//console.log("jQuery not loaded with number of attempts = " + atmAttempts);
	//console.log((new Date()).getTime());
	if (atmAttempts-- > 0) setTimeout(atmJqueryLoaded, 1 );
		return;
	}
		//console.log("jQuery loaded with number of attempts = " + atmAttempts);
		//console.log((new Date()).getTime());
		//console.log(jQuery);
		//console.log($);		
	}
        
atmJqueryLoaded();



/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 * 
 * Requires: 1.2.2+
 */

(function($) {

var types = ['DOMMouseScroll', 'mousewheel'];

$.event.special.mousewheel = {
    setup: function() {
        if ( this.addEventListener ) {
            for ( var i=types.length; i; ) {
                this.addEventListener( types[--i], handler, false );
            }
        } else {
            this.onmousewheel = handler;
        }
    },
    
    teardown: function() {
        if ( this.removeEventListener ) {
            for ( var i=types.length; i; ) {
                this.removeEventListener( types[--i], handler, false );
            }
        } else {
            this.onmousewheel = null;
        }
    }
};

$.fn.extend({
    mousewheel: function(fn) {
        return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
    },
    
    unmousewheel: function(fn) {
        return this.unbind("mousewheel", fn);
    }
});


function handler(event) {
    var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
    event = $.event.fix(orgEvent);
    event.type = "mousewheel";
    
    // Old school scrollwheel delta
    if ( event.wheelDelta ) { delta = event.wheelDelta/120; }
    if ( event.detail     ) { delta = -event.detail/3; }
    
    // New school multidimensional scroll (touchpads) deltas
    deltaY = delta;
    
    // Gecko
    if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
        deltaY = 0;
        deltaX = -1*delta;
    }
    
    // Webkit
    // Currently the latest WebKit browsers need a value of 2700 instead of 120
    if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/2700; }
    if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/2700; }
    
    // Add event and delta to the front of the arguments
    args.unshift(event, delta, deltaX, deltaY);
    
    return $.event.handle.apply(this, args);
}

})(jQuery);



/**
 * @author trixta
 * @version 1.2
 */
(function($){

var mwheelI = {
			pos: [-260, -260]
		},
	minDif 	= 3,
	doc 	= document,
	root 	= doc.documentElement,
	body 	= doc.body,
	longDelay, shortDelay
;

function unsetPos(){
	if(this === mwheelI.elem){
		mwheelI.pos = [-260, -260];
		mwheelI.elem = false;
		minDif = 3;
	}
}

$.event.special.mwheelIntent = {
	setup: function(){
		var jElm = $(this).bind('mousewheel', $.event.special.mwheelIntent.handler);
		if( this !== doc && this !== root && this !== body ){
			jElm.bind('mouseleave', unsetPos);
		}
		jElm = null;
        return true;
    },
	teardown: function(){
        $(this)
			.unbind('mousewheel', $.event.special.mwheelIntent.handler)
			.unbind('mouseleave', unsetPos)
		;
        return true;
    },
    handler: function(e, d){
		var pos = [e.clientX, e.clientY];
		if( this === mwheelI.elem || Math.abs(mwheelI.pos[0] - pos[0]) > minDif || Math.abs(mwheelI.pos[1] - pos[1]) > minDif ){
            mwheelI.elem = this;
			mwheelI.pos = pos;
			minDif = 250;
			
			clearTimeout(shortDelay);
			shortDelay = setTimeout(function(){
				minDif = 10;
			}, 200);
			clearTimeout(longDelay);
			longDelay = setTimeout(function(){
				minDif = 3;
			}, 1500);
			e = $.extend({}, e, {type: 'mwheelIntent'});
            return $.event.handle.apply(this, arguments);
		}
    }
};
$.fn.extend({
	mwheelIntent: function(fn) {
		return fn ? this.bind("mwheelIntent", fn) : this.trigger("mwheelIntent");
	},
	
	unmwheelIntent: function(fn) {
		return this.unbind("mwheelIntent", fn);
	}
});

$(function(){
	body = doc.body;
	//assume that document is always scrollable, doesn't hurt if not
	$(doc).bind('mwheelIntent.mwheelIntentDefault', $.noop);
});
})(jQuery);



/*
 * jScrollPane - v2.0.0beta6 - 2010-10-28
 * http://jscrollpane.kelvinluck.com/
 *
 * Copyright (c) 2010 Kelvin Luck
 * Dual licensed under the MIT and GPL licenses.
 */
(function(b,a,c){b.fn.jScrollPane=function(f){function d(C,L){var au,N=this,V,ah,v,aj,Q,W,y,q,av,aB,ap,i,H,h,j,X,R,al,U,t,A,am,ac,ak,F,l,ao,at,x,aq,aE,g,aA,ag=true,M=true,aD=false,k=false,Z=b.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aE=C.css("paddingTop")+" "+C.css("paddingRight")+" "+C.css("paddingBottom")+" "+C.css("paddingLeft");g=(parseInt(C.css("paddingLeft"))||0)+(parseInt(C.css("paddingRight"))||0);an(L);function an(aH){var aL,aK,aJ,aG,aF,aI;au=aH;if(V==c){C.css({overflow:"hidden",padding:0});ah=C.innerWidth()+g;v=C.innerHeight();C.width(ah);V=b('<div class="jspPane" />').wrap(b('<div class="jspContainer" />').css({width:ah+"px",height:v+"px"}));C.wrapInner(V.parent());aj=C.find(">.jspContainer");V=aj.find(">.jspPane");V.css("padding",aE)}else{C.css("width","");aI=C.outerWidth()+g!=ah||C.outerHeight()!=v;if(aI){ah=C.innerWidth()+g;v=C.innerHeight();aj.css({width:ah+"px",height:v+"px"})}aA=V.innerWidth();if(!aI&&V.outerWidth()==Q&&V.outerHeight()==W){if(aB||av){V.css("width",aA+"px");C.css("width",(aA+g)+"px")}return}V.css("width","");C.css("width",(ah)+"px");aj.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}aL=V.clone().css("position","absolute");aK=b('<div style="width:1px; position: relative;" />').append(aL);b("body").append(aK);Q=Math.max(V.outerWidth(),aL.outerWidth());aK.remove();W=V.outerHeight();y=Q/ah;q=W/v;av=q>1;aB=y>1;if(!(aB||av)){C.removeClass("jspScrollable");V.css({top:0,width:aj.width()-g});n();D();O();w();af()}else{C.addClass("jspScrollable");aJ=au.maintainPosition&&(H||X);if(aJ){aG=ay();aF=aw()}aC();z();E();if(aJ){K(aG);J(aF)}I();ad();if(au.enableKeyboardNavigation){P()}if(au.clickOnTrack){p()}B();if(au.hijackInternalLinks){m()}}if(au.autoReinitialise&&!aq){aq=setInterval(function(){an(au)},au.autoReinitialiseDelay)}else{if(!au.autoReinitialise&&aq){clearInterval(aq)}}C.trigger("jsp-initialised",[aB||av])}function aC(){if(av){aj.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'),b('<div class="jspDragBottom" />'))),b('<div class="jspCap jspCapBottom" />')));R=aj.find(">.jspVerticalBar");al=R.find(">.jspTrack");ap=al.find(">.jspDrag");if(au.showArrows){am=b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",az(0,-1)).bind("click.jsp",ax);ac=b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",az(0,1)).bind("click.jsp",ax);if(au.arrowScrollOnHover){am.bind("mouseover.jsp",az(0,-1,am));ac.bind("mouseover.jsp",az(0,1,ac))}ai(al,au.verticalArrowPositions,am,ac)}t=v;aj.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){t-=b(this).outerHeight()});ap.hover(function(){ap.addClass("jspHover")},function(){ap.removeClass("jspHover")}).bind("mousedown.jsp",function(aF){b("html").bind("dragstart.jsp selectstart.jsp",function(){return false});ap.addClass("jspActive");var s=aF.pageY-ap.position().top;b("html").bind("mousemove.jsp",function(aG){S(aG.pageY-s,false)}).bind("mouseup.jsp mouseleave.jsp",ar);return false});o()}}function o(){al.height(t+"px");H=0;U=au.verticalGutter+al.outerWidth();V.width(ah-U-g);if(R.position().left==0){V.css("margin-left",U+"px")}}function z(){if(aB){aj.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'),b('<div class="jspDragRight" />'))),b('<div class="jspCap jspCapRight" />')));ak=aj.find(">.jspHorizontalBar");F=ak.find(">.jspTrack");h=F.find(">.jspDrag");if(au.showArrows){at=b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",az(-1,0)).bind("click.jsp",ax);x=b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",az(1,0)).bind("click.jsp",ax);if(au.arrowScrollOnHover){at.bind("mouseover.jsp",az(-1,0,at));
x.bind("mouseover.jsp",az(1,0,x))}ai(F,au.horizontalArrowPositions,at,x)}h.hover(function(){h.addClass("jspHover")},function(){h.removeClass("jspHover")}).bind("mousedown.jsp",function(aF){b("html").bind("dragstart.jsp selectstart.jsp",function(){return false});h.addClass("jspActive");var s=aF.pageX-h.position().left;b("html").bind("mousemove.jsp",function(aG){T(aG.pageX-s,false)}).bind("mouseup.jsp mouseleave.jsp",ar);return false});l=aj.innerWidth();ae()}else{}}function ae(){aj.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){l-=b(this).outerWidth()});F.width(l+"px");X=0}function E(){if(aB&&av){var aF=F.outerHeight(),s=al.outerWidth();t-=aF;b(ak).find(">.jspCap:visible,>.jspArrow").each(function(){l+=b(this).outerWidth()});l-=s;v-=s;ah-=aF;F.parent().append(b('<div class="jspCorner" />').css("width",aF+"px"));o();ae()}if(aB){V.width((aj.outerWidth()-g)+"px")}W=V.outerHeight();q=W/v;if(aB){ao=1/y*l;if(ao>au.horizontalDragMaxWidth){ao=au.horizontalDragMaxWidth}else{if(ao<au.horizontalDragMinWidth){ao=au.horizontalDragMinWidth}}h.width(ao+"px");j=l-ao;ab(X)}if(av){A=1/q*t;if(A>au.verticalDragMaxHeight){A=au.verticalDragMaxHeight}else{if(A<au.verticalDragMinHeight){A=au.verticalDragMinHeight}}ap.height(A+"px");i=t-A;aa(H)}}function ai(aG,aI,aF,s){var aK="before",aH="after",aJ;if(aI=="os"){aI=/Mac/.test(navigator.platform)?"after":"split"}if(aI==aK){aH=aI}else{if(aI==aH){aK=aI;aJ=aF;aF=s;s=aJ}}aG[aK](aF)[aH](s)}function az(aF,s,aG){return function(){G(aF,s,this,aG);this.blur();return false}}function G(aH,aF,aK,aJ){aK=b(aK).addClass("jspActive");var aI,s=function(){if(aH!=0){T(X+aH*au.arrowButtonSpeed,false)}if(aF!=0){S(H+aF*au.arrowButtonSpeed,false)}},aG=setInterval(s,au.arrowRepeatFreq);s();aI=aJ==c?"mouseup.jsp":"mouseout.jsp";aJ=aJ||b("html");aJ.bind(aI,function(){aK.removeClass("jspActive");clearInterval(aG);aJ.unbind(aI)})}function p(){w();if(av){al.bind("mousedown.jsp",function(aH){if(aH.originalTarget==c||aH.originalTarget==aH.currentTarget){var aG=b(this),s=setInterval(function(){var aI=aG.offset(),aJ=aH.pageY-aI.top;if(H+A<aJ){S(H+au.trackClickSpeed)}else{if(aJ<H){S(H-au.trackClickSpeed)}else{aF()}}},au.trackClickRepeatFreq),aF=function(){s&&clearInterval(s);s=null;b(document).unbind("mouseup.jsp",aF)};b(document).bind("mouseup.jsp",aF);return false}})}if(aB){F.bind("mousedown.jsp",function(aH){if(aH.originalTarget==c||aH.originalTarget==aH.currentTarget){var aG=b(this),s=setInterval(function(){var aI=aG.offset(),aJ=aH.pageX-aI.left;if(X+ao<aJ){T(X+au.trackClickSpeed)}else{if(aJ<X){T(X-au.trackClickSpeed)}else{aF()}}},au.trackClickRepeatFreq),aF=function(){s&&clearInterval(s);s=null;b(document).unbind("mouseup.jsp",aF)};b(document).bind("mouseup.jsp",aF);return false}})}}function w(){F&&F.unbind("mousedown.jsp");al&&al.unbind("mousedown.jsp")}function ar(){b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");ap&&ap.removeClass("jspActive");h&&h.removeClass("jspActive")}function S(s,aF){if(!av){return}if(s<0){s=0}else{if(s>i){s=i}}if(aF==c){aF=au.animateScroll}if(aF){N.animate(ap,"top",s,aa)}else{ap.css("top",s);aa(s)}}function aa(aF){if(aF==c){aF=ap.position().top}aj.scrollTop(0);H=aF;var aI=H==0,aG=H==i,aH=aF/i,s=-aH*(W-v);if(ag!=aI||aD!=aG){ag=aI;aD=aG;C.trigger("jsp-arrow-change",[ag,aD,M,k])}u(aI,aG);V.css("top",s);C.trigger("jsp-scroll-y",[-s,aI,aG])}function T(aF,s){if(!aB){return}if(aF<0){aF=0}else{if(aF>j){aF=j}}if(s==c){s=au.animateScroll}if(s){N.animate(h,"left",aF,ab)}else{h.css("left",aF);ab(aF)}}function ab(aF){if(aF==c){aF=h.position().left}aj.scrollTop(0);X=aF;var aI=X==0,aH=X==j,aG=aF/j,s=-aG*(Q-ah);if(M!=aI||k!=aH){M=aI;k=aH;C.trigger("jsp-arrow-change",[ag,aD,M,k])}r(aI,aH);V.css("left",s);C.trigger("jsp-scroll-x",[-s,aI,aH])}function u(aF,s){if(au.showArrows){am[aF?"addClass":"removeClass"]("jspDisabled");ac[s?"addClass":"removeClass"]("jspDisabled")}}function r(aF,s){if(au.showArrows){at[aF?"addClass":"removeClass"]("jspDisabled");
x[s?"addClass":"removeClass"]("jspDisabled")}}function J(s,aF){var aG=s/(W-v);S(aG*i,aF)}function K(aF,s){var aG=aF/(Q-ah);T(aG*j,s)}function Y(aR,aM,aG){var aK,aH,aI,s=0,aQ=0,aF,aL,aO,aN,aP;try{aK=b(aR)}catch(aJ){return}aH=aK.outerHeight();aI=aK.outerWidth();aj.scrollTop(0);aj.scrollLeft(0);while(!aK.is(".jspPane")){s+=aK.position().top;aQ+=aK.position().left;aK=aK.offsetParent();if(/^body|html$/i.test(aK[0].nodeName)){return}}aF=aw();aL=aF+v;if(s<aF||aM){aN=s-au.verticalGutter}else{if(s+aH>aL){aN=s-v+aH+au.verticalGutter}}if(aN){J(aN,aG)}viewportLeft=ay();aO=viewportLeft+ah;if(aQ<viewportLeft||aM){aP=aQ-au.horizontalGutter}else{if(aQ+aI>aO){aP=aQ-ah+aI+au.horizontalGutter}}if(aP){K(aP,aG)}}function ay(){return -V.position().left}function aw(){return -V.position().top}function ad(){aj.unbind(Z).bind(Z,function(aI,aJ,aH,aF){var aG=X,s=H;T(X+aH*au.mouseWheelSpeed,false);S(H-aF*au.mouseWheelSpeed,false);return aG==X&&s==H})}function n(){aj.unbind(Z)}function ax(){return false}function I(){V.unbind("focusin.jsp").bind("focusin.jsp",function(s){if(s.target===V[0]){return}Y(s.target,false)})}function D(){V.unbind("focusin.jsp")}function P(){var aF,s;C.attr("tabindex",0).unbind("keydown.jsp").bind("keydown.jsp",function(aJ){if(aJ.target!==C[0]){return}var aH=X,aG=H,aI=aF?2:16;switch(aJ.keyCode){case 40:S(H+aI,false);break;case 38:S(H-aI,false);break;case 34:case 32:J(aw()+Math.max(32,v)-16);break;case 33:J(aw()-v+16);break;case 35:J(W-v);break;case 36:J(0);break;case 39:T(X+aI,false);break;case 37:T(X-aI,false);break}if(!(aH==X&&aG==H)){aF=true;clearTimeout(s);s=setTimeout(function(){aF=false},260);return false}});if(au.hideFocus){C.css("outline","none");if("hideFocus" in aj[0]){C.attr("hideFocus",true)}}else{C.css("outline","");if("hideFocus" in aj[0]){C.attr("hideFocus",false)}}}function O(){C.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp")}function B(){if(location.hash&&location.hash.length>1){var aG,aF;try{aG=b(location.hash)}catch(s){return}if(aG.length&&V.find(aG)){if(aj.scrollTop()==0){aF=setInterval(function(){if(aj.scrollTop()>0){Y(location.hash,true);b(document).scrollTop(aj.position().top);clearInterval(aF)}},50)}else{Y(location.hash,true);b(document).scrollTop(aj.position().top)}}}}function af(){b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function m(){af();b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var s=this.href.split("#"),aF;if(s.length>1){aF=s[1];if(aF.length>0&&V.find("#"+aF).length>0){Y("#"+aF,true);return false}}})}b.extend(N,{reinitialise:function(aF){aF=b.extend({},aF,au);an(aF)},scrollToElement:function(aG,aF,s){Y(aG,aF,s)},scrollTo:function(aG,s,aF){K(aG,aF);J(s,aF)},scrollToX:function(aF,s){K(aF,s)},scrollToY:function(s,aF){J(s,aF)},scrollBy:function(aF,s,aG){N.scrollByX(aF,aG);N.scrollByY(s,aG)},scrollByX:function(s,aG){var aF=ay()+s,aH=aF/(Q-ah);T(aH*j,aG)},scrollByY:function(s,aG){var aF=aw()+s,aH=aF/(W-v);S(aH*i,aG)},animate:function(aF,aI,s,aH){var aG={};aG[aI]=s;aF.animate(aG,{duration:au.animateDuration,ease:au.animateEase,queue:false,step:aH})},getContentPositionX:function(){return ay()},getContentPositionY:function(){return aw()},getIsScrollableH:function(){return aB},getIsScrollableV:function(){return av},getContentPane:function(){return V},scrollToBottom:function(s){S(i,s)},hijackInternalLinks:function(){m()}})}f=b.extend({},b.fn.jScrollPane.defaults,f);var e;this.each(function(){var g=b(this),h=g.data("jsp");if(h){h.reinitialise(f)}else{h=new d(g,f);g.data("jsp",h)}e=e?e.add(g):g});return e};b.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:2000,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:10,horizontalGutter:10,mouseWheelSpeed:10,arrowButtonSpeed:10,arrowRepeatFreq:100,arrowScrollOnHover:false,trackClickSpeed:30,trackClickRepeatFreq:100,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false}
})(jQuery,this);



// When Fade in is selected the initial Visibility of the Scroll Pane should be changed.

if (true) {
	document.write("<style type='text/css'>.atmScrollPane {display: none;}</style>"); 
	$(document).ready(function() {
		$('.atmScrollPane').fadeIn(2000);
	});
}



	return stack;
})(stacks.stacks_in_41_page0);


// Javascript for stacks_in_50_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_50_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_50_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;
	
/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 *
 * RGBA support by Mehdi Kabab <http://pioupioum.fr>
 */

(function(jQuery){
    jQuery.extend(jQuery.support, {
        "rgba": supportsRGBA()
    });

    // We override the animation for all of these color styles
    jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
        jQuery.fx.step[attr] = function(fx){
            var tuples = [];
            if ( !fx.colorInit ) {
                fx.start = getColor( fx.elem, attr );
                fx.end = getRGB( fx.end );
                fx.alphavalue = {
                    start: 4 === fx.start.length,
                    end:   4 === fx.end.length
                };
                if ( !fx.alphavalue.start ) {
                    fx.start.push( 1 );
                }
                if ( !fx.alphavalue.end ) {
                    fx.end.push( 1 );
                }
                if ( jQuery.support.rgba &&
                     (!fx.alphavalue.start && fx.alphavalue.end) || // RGB => RGBA
                     (fx.alphavalue.start && fx.alphavalue.end)  || // RGBA => RGBA
                     (fx.alphavalue.start && !fx.alphavalue.end)    // RGBA => RGB
                ) {
                    fx.colorModel = 'rgba';
                } else {
                    fx.colorModel = 'rgb';
                }
                fx.colorInit = true;
            }

            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0) ); // R
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0) ); // G
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) ); // B

            if ( fx.colorModel == 'rgba' ) {
                // Alpha
                tuples.push( Math.max(Math.min( parseFloat((fx.pos * (fx.end[3] - fx.start[3])) + fx.start[3]), 1), 0).toFixed(2) );
            }

            fx.elem.style[attr] = fx.colorModel + "(" + tuples.join(",") + ")";
        };
    });

    // Color Conversion functions from highlightFade
    // By Blair Mitchelmore
    // http://jquery.offput.ca/highlightFade/

    // Parse strings looking for color tuples [255,255,255[,1]]
    function getRGB(color) {
        var result, ret,
            ralpha = '(?:,\\s*((?:1|0)(?:\\.0+)?|(?:0?\\.[0-9]+))\\s*)?\\)',
            rrgbdecimal = new RegExp( 'rgb(a)?\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*' + ralpha ),
            rrgbpercent = new RegExp( 'rgb(a)?\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*' + ralpha );

        // Check if we're already dealing with an array of colors
        if ( color && color.constructor == Array && color.length >= 3 && color.length <= 4 ) {
            return color;
        }

        // Look for #a0b1c2
        if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) {
            return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
        }

        // Look for #fff
        if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) {
            return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
        }

        // Look for rgb[a](num,num,num[,num])
        if (result = rrgbdecimal.exec(color)) {
            ret = [parseInt(result[2]), parseInt(result[3]), parseInt(result[4])];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Look for rgb[a](num%,num%,num%[,num])
        if (result = rrgbpercent.exec(color)) {
            ret = [parseFloat(result[2]) * 2.55, parseFloat(result[3]) * 2.55, parseFloat(result[4]) * 2.55];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Otherwise, we're most likely dealing with a named color
        return colors[jQuery.trim(color).toLowerCase()];
    }

    function getColor(elem, attr) {
        var color;

        do {
            color = jQuery.curCSS(elem, attr);

            // Keep going until we find an element that has color, or we hit the body
            if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
                break;

            attr = "backgroundColor";
        } while ( elem = elem.parentNode );

        return getRGB(color);
    };

    function supportsRGBA() {
        var $script = jQuery('script:first'),
            color = $script.css('color'),
            result = false;
        if (/^rgba/.test(color)) {
                result = true;
        } else {
            try {
                result = ( color != $script.css('color', 'rgba(0, 0, 0, 0.5)').css('color') );
                $script.css('color', color);
            } catch (e) {};
        }

        return result;
    };

    // Some named colors to work with
    // From Interface by Stefan Petre
    // http://interface.eyecon.ro/

    var colors = {
        aqua:[0,255,255],
        azure:[240,255,255],
        beige:[245,245,220],
        black:[0,0,0],
        blue:[0,0,255],
        brown:[165,42,42],
        cyan:[0,255,255],
        darkblue:[0,0,139],
        darkcyan:[0,139,139],
        darkgrey:[169,169,169],
        darkgreen:[0,100,0],
        darkkhaki:[189,183,107],
        darkmagenta:[139,0,139],
        darkolivegreen:[85,107,47],
        darkorange:[255,140,0],
        darkorchid:[153,50,204],
        darkred:[139,0,0],
        darksalmon:[233,150,122],
        darkviolet:[148,0,211],
        fuchsia:[255,0,255],
        gold:[255,215,0],
        green:[0,128,0],
        indigo:[75,0,130],
        khaki:[240,230,140],
        lightblue:[173,216,230],
        lightcyan:[224,255,255],
        lightgreen:[144,238,144],
        lightgrey:[211,211,211],
        lightpink:[255,182,193],
        lightyellow:[255,255,224],
        lime:[0,255,0],
        magenta:[255,0,255],
        maroon:[128,0,0],
        navy:[0,0,128],
        olive:[128,128,0],
        orange:[255,165,0],
        pink:[255,192,203],
        purple:[128,0,128],
        violet:[128,0,128],
        red:[255,0,0],
        silver:[192,192,192],
        white:[255,255,255],
        yellow:[255,255,0],
        transparent: ( jQuery.support.rgba ) ? [0,0,0,0] : [255,255,255]
    };

})(jQuery);

function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
function opaHex(o) {
	var i = Math.floor(0.0 * 255);
	return i.toString(16);
	
}

$(document).ready(function(){
	$('#stacks_in_50_page0 .transbox').css('background','rgb('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+')');
	$('#stacks_in_50_page0 .transbox').css('background','rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.0)');  
	if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
		var ho = opaHex(0.0);
		$('#stacks_in_50_page0 .transbox').css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');  
		$('#stacks_in_50_page0 .transbox').css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');
	}
	if(true){
		$('#stacks_in_50_page0 .transbox').addClass('shadow');
	}

	if(false){
		$('#stacks_in_50_page0 .transbox').mouseenter(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 1.0)' }, 250);
			if(false){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}
		});
	
		$('#stacks_in_50_page0 .transbox').mouseleave(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.0)' }, 250);
			if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
				$(this).css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.0)+'FFFFFF, endColorstr=#88FFFFFF)');  
				$(this).css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.0)+'FFFFFF, endColorstr=#88FFFFFF)');
			}
			if(true){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}			
		});
	}
	
});
	return stack;
})(stacks.stacks_in_50_page0);


// Javascript for stacks_in_54_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_54_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_54_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;
	
/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 *
 * RGBA support by Mehdi Kabab <http://pioupioum.fr>
 */

(function(jQuery){
    jQuery.extend(jQuery.support, {
        "rgba": supportsRGBA()
    });

    // We override the animation for all of these color styles
    jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
        jQuery.fx.step[attr] = function(fx){
            var tuples = [];
            if ( !fx.colorInit ) {
                fx.start = getColor( fx.elem, attr );
                fx.end = getRGB( fx.end );
                fx.alphavalue = {
                    start: 4 === fx.start.length,
                    end:   4 === fx.end.length
                };
                if ( !fx.alphavalue.start ) {
                    fx.start.push( 1 );
                }
                if ( !fx.alphavalue.end ) {
                    fx.end.push( 1 );
                }
                if ( jQuery.support.rgba &&
                     (!fx.alphavalue.start && fx.alphavalue.end) || // RGB => RGBA
                     (fx.alphavalue.start && fx.alphavalue.end)  || // RGBA => RGBA
                     (fx.alphavalue.start && !fx.alphavalue.end)    // RGBA => RGB
                ) {
                    fx.colorModel = 'rgba';
                } else {
                    fx.colorModel = 'rgb';
                }
                fx.colorInit = true;
            }

            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0) ); // R
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0) ); // G
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) ); // B

            if ( fx.colorModel == 'rgba' ) {
                // Alpha
                tuples.push( Math.max(Math.min( parseFloat((fx.pos * (fx.end[3] - fx.start[3])) + fx.start[3]), 1), 0).toFixed(2) );
            }

            fx.elem.style[attr] = fx.colorModel + "(" + tuples.join(",") + ")";
        };
    });

    // Color Conversion functions from highlightFade
    // By Blair Mitchelmore
    // http://jquery.offput.ca/highlightFade/

    // Parse strings looking for color tuples [255,255,255[,1]]
    function getRGB(color) {
        var result, ret,
            ralpha = '(?:,\\s*((?:1|0)(?:\\.0+)?|(?:0?\\.[0-9]+))\\s*)?\\)',
            rrgbdecimal = new RegExp( 'rgb(a)?\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*' + ralpha ),
            rrgbpercent = new RegExp( 'rgb(a)?\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*' + ralpha );

        // Check if we're already dealing with an array of colors
        if ( color && color.constructor == Array && color.length >= 3 && color.length <= 4 ) {
            return color;
        }

        // Look for #a0b1c2
        if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) {
            return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
        }

        // Look for #fff
        if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) {
            return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
        }

        // Look for rgb[a](num,num,num[,num])
        if (result = rrgbdecimal.exec(color)) {
            ret = [parseInt(result[2]), parseInt(result[3]), parseInt(result[4])];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Look for rgb[a](num%,num%,num%[,num])
        if (result = rrgbpercent.exec(color)) {
            ret = [parseFloat(result[2]) * 2.55, parseFloat(result[3]) * 2.55, parseFloat(result[4]) * 2.55];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Otherwise, we're most likely dealing with a named color
        return colors[jQuery.trim(color).toLowerCase()];
    }

    function getColor(elem, attr) {
        var color;

        do {
            color = jQuery.curCSS(elem, attr);

            // Keep going until we find an element that has color, or we hit the body
            if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
                break;

            attr = "backgroundColor";
        } while ( elem = elem.parentNode );

        return getRGB(color);
    };

    function supportsRGBA() {
        var $script = jQuery('script:first'),
            color = $script.css('color'),
            result = false;
        if (/^rgba/.test(color)) {
                result = true;
        } else {
            try {
                result = ( color != $script.css('color', 'rgba(0, 0, 0, 0.5)').css('color') );
                $script.css('color', color);
            } catch (e) {};
        }

        return result;
    };

    // Some named colors to work with
    // From Interface by Stefan Petre
    // http://interface.eyecon.ro/

    var colors = {
        aqua:[0,255,255],
        azure:[240,255,255],
        beige:[245,245,220],
        black:[0,0,0],
        blue:[0,0,255],
        brown:[165,42,42],
        cyan:[0,255,255],
        darkblue:[0,0,139],
        darkcyan:[0,139,139],
        darkgrey:[169,169,169],
        darkgreen:[0,100,0],
        darkkhaki:[189,183,107],
        darkmagenta:[139,0,139],
        darkolivegreen:[85,107,47],
        darkorange:[255,140,0],
        darkorchid:[153,50,204],
        darkred:[139,0,0],
        darksalmon:[233,150,122],
        darkviolet:[148,0,211],
        fuchsia:[255,0,255],
        gold:[255,215,0],
        green:[0,128,0],
        indigo:[75,0,130],
        khaki:[240,230,140],
        lightblue:[173,216,230],
        lightcyan:[224,255,255],
        lightgreen:[144,238,144],
        lightgrey:[211,211,211],
        lightpink:[255,182,193],
        lightyellow:[255,255,224],
        lime:[0,255,0],
        magenta:[255,0,255],
        maroon:[128,0,0],
        navy:[0,0,128],
        olive:[128,128,0],
        orange:[255,165,0],
        pink:[255,192,203],
        purple:[128,0,128],
        violet:[128,0,128],
        red:[255,0,0],
        silver:[192,192,192],
        white:[255,255,255],
        yellow:[255,255,0],
        transparent: ( jQuery.support.rgba ) ? [0,0,0,0] : [255,255,255]
    };

})(jQuery);

function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
function opaHex(o) {
	var i = Math.floor(0.8 * 255);
	return i.toString(16);
	
}

$(document).ready(function(){
	$('#stacks_in_54_page0 .transbox').css('background','rgb('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+')');
	$('#stacks_in_54_page0 .transbox').css('background','rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.8)');  
	if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
		var ho = opaHex(0.8);
		$('#stacks_in_54_page0 .transbox').css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');  
		$('#stacks_in_54_page0 .transbox').css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');
	}
	if(false){
		$('#stacks_in_54_page0 .transbox').addClass('shadow');
	}

	if(false){
		$('#stacks_in_54_page0 .transbox').mouseenter(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 1.0)' }, 250);
			if(false){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}
		});
	
		$('#stacks_in_54_page0 .transbox').mouseleave(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.8)' }, 250);
			if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
				$(this).css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.8)+'FFFFFF, endColorstr=#88FFFFFF)');  
				$(this).css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.8)+'FFFFFF, endColorstr=#88FFFFFF)');
			}
			if(false){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}			
		});
	}
	
});
	return stack;
})(stacks.stacks_in_54_page0);


// Javascript for stacks_in_71_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_71_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_71_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;
	
/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 *
 * RGBA support by Mehdi Kabab <http://pioupioum.fr>
 */

(function(jQuery){
    jQuery.extend(jQuery.support, {
        "rgba": supportsRGBA()
    });

    // We override the animation for all of these color styles
    jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
        jQuery.fx.step[attr] = function(fx){
            var tuples = [];
            if ( !fx.colorInit ) {
                fx.start = getColor( fx.elem, attr );
                fx.end = getRGB( fx.end );
                fx.alphavalue = {
                    start: 4 === fx.start.length,
                    end:   4 === fx.end.length
                };
                if ( !fx.alphavalue.start ) {
                    fx.start.push( 1 );
                }
                if ( !fx.alphavalue.end ) {
                    fx.end.push( 1 );
                }
                if ( jQuery.support.rgba &&
                     (!fx.alphavalue.start && fx.alphavalue.end) || // RGB => RGBA
                     (fx.alphavalue.start && fx.alphavalue.end)  || // RGBA => RGBA
                     (fx.alphavalue.start && !fx.alphavalue.end)    // RGBA => RGB
                ) {
                    fx.colorModel = 'rgba';
                } else {
                    fx.colorModel = 'rgb';
                }
                fx.colorInit = true;
            }

            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0) ); // R
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0) ); // G
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) ); // B

            if ( fx.colorModel == 'rgba' ) {
                // Alpha
                tuples.push( Math.max(Math.min( parseFloat((fx.pos * (fx.end[3] - fx.start[3])) + fx.start[3]), 1), 0).toFixed(2) );
            }

            fx.elem.style[attr] = fx.colorModel + "(" + tuples.join(",") + ")";
        };
    });

    // Color Conversion functions from highlightFade
    // By Blair Mitchelmore
    // http://jquery.offput.ca/highlightFade/

    // Parse strings looking for color tuples [255,255,255[,1]]
    function getRGB(color) {
        var result, ret,
            ralpha = '(?:,\\s*((?:1|0)(?:\\.0+)?|(?:0?\\.[0-9]+))\\s*)?\\)',
            rrgbdecimal = new RegExp( 'rgb(a)?\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*' + ralpha ),
            rrgbpercent = new RegExp( 'rgb(a)?\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*' + ralpha );

        // Check if we're already dealing with an array of colors
        if ( color && color.constructor == Array && color.length >= 3 && color.length <= 4 ) {
            return color;
        }

        // Look for #a0b1c2
        if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) {
            return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
        }

        // Look for #fff
        if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) {
            return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
        }

        // Look for rgb[a](num,num,num[,num])
        if (result = rrgbdecimal.exec(color)) {
            ret = [parseInt(result[2]), parseInt(result[3]), parseInt(result[4])];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Look for rgb[a](num%,num%,num%[,num])
        if (result = rrgbpercent.exec(color)) {
            ret = [parseFloat(result[2]) * 2.55, parseFloat(result[3]) * 2.55, parseFloat(result[4]) * 2.55];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Otherwise, we're most likely dealing with a named color
        return colors[jQuery.trim(color).toLowerCase()];
    }

    function getColor(elem, attr) {
        var color;

        do {
            color = jQuery.curCSS(elem, attr);

            // Keep going until we find an element that has color, or we hit the body
            if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
                break;

            attr = "backgroundColor";
        } while ( elem = elem.parentNode );

        return getRGB(color);
    };

    function supportsRGBA() {
        var $script = jQuery('script:first'),
            color = $script.css('color'),
            result = false;
        if (/^rgba/.test(color)) {
                result = true;
        } else {
            try {
                result = ( color != $script.css('color', 'rgba(0, 0, 0, 0.5)').css('color') );
                $script.css('color', color);
            } catch (e) {};
        }

        return result;
    };

    // Some named colors to work with
    // From Interface by Stefan Petre
    // http://interface.eyecon.ro/

    var colors = {
        aqua:[0,255,255],
        azure:[240,255,255],
        beige:[245,245,220],
        black:[0,0,0],
        blue:[0,0,255],
        brown:[165,42,42],
        cyan:[0,255,255],
        darkblue:[0,0,139],
        darkcyan:[0,139,139],
        darkgrey:[169,169,169],
        darkgreen:[0,100,0],
        darkkhaki:[189,183,107],
        darkmagenta:[139,0,139],
        darkolivegreen:[85,107,47],
        darkorange:[255,140,0],
        darkorchid:[153,50,204],
        darkred:[139,0,0],
        darksalmon:[233,150,122],
        darkviolet:[148,0,211],
        fuchsia:[255,0,255],
        gold:[255,215,0],
        green:[0,128,0],
        indigo:[75,0,130],
        khaki:[240,230,140],
        lightblue:[173,216,230],
        lightcyan:[224,255,255],
        lightgreen:[144,238,144],
        lightgrey:[211,211,211],
        lightpink:[255,182,193],
        lightyellow:[255,255,224],
        lime:[0,255,0],
        magenta:[255,0,255],
        maroon:[128,0,0],
        navy:[0,0,128],
        olive:[128,128,0],
        orange:[255,165,0],
        pink:[255,192,203],
        purple:[128,0,128],
        violet:[128,0,128],
        red:[255,0,0],
        silver:[192,192,192],
        white:[255,255,255],
        yellow:[255,255,0],
        transparent: ( jQuery.support.rgba ) ? [0,0,0,0] : [255,255,255]
    };

})(jQuery);

function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
function opaHex(o) {
	var i = Math.floor(0.7 * 255);
	return i.toString(16);
	
}

$(document).ready(function(){
	$('#stacks_in_71_page0 .transbox').css('background','rgb('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+')');
	$('#stacks_in_71_page0 .transbox').css('background','rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.7)');  
	if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
		var ho = opaHex(0.7);
		$('#stacks_in_71_page0 .transbox').css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');  
		$('#stacks_in_71_page0 .transbox').css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');
	}
	if(true){
		$('#stacks_in_71_page0 .transbox').addClass('shadow');
	}

	if(false){
		$('#stacks_in_71_page0 .transbox').mouseenter(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 1.0)' }, 250);
			if(false){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}
		});
	
		$('#stacks_in_71_page0 .transbox').mouseleave(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.7)' }, 250);
			if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
				$(this).css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.7)+'FFFFFF, endColorstr=#88FFFFFF)');  
				$(this).css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.7)+'FFFFFF, endColorstr=#88FFFFFF)');
			}
			if(true){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}			
		});
	}
	
});
	return stack;
})(stacks.stacks_in_71_page0);


// Javascript for stacks_in_75_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_75_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_75_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;
	


// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
// http://jquery.thewikies.com/swfobject
(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);




$(document).ready(function() {

// Setup some vars from user choices, plist vars

var chromeclose = "files/images/close.png";
var doooverlaycolour = "#000000";
var doooverlaytransparency = "2";
var popupwidth = "800";

                switch (doooverlaytransparency) {
                	case "0":
                        doooverlaytransparency = "1";
                        break;
                    case "1":
                        doooverlaytransparency = "0.9";
                        break;
                    case "2":
                        doooverlaytransparency = "0.8";
                        break;  
					case "3":
                        doooverlaytransparency = "0.7";
                        break;
                    case"4":
                        doooverlaytransparency = "0.6";
                        break;
                    case "5":
                        doooverlaytransparency = "0.5";
                        break;
                    case "6":
                        doooverlaytransparency = "0.4";
                        break;
                    case "7":
                        doooverlaytransparency = "0.3";
                        break;
                    case "8":
                        doooverlaytransparency = "0.2";
                        break;
                    case "9":
                        doooverlaytransparency = "0.1";
                        break;
                    default:
                        doooverlaytransparency = "0.9";
                };



// Chromless Player Functions

(function($){
	
	$.fn.stacks_in_75_page0youTubeEmbed = function(settings){
	
	
		
		// Settings can be either a URL string,
		// or an object
		
		if(typeof settings == 'string'){
			settings = {'video' : settings}
		}
		
		// Default values
		
		var def = {
			width		: 640,
			progressBar	: true
		};
		
		settings = $.extend(def,settings);
		
		var stacks_in_75_page0elements = {
			stacks_in_75_page0originalDIV	: this,	// The "this" of the plugin
			stacks_in_75_page0container	: null,	// A container div, inserted by the plugin
			stacks_in_75_page0control		: null,	// The control play/pause button
			stacks_in_75_page0player		: null,	// The flash player
			progress	: null,	// Progress bar
			elapsed		: null	// The light blue elapsed bar
		};
		

		try{	

			settings.videoID = settings.video.match(/v=(.{11})/)[1];
			
			// The safeID is a stripped version of the
			// videoID, ready for use as a function name

			settings.safeID = settings.videoID.replace(/[^a-z0-9]/ig,'');
		
		} catch (e){
			// If the url was invalid, just return the "this"
			return stacks_in_75_page0elements.stacks_in_75_page0originalDIV;
		}

		// Fetch data about the video from YouTube's API

		var youtubeAPI = 'http://gdata.youtube.com/feeds/api/videos?v=2&alt=jsonc';

		$.get(youtubeAPI,{'q':settings.videoID},function(response){
			
			var data = response.data;
	
			if(!data.totalItems || data.items[0].accessControl.embed!="allowed"){
				
				// If the video was not found, or embedding is not allowed;
				
				return stacks_in_75_page0elements.stacks_in_75_page0originalDIV;
			}

			// data holds API info about the video:
			
			data = data.items[0];
			
			settings.ratio = 3/4;
			if(data.aspectRatio == "widescreen"){
				settings.ratio = 9/16;
			}
			
			settings.height = Math.round(settings.width*settings.ratio);

			// Creating a container inside the original div, which will
			// hold the object/embed code of the video

			stacks_in_75_page0elements.stacks_in_75_page0container = $('<div>',{className:'stacks_in_75_page0flashContainer',css:{
				width	: settings.width,
				height	: settings.height
			}}).appendTo(stacks_in_75_page0elements.stacks_in_75_page0originalDIV).stacks_in_75_page0_lightbox();
			 
			

			// Embedding the YouTube chromeless player
			// and loading the video inside it:

			stacks_in_75_page0elements.stacks_in_75_page0container.flash({
				swf			: 'http://www.youtube.com/apiplayer?enablejsapi=1&version=3',
				id			: 'video_'+settings.safeID,
				height		: settings.height,
				width		: settings.width,
				allowScriptAccess:'always',
				wmode		: 'transparent',
				flashvars	: {
					"video_id"		: settings.videoID,
					"playerapiid"	: settings.safeID
				}
			});

			// We use get, because we need the DOM element
			// itself, and not a jquery object:
			
			stacks_in_75_page0elements.stacks_in_75_page0player = stacks_in_75_page0elements.stacks_in_75_page0container.flash().get(0);

			// Creating the control Div. It will act as a ply/pause button

			stacks_in_75_page0elements.stacks_in_75_page0control = $('<div>',{className:'stacks_in_75_page0controlDiv play'})
							   .appendTo(stacks_in_75_page0elements.stacks_in_75_page0container);


			// If the user wants to show the progress bar:

			if(settings.progressBar){
				stacks_in_75_page0elements.progress =	$('<div>',{className:'progressBar'})
									.appendTo(stacks_in_75_page0elements.stacks_in_75_page0container);

				stacks_in_75_page0elements.elapsed =	$('<div>',{className:'elapsed'})
									.appendTo(stacks_in_75_page0elements.progress);
				
				stacks_in_75_page0elements.progress.click(function(e){
					
					// When a click occurs on the progress bar, seek to the
					// appropriate moment of the video.
					
					var ratio = (e.pageX-stacks_in_75_page0elements.progress.offset().left)/stacks_in_75_page0elements.progress.outerWidth();
					
					stacks_in_75_page0elements.elapsed.width(ratio*100+'%');
					stacks_in_75_page0elements.stacks_in_75_page0player.seekTo(Math.round(data.duration*ratio), true);
					return false;
				});

			}

			var initialized = false;
			
			// Creating a global event listening function for the video
			// (required by YouTube's player API):

			

			
			window['eventListener_'+settings.safeID] = function(status){

				var interval;
				
				if(status==-1)	// video is loaded
				{
					if(!initialized)
					{

				
					// changed to autoplay is selected execute next block by default
					 setTimeout(function(){$('.stacks_in_75_page0controlDiv.play').eq(0).click();},10);
					 
								
								
						// Listen for a click on the control button:
						stacks_in_75_page0elements.stacks_in_75_page0container.click(function(){
							if(!stacks_in_75_page0elements.stacks_in_75_page0container.hasClass('playing')){
								
								// If the video is not currently playing, start it:

								stacks_in_75_page0elements.stacks_in_75_page0control.removeClass('play replay').addClass('pause');
								stacks_in_75_page0elements.stacks_in_75_page0container.addClass('playing');
								stacks_in_75_page0elements.stacks_in_75_page0player.playVideo();
								
								if(settings.progressBar){
									interval = window.setInterval(function(){
										stacks_in_75_page0elements.elapsed.width(
											((stacks_in_75_page0elements.stacks_in_75_page0player.getCurrentTime()/data.duration)*100)+'%'
										);
									},1000);
								}
								
							} else {
								
								// If the video is currently playing, pause it:
								
								stacks_in_75_page0elements.stacks_in_75_page0control.removeClass('pause').addClass('play');
								stacks_in_75_page0elements.stacks_in_75_page0container.removeClass('playing');
								stacks_in_75_page0elements.stacks_in_75_page0player.pauseVideo();
								
								if(settings.progressBar){
									window.clearInterval(interval);
								}
							}
						});
						
						initialized = true;
					}
					else{
						// This will happen if the user has clicked on the
						// YouTube logo and has been redirected to youtube.com

						if(stacks_in_75_page0elements.stacks_in_75_page0container.hasClass('playing'))
						{
							stacks_in_75_page0elements.stacks_in_75_page0control.click();
						}
					}
				}
				
				if(status==0){ // video has ended
					stacks_in_75_page0elements.stacks_in_75_page0control.removeClass('pause').addClass('replay');
					stacks_in_75_page0elements.stacks_in_75_page0container.removeClass('playing');
				}
			}
			
			
			
			// This global function is called when the player is loaded.
			
			if(!window.onYouTubePlayerReady)
			{				
				window.onYouTubePlayerReady = function(playerID){
					document.getElementById('video_'+playerID).addEventListener('onStateChange','eventListener_'+playerID);
				}
			}
		},'jsonp');

		return stacks_in_75_page0elements.stacks_in_75_page0originalDIV;
	}
	
	
	
	
	
	
	//Start My Lightbox jQuery
	
    $.fn.stacks_in_75_page0_lightbox = function(options) {

        return this.each(function() {

            var
                opts = $.extend({}, $.fn.stacks_in_75_page0_lightbox.defaults, options),
                $overlay = $('div.lb_overlay'),
                $self = $(this),
                $iframe = $('iframe#lb_iframe'),
                ie6 = ($.browser.msie && $.browser.version < 7);
            
            if ($overlay.length > 0) {
                $overlay[0].removeModal(); // if the overlay exists, then a modal probably exists. Ditch it!
            } else {
                $overlay =  $('<div class="lb_overlay" style="display:none;"/>'); // otherwise just create an all new overlay. 
            }

            $iframe = ($iframe.length > 0) ? $iframe : $iframe = $('<iframe id="lb_iframe" style="z-index: ' + (9999 + 1) + '; display: none; border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0;"/>');

            /*----------------------------------------------------
               DOM Building
            ---------------------------------------------------- */
            if (ie6) {
                var src = /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank';
                $iframe.attr('src', src);
                $('body').append($iframe);
            } // iframe shim for ie6, to hide select elements
            $('body').append($self).append($overlay);

            /*----------------------------------------------------
               CSS stuffs
            ---------------------------------------------------- */

            // set css of the modal'd window

            setSelfPosition();
            $self.css({left: '50%', marginLeft: ($self.outerWidth() / 2) * -1,  zIndex: (9999 + 3) });

            // set css of the overlay

            setOverlayHeight(); // pulled this into a function because it is called on window resize.
            $overlay.css({ position: 'absolute', width: '100%', top: 0, left: 0, right: 0, bottom: 0, zIndex: (9999 + 2) })
                    .css(opts.overlayCSS);
                    
 

            /*----------------------------------------------------
               Animate it in.
            ---------------------------------------------------- */

            if ($overlay.is(":hidden")) {
                $overlay.fadeIn(opts.overlaySpeed, function() {
                    $self[opts.appearEffect](opts.lightboxSpeed, function() { setOverlayHeight(); opts.onLoad()});
                });
            } else {
                $self[opts.appearEffect](opts.lightboxSpeed, function() { setOverlayHeight(); opts.onLoad()});
            }

            /*----------------------------------------------------
               Bind Events
            ---------------------------------------------------- */

            $(window).resize(setOverlayHeight)
                     .resize(setSelfPosition)
                     .scroll(setSelfPosition)
                     .keydown(observeEscapePress);
                     
            $self.find(opts.closeSelector).click(function() { removeModal(true); return false; });
            $overlay.click(function() { if(opts.closeClick){ removeModal(true); return false;} });

            
            $self.bind('close', function() { removeModal(true) });
            $self.bind('resize', setSelfPosition);
            $overlay[0].removeModal = removeModal;

            /*----------------------------------------------------------------------------------------------------------------------------------------
              ---------------------------------------------------------------------------------------------------------------------------------------- */

            /*----------------------------------------------------
               Private Functions
            ---------------------------------------------------- */


            function removeModal(removeO) {
                // fades & removes modal, then unbinds events
                $self[opts.disappearEffect](opts.lightboxDisappearSpeed, function() {
                    
                    if (removeO) {
                      removeOverlay();  
                    } 
                    
                    opts.destroyOnClose ? $self.remove() : $self.hide()
                    
                    
                    $self.find(opts.closeSelector).unbind('click');
                    $self.unbind('close');
                    $self.unbind('resize');
                    $(window).unbind('scroll', setSelfPosition);
                    $(window).unbind('resize', setSelfPosition);
                    
                    
                });
            }
            
            
            function removeOverlay() {
                // fades & removes overlay, then unbinds events
                $overlay.fadeOut(opts.overlayDisappearSpeed, function() {
                    $(window).unbind('resize', setOverlayHeight);
                    
                    $(".stacks_in_75_page0flashContainer").remove();
                    $overlay.remove();
                    $overlay.unbind('click');
                    
                    
                    
                    opts.onClose();

                })
            }


            /* Function to bind to the window to observe the escape key press */
            function observeEscapePress(e) {
                if((e.keyCode == 27 || (e.DOM_VK_ESCAPE == 27 && e.which==0)) && opts.closeEsc) removeModal(true);
            }

            /* Set the height of the overlay
                    : if the document height is taller than the window, then set the overlay height to the document height.
                    : otherwise, just set overlay height: 100%
            */
            function setOverlayHeight() {
                if ($(window).height() < $(document).height()) {
                    $overlay.css({height: $(document).height() + 'px'});
                } else {
                    $overlay.css({height: '100%'});
                    if (ie6) {$('html,body').css('height','100%'); } // ie6 hack for height: 100%; TODO: handle this in IE7
                }
            }

            /* Set the position of the modal'd window ($self)
                    : if $self is taller than the window, then make it absolutely positioned
                    : otherwise fixed
            */
            function setSelfPosition() {
                var s = $self[0].style;

                if (($self.height() + 80  >= $(window).height()) && ($self.css('position') != 'absolute' || ie6)) {
                    var topOffset = $(document).scrollTop() + 40;
                    $self.css({position: 'absolute', top: topOffset + 'px', marginTop: 0})
                    if (ie6) {
                        s.removeExpression('top');
                    }
                } else if ($self.height()+ 80  < $(window).height()) {
                    if (ie6) {
                        s.position = 'absolute';
                        if (opts.centered) {
                            s.setExpression('top', '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')
                            s.marginTop = 0;
                        } else {
                            var top = (opts.modalCSS && opts.modalCSS.top) ? parseInt(opts.modalCSS.top) : 0;
                            s.setExpression('top', '((blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"')
                        }
                    } else {
                        if (opts.centered) {
                            $self.css({position: 'fixed', top: '50%', marginTop: ($self.outerHeight() / 2) * -1}).css({
                            																							borderWidth: "1px", 
                            																							borderStyle: "solid", 
                            																							borderColor: doooverlaycolour
                            																							})
                        } else {
                            $self.css({ position: 'fixed'}).css(opts.modalCSS);
                        }
                    }
                }
            }
        });
    };

	
	
	
	
	
    $.fn.stacks_in_75_page0_lightbox.defaults = {

        // animation when appears
        appearEffect: "fadeIn",
        overlaySpeed: 2000,
        lightboxSpeed: 2500,
        
        // animation when dissapears
        disappearEffect: "fadeOut",
        overlayDisappearSpeed: 1000,
        lightboxDisappearSpeed: 1000,

        // close
        closeSelector: ".close",
        closeClick: true,
        closeEsc: true,

        // behavior
        destroyOnClose: false,

        // callbacks
        onLoad: function() {},
        onClose: function() {},

        // style
        classPrefix: 'lb',
        zIndex: 9999,
        centered: true,
        modalCSS: {top: '40px'},
        overlayCSS: {background: doooverlaycolour, opacity: doooverlaytransparency}
    }
    
    
    
    
    
    //Start My Video Thumbnail jQuery
    
    // get the thumbnail
    	$.extend({
		jYoutube: function( url, size ){
			if(url === null){ return ""; }

			size = (size === null) ? "big" : size;
			var vid;
			var results;

			results = url.match("[\\?&]v=([^&#]*)");

			vid = ( results === null ) ? url : results[1];

			if(size == "small"){
				return "http://img.youtube.com/vi/"+vid+"/2.jpg";
			}else {
				return "http://img.youtube.com/vi/"+vid+"/0.jpg";
			}
		}
	})
    
    // get the stripped id from the url
    var getid = function(url, gkey){

        var returned = null;

        if (url.indexOf("?") != -1){

          var list = url.split("?")[1].split("&"),
                  gets = [];

          for (var ind in list){
            var kv = list[ind].split("=");
            if (kv.length>0)
                gets[kv[0]] = kv[1];
        }

        returned = gets;

        if (typeof gkey != "undefined")
            if (typeof gets[gkey] != "undefined")
                returned = gets[gkey];

        }

        return returned;

};
	   

})(jQuery);






$('.stacks_in_75_page0tubeWrapper').each(function() {
var tubeurl = $(".stacks_in_75_page0Url",this).text();
var thumb = $.jYoutube(tubeurl , 'big');
$(".stacks_in_75_page0dooTube_ThumbLink",this).append("<img src=' " + thumb + " ' alt='" + tubeurl + "' />");
});


    
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)))
{
$(".stacks_in_75_page0title").html("Not Available to Play on iPhone, iPod or iPad");
}
else {
 
$('.stacks_in_75_page0dooTube_ThumbLink').click(function() {
var url = $("img",this).attr("alt");

$('.stacks_in_75_page0player').stacks_in_75_page0youTubeEmbed({
	video			: url,
	width			: popupwidth, 		// Height is calculated automatically
	progressBar	: false		// Hide the progress bar
	});

});

}





});

	return stack;
})(stacks.stacks_in_75_page0);


// Javascript for stacks_in_92_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_92_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_92_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;
	
/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 *
 * RGBA support by Mehdi Kabab <http://pioupioum.fr>
 */

(function(jQuery){
    jQuery.extend(jQuery.support, {
        "rgba": supportsRGBA()
    });

    // We override the animation for all of these color styles
    jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
        jQuery.fx.step[attr] = function(fx){
            var tuples = [];
            if ( !fx.colorInit ) {
                fx.start = getColor( fx.elem, attr );
                fx.end = getRGB( fx.end );
                fx.alphavalue = {
                    start: 4 === fx.start.length,
                    end:   4 === fx.end.length
                };
                if ( !fx.alphavalue.start ) {
                    fx.start.push( 1 );
                }
                if ( !fx.alphavalue.end ) {
                    fx.end.push( 1 );
                }
                if ( jQuery.support.rgba &&
                     (!fx.alphavalue.start && fx.alphavalue.end) || // RGB => RGBA
                     (fx.alphavalue.start && fx.alphavalue.end)  || // RGBA => RGBA
                     (fx.alphavalue.start && !fx.alphavalue.end)    // RGBA => RGB
                ) {
                    fx.colorModel = 'rgba';
                } else {
                    fx.colorModel = 'rgb';
                }
                fx.colorInit = true;
            }

            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0) ); // R
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0) ); // G
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) ); // B

            if ( fx.colorModel == 'rgba' ) {
                // Alpha
                tuples.push( Math.max(Math.min( parseFloat((fx.pos * (fx.end[3] - fx.start[3])) + fx.start[3]), 1), 0).toFixed(2) );
            }

            fx.elem.style[attr] = fx.colorModel + "(" + tuples.join(",") + ")";
        };
    });

    // Color Conversion functions from highlightFade
    // By Blair Mitchelmore
    // http://jquery.offput.ca/highlightFade/

    // Parse strings looking for color tuples [255,255,255[,1]]
    function getRGB(color) {
        var result, ret,
            ralpha = '(?:,\\s*((?:1|0)(?:\\.0+)?|(?:0?\\.[0-9]+))\\s*)?\\)',
            rrgbdecimal = new RegExp( 'rgb(a)?\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*' + ralpha ),
            rrgbpercent = new RegExp( 'rgb(a)?\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*' + ralpha );

        // Check if we're already dealing with an array of colors
        if ( color && color.constructor == Array && color.length >= 3 && color.length <= 4 ) {
            return color;
        }

        // Look for #a0b1c2
        if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) {
            return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
        }

        // Look for #fff
        if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) {
            return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
        }

        // Look for rgb[a](num,num,num[,num])
        if (result = rrgbdecimal.exec(color)) {
            ret = [parseInt(result[2]), parseInt(result[3]), parseInt(result[4])];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Look for rgb[a](num%,num%,num%[,num])
        if (result = rrgbpercent.exec(color)) {
            ret = [parseFloat(result[2]) * 2.55, parseFloat(result[3]) * 2.55, parseFloat(result[4]) * 2.55];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Otherwise, we're most likely dealing with a named color
        return colors[jQuery.trim(color).toLowerCase()];
    }

    function getColor(elem, attr) {
        var color;

        do {
            color = jQuery.curCSS(elem, attr);

            // Keep going until we find an element that has color, or we hit the body
            if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
                break;

            attr = "backgroundColor";
        } while ( elem = elem.parentNode );

        return getRGB(color);
    };

    function supportsRGBA() {
        var $script = jQuery('script:first'),
            color = $script.css('color'),
            result = false;
        if (/^rgba/.test(color)) {
                result = true;
        } else {
            try {
                result = ( color != $script.css('color', 'rgba(0, 0, 0, 0.5)').css('color') );
                $script.css('color', color);
            } catch (e) {};
        }

        return result;
    };

    // Some named colors to work with
    // From Interface by Stefan Petre
    // http://interface.eyecon.ro/

    var colors = {
        aqua:[0,255,255],
        azure:[240,255,255],
        beige:[245,245,220],
        black:[0,0,0],
        blue:[0,0,255],
        brown:[165,42,42],
        cyan:[0,255,255],
        darkblue:[0,0,139],
        darkcyan:[0,139,139],
        darkgrey:[169,169,169],
        darkgreen:[0,100,0],
        darkkhaki:[189,183,107],
        darkmagenta:[139,0,139],
        darkolivegreen:[85,107,47],
        darkorange:[255,140,0],
        darkorchid:[153,50,204],
        darkred:[139,0,0],
        darksalmon:[233,150,122],
        darkviolet:[148,0,211],
        fuchsia:[255,0,255],
        gold:[255,215,0],
        green:[0,128,0],
        indigo:[75,0,130],
        khaki:[240,230,140],
        lightblue:[173,216,230],
        lightcyan:[224,255,255],
        lightgreen:[144,238,144],
        lightgrey:[211,211,211],
        lightpink:[255,182,193],
        lightyellow:[255,255,224],
        lime:[0,255,0],
        magenta:[255,0,255],
        maroon:[128,0,0],
        navy:[0,0,128],
        olive:[128,128,0],
        orange:[255,165,0],
        pink:[255,192,203],
        purple:[128,0,128],
        violet:[128,0,128],
        red:[255,0,0],
        silver:[192,192,192],
        white:[255,255,255],
        yellow:[255,255,0],
        transparent: ( jQuery.support.rgba ) ? [0,0,0,0] : [255,255,255]
    };

})(jQuery);

function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
function opaHex(o) {
	var i = Math.floor(0.0 * 255);
	return i.toString(16);
	
}

$(document).ready(function(){
	$('#stacks_in_92_page0 .transbox').css('background','rgb('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+')');
	$('#stacks_in_92_page0 .transbox').css('background','rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.0)');  
	if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
		var ho = opaHex(0.0);
		$('#stacks_in_92_page0 .transbox').css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');  
		$('#stacks_in_92_page0 .transbox').css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');
	}
	if(true){
		$('#stacks_in_92_page0 .transbox').addClass('shadow');
	}

	if(false){
		$('#stacks_in_92_page0 .transbox').mouseenter(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 1.0)' }, 250);
			if(false){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}
		});
	
		$('#stacks_in_92_page0 .transbox').mouseleave(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.0)' }, 250);
			if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
				$(this).css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.0)+'FFFFFF, endColorstr=#88FFFFFF)');  
				$(this).css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.0)+'FFFFFF, endColorstr=#88FFFFFF)');
			}
			if(true){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}			
		});
	}
	
});
	return stack;
})(stacks.stacks_in_92_page0);


// Javascript for stacks_in_96_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_96_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_96_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;
	
/*
 *
 * Scroll Pane Advanced stack by Tsooj Media
 * Version 1.1.0
 *
 * Visit http://www.tsooj.net for more information on how to use this stacks product for RapidWeaver.
 *
 */


// Correct the width or height of the Scroll Pane Bar when using predefined arrows.
// Note that this change in CSS should be added before applying the Scroll Pane.

if (true) {
	document.write("<style type='text/css'>#stacks_in_96_page0 .jspVerticalBar {width: 15px;}</style>"); 
	document.write("<style type='text/css'>#stacks_in_96_page0 .jspHorizontalBar {height: 15px;}</style>"); 
}


// Correct the Scroll Pane Drag height based on automatic height setting.

if (false) {
	var atm_verticalDragMinHeight = 0;
	var atm_verticalDragMaxHeight = 99999;
	var atm_horizontalDragMinWidth = 0;
	var atm_horizontalDragMaxWidth = 99999;
}
else {
	var atm_verticalDragMinHeight = 40;
	var atm_verticalDragMaxHeight = 40;
	var atm_horizontalDragMinWidth = 40;
	var atm_horizontalDragMaxWidth = 40;
}


$(document).ready(function() {
	$('#stacks_in_96_page0 .atmScrollPane').jScrollPane({verticalDragMinHeight: atm_verticalDragMinHeight, verticalDragMaxHeight: atm_verticalDragMaxHeight, horizontalDragMinWidth: atm_horizontalDragMinWidth, horizontalDragMaxWidth: atm_horizontalDragMinWidth, showArrows: true});
});



	return stack;
})(stacks.stacks_in_96_page0);


// Javascript for stacks_in_100_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_100_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_100_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;
	

/*
 * Lifestream Stack By WeaverAddons.com
 * Version 1.0.7
 *
 * Visit http://www.weaveraddons.com for more information on how to use this stack in RapidWeaver.
 *
 */

/*
 * rfc3339date.js
 * Copyright (c) 2010 Paul GALLAGHER http://tardate.com
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * jQuery Templates Plugin 1.0.0pre
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * jQuery Lifestream Plug-in
 * @version 0.1.1
 * Copyright 2011, Christian Vuerings - http://denbuzze.com
 */

function relative_time(a){var b=parseInt(((new Date).getTime()-a)/1e3);return b<60?"less than a minute ago":b<120?"about a minute ago":b<3600?parseInt(b/60).toString()+" minutes ago":b<7200?"about an hour ago":b<86400?"about "+parseInt(b/3600).toString()+" hours ago":b<172800?"1 day ago":parseInt(b/86400).toString()+" days ago"}function isValidDate(a){if(Object.prototype.toString.call(a)!=="[object Date]")return!1;return!isNaN(a.getTime())}function parseDate(a){if(typeof a=="undefined")return!1;var b=new Date(a);isValidDate(b)||(b=Date.parse(a),isValidDate(b)||(a=a.split(" "),b=new Date(Date.parse(a[1]+" "+a[2]+", "+a[5]+" "+a[3]+" UTC"))));return b}Number.prototype.toPaddedString=function(a,b){var c=this.toString();typeof b=="undefined"&&(b="0");while(c.length<a)c=b+c;return c},Date.prototype.toRFC3339UTCString=function(a,b){var c=a?"":"-",d=a?"":":",e=this.getUTCFullYear().toString();e+=c+(this.getUTCMonth()+1).toPaddedString(2),e+=c+this.getUTCDate().toPaddedString(2),e+="T"+this.getUTCHours().toPaddedString(2),e+=d+this.getUTCMinutes().toPaddedString(2),e+=d+this.getUTCSeconds().toPaddedString(2),!b&&this.getUTCMilliseconds()>0&&(e+="."+this.getUTCMilliseconds().toPaddedString(3));return e+"Z"},Date.prototype.toRFC3339LocaleString=function(a,b){var c=a?"":"-",d=a?"":":",e=this.getFullYear().toString();e+=c+(this.getMonth()+1).toPaddedString(2),e+=c+this.getDate().toPaddedString(2),e+="T"+this.getHours().toPaddedString(2),e+=d+this.getMinutes().toPaddedString(2),e+=d+this.getSeconds().toPaddedString(2),!b&&this.getMilliseconds()>0&&(e+="."+this.getMilliseconds().toPaddedString(3));var f=-this.getTimezoneOffset();e+=f<0?"-":"+",e+=(f/60).toPaddedString(2),e+=d+(f%60).toPaddedString(2);return e},Date.parseRFC3339=function(a){if(typeof a=="string"){var b,c=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)?(:)?(\d\d)?([\.,]\d+)?($|Z|([+-])(\d\d)(:)?(\d\d)?)/i,d=a.match(new RegExp(c));if(d){var e=parseInt(d[1],10),f=parseInt(d[3],10)-1,g=parseInt(d[5],10),h=parseInt(d[7],10),i=d[9]?parseInt(d[9],10):0,j=d[11]?parseInt(d[11],10):0,k=d[12]?parseFloat(String(1.5).charAt(1)+d[12].slice(1))*1e3:0;if(d[13]){b=new Date,b.setUTCFullYear(e),b.setUTCMonth(f),b.setUTCDate(g),b.setUTCHours(h),b.setUTCMinutes(i),b.setUTCSeconds(j),b.setUTCMilliseconds(k);if(d[13]&&d[14]){var l=d[15]*60;d[17]&&(l+=parseInt(d[17],10)),l*=d[14]=="-"?-1:1,b.setTime(b.getTime()-l*60*1e3)}}else b=new Date(e,f,g,h,i,j,k)}return b}};if(typeof Date.parse!="function")Date.parse=Date.parseRFC3339;else{var oldparse=Date.parse;Date.parse=function(a){var b=Date.parseRFC3339(a);!b&&oldparse&&(b=oldparse(a));return b}}(function(a,b){function z(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]),a(b).remove()}function y(b,c){var d=this._wrap;return a.map(a(a.isArray(d)?d.join(""):d).filter(b||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||t(a)})}function x(b,c){var d=b.options||{};d.wrapped=c;return a.tmpl(a.template(b.tmpl),b.data,d,b.item)}function w(b,c,d){return a.tmpl(a.template(b),c,d,this)}function v(a,b,c,d){if(!a)return l.pop();l.push({_:a,tmpl:b,item:this,data:c,options:d})}function u(b){function p(b){function p(a){a=a+c,n=i[a]=i[a]||m(n,f[n.parent.key+c]||n.parent)}var e,h=b,l,n,o;if(o=b.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(e=h.getAttribute(d)));e!==o&&(h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)||0:0,(n=f[o])||(n=g[o],n=m(n,f[h]||g[h]),n.key=++j,f[j]=n),k&&p(o)),b.removeAttribute(d)}else k&&(n=a.data(b,"tmplItem"))&&(p(n.key),f[n.key]=n,h=a.data(b.parentNode,"tmplItem"),h=h?h.key:0);if(n){l=n;while(l&&l.key!=h)l.nodes.push(b),l=l.parent;delete n._ctnt,delete n._wrap,a.data(b,"tmplItem",n)}}var c="_"+k,e,h,i={},l,n,o;for(l=0,n=b.length;l<n;l++){if((e=b[l]).nodeType!==1)continue;h=e.getElementsByTagName("*");for(o=h.length-1;o>=0;o--)p(h[o]);p(e)}}function t(a){var b=document.createElement("div");b.appendChild(a.cloneNode(!0));return b.innerHTML}function s(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function r(b,c){b._wrap=o(b,!0,a.isArray(c)?c:[e.test(c)?c:a(c).html()]).join("")}function q(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(b,c,d,e,f,g,h){var i=a.tmpl.tag[d],j,k,l;if(!i)throw"Unknown template tag: "+d;j=i._default||[],g&&!/\w$/.test(f)&&(f+=g,g=""),f?(f=s(f),h=h?","+s(h)+")":g?")":"",k=g?f.indexOf(".")>-1?f+s(g):"("+f+").call($item"+h:f,l=g?k:"(typeof("+f+")==='function'?("+f+").call($item):("+f+"))"):l=k=j.$1||"null",e=s(e);return"');"+i[c?"close":"open"].split("$notnull_1").join(f?"typeof("+f+")!=='undefined' && ("+f+")!=null":"true").split("$1a").join(l).split("$1").join(k).split("$2").join(e||j.$2||"")+"__.push('"})+"');}return __;")}function p(b){var c=document.createElement("div");c.innerHTML=b;return a.makeArray(c.childNodes)}function o(b,c,e){var f,g=e?a.map(e,function(a){return typeof a=="string"?b.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+b.key+'" $2'):a:o(a,b,a._ctnt)}):b;if(c)return g;g=g.join(""),g.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(b,c,d,e){f=a(d).get(),u(f),c&&(f=p(c).concat(f)),e&&(f=f.concat(p(e)))});return f?f:p(g)}function m(b,c,d,e){var h={data:e||e===0||e===!1?e:c?c.data:{},_wrap:c?c._wrap:null,tmpl:null,parent:c||null,nodes:[],calls:v,nest:w,wrap:x,html:y,update:z};b&&a.extend(h,b,{nodes:[],parent:c}),d&&(h.tmpl=d,h._ctnt=h._ctnt||h.tmpl(a,h),h.key=++j,(l.length?g:f)[j]=h);return h}var c=a.fn.domManip,d="_tmplitem",e=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,f={},g={},h,i={key:0,data:{}},j=0,k=0,l=[];a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,c){a.fn[b]=function(d){var e=[],g=a(d),i,j,l,m,n=this.length===1&&this[0].parentNode;h=f||{};if(n&&n.nodeType===11&&n.childNodes.length===1&&g.length===1)g[c](this[0]),e=this;else{for(j=0,l=g.length;j<l;j++)k=j,i=(j>0?this.clone(!0):this).get(),a(g[j])[c](i),e=e.concat(i);k=0,e=this.pushStack(e,b,g.selector)}m=h,h=null,a.tmpl.complete(m);return e}}),a.fn.extend({tmpl:function(b,c,d){return a.tmpl(this[0],b,c,d)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(b,d,e,g){if(b[0]&&a.isArray(b[0])){var i=a.makeArray(arguments),j=b[0],l=j.length,m=0,n;while(m<l&&!(n=a.data(j[m++],"tmplItem")));n&&k&&(i[2]=function(b){a.tmpl.afterManip(this,b,e)}),c.apply(this,i)}else c.apply(this,arguments);k=0,h||a.tmpl.complete(f);return this}}),a.extend({tmpl:function(b,c,d,e){var h,j=!e;if(j)e=i,b=a.template[b]||a.template(null,b),g={};else if(!b){b=e.tmpl,f[e.key]=e,e.nodes=[],e.wrapped&&r(e,e.wrapped);return a(o(e,null,e.tmpl(a,e)))}if(!b)return[];typeof c=="function"&&(c=c.call(e||{})),d&&d.wrapped&&r(d,d.wrapped),h=a.isArray(c)?a.map(c,function(a){return a?m(d,e,b,a):null}):[m(d,e,b,c)];return j?a(o(e,null,h)):h},tmplItem:function(b){var c;b instanceof a&&(b=b[0]);while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||i},template:function(b,c){if(c){typeof c=="string"?c=q(c):c instanceof a&&(c=c[0]||{}),c.nodeType&&(c=a.data(c,"tmpl")||a.data(c,"tmpl",q(c.innerHTML)));return typeof b=="string"?a.template[b]=c:c}return b?typeof b!="string"?a.template(null,b):a.template[b]||a.template(null,e.test(b)?b:a(b)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}}),a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(a){f={}},afterManip:function(b,c,d){var e=c.nodeType===11?a.makeArray(c.childNodes):c.nodeType===1?[c]:[];d.call(b,c),u(e),k++}})})(jQuery),function(a){a.fn.lifestream=function(b){return this.each(function(){var c=a(this),d=jQuery.extend({classname:"lifestream",feedloaded:null,limit:10,list:[]},b),e={count:0,finished:0,items:[]},f=jQuery.extend(!0,{},d),g=null,h=function(){c.removeClass("loading"),e.items.sort(function(a,b){return b.date-a.date});var b=e.items,f=b.length<d.limit?b.length:d.limit,g=0,h,i=a('<ul class="'+d.classname+'"/>');for(;g<f;g++){h=b[g];if(h.html){var j=a('<li class="'+d.classname+"-"+h.config.service+'">').data("time",h.date).append(h.html);d.showTime&&j.append(" ("+relative_time(e.items[g].date)+")"),j.appendTo(i)}}c.html(i),a.isFunction(d.feedloaded)&&d.feedloaded()},i=function(b){e.finished++,a.merge(e.items,b),clearTimeout(g);d.waitUntilLoaded&&e.finished!=e.count?g=setTimeout(h,1500):h()},j=function(){c.addClass("loading"),g=setTimeout(h,1500);var b=0,j=d.list.length;delete f.list;for(;b<j;b++){var k=d.list[b];k.openLinksInNewWindow=d.openLinksInNewWindow,a.fn.lifestream.feeds[k.service]&&a.isFunction(a.fn.lifestream.feeds[k.service])&&k.user&&k.user!="..."&&(e.count++,k._settings=f,a.fn.lifestream.feeds[k.service](k,i))}};j()})},a.fn.lifestream.createYqlUrl=function(a){return"http://query.yahooapis.com/v1/public/yql?q=__QUERY__&env=store://datatables.org/alltableswithkeys&format=json".replace("__QUERY__",encodeURIComponent(a))},a.fn.lifestream.feeds=a.fn.lifestream.feeds||{},a.fn.lifestream.feeds.blogger=function(b,c){var d=a.extend({},{posted:'posted <a href="${origLink}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template),e=function(c){var e=[],f,g=0,h,i,j,k;if(c.query&&c.query.count&&c.query.count>0&&c.query.results.feed.entry){f=c.query.results.feed.entry,h=f.length;for(;g<h;g++){i=f[g];if(!i.origLink){j=0,k=i.link.length;for(;j<k;j++)i.link[j].rel==="alternate"&&(i.origLink=i.link[j].href)}i.origLink&&(i.title.content&&(i.title=i.title.content),e.push({date:parseDate(i.published),config:b,html:a.tmpl(d.posted,i)}))}}return e};a.ajax({url:a.fn.lifestream.createYqlUrl('select * from xml where url="http://'+b.user+'.blogspot.com/feeds/posts/default"'),success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.dailymotion=function(b,c){b.template={item:'uploaded a video <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.link="http://www.dailymotion.com/rss/user/"+b.user,a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.delicious=function(b,c){var d=a.extend({},{bookmarked:'bookmarked <a href="${u}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${d}</a>"},b.template);a.ajax({dataType:"jsonp",url:"http://feeds.delicious.com/v2/json/"+b.user,success:function(e){var f=[],g=0,h;if(e&&e.length&&e.length>0){h=e.length;for(;g<h;g++){var i=e[g];f.push({date:parseDate(i.dt),config:b,html:a.tmpl(d.bookmarked,i)})}}c(f)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.deviantart=function(b,c){var d=a.extend({},{posted:'posted <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template);a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select title,link,pubDate from rss where url="http://backend.deviantart.com/rss.xml?q=gallery%3A'+encodeURIComponent(b.user)+"&type=deviation"+'" | unique(field="title")'),success:function(e){var f=[],g,h,i=0,j;if(e.query&&e.query.count>0){g=e.query.results.item,j=g.length;for(;i<j;i++)h=g[i],f.push({date:parseDate(h.pubDate),config:b,html:a.tmpl(d.posted,h)})}c(f)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.dribbble=function(b,c){var d=a.extend({},{posted:'posted a shot <a href="${url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template);a.ajax({dataType:"jsonp",url:"http://api.dribbble.com/players/"+b.user+"/shots",success:function(e){var f=[],g=0,h;if(e&&e.total){h=e.shots.length;for(;g<h;g++){var i=e.shots[g];f.push({date:parseDate(i.created_at),config:b,html:a.tmpl(d.posted,i)})}}c(f)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.flickr=function(b,c){var d=a.extend({},{posted:'posted a photo <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template);a.ajax({dataType:"jsonp",url:"http://api.flickr.com/services/feeds/photos_public.gne?id="+b.user+"&lang=en-us&format=json",success:function(e){var f=[],g=0,h;if(e&&e.items&&e.items.length>0){h=e.items.length;for(;g<h;g++){var i=e.items[g];f.push({date:parseDate(i.published),config:b,html:a.tmpl(d.posted,i)})}}c(f)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.foomark=function(b,c){var d=a.extend({},{bookmarked:'bookmarked <a href="${url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${url}</a>"},b.template);a.ajax({dataType:"jsonp",url:"http://api.foomark.com/urls/list/?username="+b.user+"&format=json",success:function(e){var f=[],g=0,h;if(e&&e.length&&e.length>0){h=e.length;for(;g<h;g++){var i=e[g];f.push({date:parseDate(i.created_at.replace(" ","T")),config:b,html:a.tmpl(d.bookmarked,i)})}}c(f)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.formspring=function(b,c){b.template={item:'answered a question <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.link="http://www.formspring.me/profile/"+b.user+".rss",a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.forrst=function(b,c){var d=a.extend({},{posted:'posted a ${post_type} <a href="${post_url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template);a.ajax({dataType:"jsonp",url:"http://forrst.com/api/v2/users/posts?username="+b.user,success:function(e){var f=[],g=0,h;if(e&&e.resp.length&&e.resp.length>0){h=e.resp.length;for(;g<h;g++){var i=e.resp[g];f.push({date:parseDate(i.created_at.replace(" ","T")),config:b,html:a.tmpl(d.posted,i)})}}c(f)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.foursquare=function(b,c){var d=a.extend({},{checkedin:'checked in @ <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template),e=function(c){var e=[],f=0,g;if(c.query&&c.query.count&&c.query.count>0){g=c.query.count;for(;f<g;f++){var h=c.query.results.item[f];e.push({date:parseDate(h.pubDate),config:b,html:a.tmpl(d.checkedin,h)})}}return e};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select * from rss where url="https://feeds.foursquare.com/history/'+b.user+'.rss"'),success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.github=function(b,c){var d=a.extend({},{pushed:'<a href="${status.url}" title="{{if title}}${title} by ${author} {{/if}}"'+(b.openLinksInNewWindow?' target="_blank"':"")+'>pushed</a> to <a href="http://github.com/'+'${repo}/tree/${branchname}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${branchname}</a> at "+'<a href="http://github.com/${repo}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${repo}</a>",gist:'<a href="${status.payload.url}" title="${status.payload.desc || ""}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${status.payload.name}</a>",commented:'commented on <a href="${status.url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${what}</a> on "+'<a href="http://github.com/${repo}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${repo}</a>",pullrequest:'${status.payload.action} <a href="${status.url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">"+"pull request #${status.payload.number}</a> on "+'<a href="http://github.com/${repo}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${repo}</a>",created:'created ${status.payload.ref_type || status.payload.object} <a href="${status.url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${status.payload.ref || "+"status.payload.object_name}</a> for "+'<a href="http://github.com/${repo}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${repo}</a>",createdglobal:'created ${status.payload.object} <a href="${status.url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>",deleted:'deleted ${status.payload.ref_type} ${status.payload.ref} at <a href="http://github.com/${status.repository.owner}/${status.repository.name}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${status.repository.owner}/"+"${status.repository.name}</a>"},b.template),e=function(a){return a.payload.repo||(a.repository?a.repository.owner+"/"+a.repository.name:null)||a.url.split("/")[3]+"/"+a.url.split("/")[4]},f=function(b){var c,f,g;if(b.type==="PushEvent"){f=b.payload&&b.payload.shas&&b.payload.shas.json&&b.payload.shas.json[2],c=e(b);return a.tmpl(d.pushed,{status:b,title:f,author:f?b.payload.shas.json[3]:"",branchname:b.payload.ref.split("/")[2],repo:e(b)})}if(b.type==="GistEvent")return a.tmpl(d.gist,{status:b});if(b.type==="CommitCommentEvent"){g="commit "+b.url.split("commit/")[1].split("#")[0].substring(0,7),c=e(b);return a.tmpl(d.commented,{what:g,repo:c,status:b})}if(b.type==="IssueCommentEvent"){g="issue "+b.url.split("issues/")[1].split("#")[0],c=e(b);return a.tmpl(d.commented,{what:g,repo:c,status:b})}if(b.type==="PullRequestEvent"){c=e(b);return a.tmpl(d.pullrequest,{repo:c,status:b})}if(b.type==="CreateEvent"&&(b.payload.ref_type==="tag"||b.payload.ref_type==="branch"||b.payload.object==="tag")){c=e(b);return a.tmpl(d.created,{repo:c,status:b})}if(b.type==="CreateEvent"){f=b.payload.object_name==="null"?b.payload.name:b.payload.object_name;return a.tmpl(d.createdglobal,{title:f,status:b})}if(b.type==="DeleteEvent")return a.tmpl(d.deleted,{status:b})},g=function(a){var c=[],d=0,e;if(a.query&&a.query.count&&a.query.count>0){e=a.query.count;for(;d<e;d++){var g=a.query.results.json[d].json;c.push({date:parseDate(g.created_at),config:b,html:f(g)})}}return c};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select json.repository.owner,json.repository.name,json.payload,json.type,json.url, json.created_at from json where url="http://github.com/'+b.user+'.json"'),success:function(a){c(g(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.googlereader=function(b,c){var d=a.extend({},{starred:'shared post <a href="${link.href}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title.content}</a>"},b.template),e=function(c){var e=[],f,g=0,h;if(c.query&&c.query.count&&c.query.count>0){f=c.query.results.feed.entry,h=f.length;for(;g<h;g++){var i=f[g];e.push({date:parseDate(parseInt(i["crawl-timestamp-msec"],10)),config:b,html:a.tmpl(d.starred,i)})}}return e};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select * from xml where url="www.google.com/reader/public/atom/user%2F'+b.user+'%2Fstate%2Fcom.google%2Fbroadcast"'),success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.instapaper=function(b,c){b.template={item:'loved <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.link="http://www.instapaper.com/starred/rss/"+b.user,a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.iusethis=function(b,c){var d=a.extend({},{global:'${action} <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${what}</a> on (${os})"},b.template),e=function(c){var e=[],f,g,h,i,j,k=0,l,m,n,o,p,q,r,s=["iPhone","OS X","Windows"];if(c.query&&c.query.count&&c.query.count>0&&c.query.results.rss){l=c.query.results.rss.length||1,l==1&&(c.query.results.rss=[c.query.results.rss]),o=["started using","stopped using","stopped loving","Downloaded","commented on","updated entry for","started loving","registered"],j=o.length,l=2;for(;k<l;k++){if(!c.query.results.rss[k]||!c.query.results.rss[k].channel||!c.query.results.rss[k].channel.item)continue;c.query.results.rss[k].channel.link.match(/iphone/)?r="iPhone":c.query.results.rss[k].channel.link.match(/osx/)?r="OS X":r="Windows",f=c.query.results.rss[k].channel.item,g=0,h=f.length;for(;g<h;g++){m=f[g],n=m.title.replace(b.user+" ",""),i=0;for(;i<j;i++)if(n.indexOf(o[i])>-1){p=o[i];break}q=n.split(p),e.push({date:parseDate(m.pubDate),config:b,html:a.tmpl(d.global,{action:p.toLowerCase(),link:m.link,what:q[1],os:r})})}}}return e};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select * from xml where url="http://iphone.iusethis.com/user/feed.rss/'+b.user+'" or '+'url="http://osx.iusethis.com/user/feed.rss/'+b.user+'" or '+'url="http://win.iusethis.com/user/feed.rss/'+b.user+'"'),success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.lastfm=function(b,c){var d=a.extend({},{loved:'loved <a href="${url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${name}</a> by "+'<a href="${artist.url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${artist.name}</a>"},b.template),e=function(c){var e=[],f,g=0,h;if(c.query&&c.query.count&&c.query.count>0&&c.query.results.lovedtracks&&c.query.results.lovedtracks.track){f=c.query.results.lovedtracks.track,h=f.length;for(;g<h;g++){var i=f[g];e.push({date:parseDate(parseInt(i.date.uts*1e3,10)),config:b,html:a.tmpl(d.loved,i)})}}return e};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select * from xml where url="http://ws.audioscrobbler.com/2.0/user/'+b.user+'/lovedtracks.xml"'),success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.mlkshk=function(b,c){b.template={item:'posted <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.link="http://mlkshk.com/shake/"+b.user+"/rss",a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.picplz=function(b,c){var d=a.extend({},{uploaded:'uploaded <a href="${url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template);a.ajax({dataType:"jsonp",url:"http://picplz.com/api/v2/user.json?username="+b.user+"&include_pics=1",success:function(e){var f=[],g=0,h,i;i=e.value.users[0].pics;if(i&&i.length&&i.length>0){h=i.length;for(;g<h;g++){var j=i[g];f.push({date:parseDate(j.date*1e3),config:b,html:a.tmpl(d.uploaded,{url:j.pic_files["640r"].img_url,title:j.caption||j.id})})}}c(f)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.pinboard=function(b,c){var d=a.extend({},{bookmarked:'bookmarked <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template),e=function(c){var e=[],f,g=0,h,i;if(c.query&&c.query.count&&c.query.count>0){f=c.query.results.RDF.item,h=f.length;for(;g<h;g++)i=f[g],e.push({date:parseDate(i.date),config:b,html:a.tmpl(d.bookmarked,i)})}return e};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select * from xml where url="http://feeds.pinboard.in/rss/u:'+b.user+'"'),success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.posterous=function(b,c){b.link="http://"+b.user+".posterous.com/rss.xml",a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.reddit=function(b,c){var d=a.extend({},{commented:'<a href="http://www.reddit.com/r/${item.data.subreddit}/comments/${item.data.link_id.substring(3)}/u/${item.data.name.substring(3)}?context=3"'+(b.openLinksInNewWindow?' target="_blank"':"")+">commented "+'(${score})</a> in <a href="http://www.reddit.com/r/'+'${item.data.subreddit}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${item.data.subreddit}</a>",created:'<a href="http://www.reddit.com${item.data.permalink}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">"+"created new thread (${score})</a> in "+'<a href="http://www.reddit.com/r/${item.data.subreddit}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">"+"${item.data.subreddit}</a>"},b.template),e=function(b){var c=b.data.ups-b.data.downs,e={item:b,score:c>0?"+"+c:c};if(b.kind==="t1")return a.tmpl(d.commented,e);if(b.kind==="t3")return a.tmpl(d.created,e)},f=function(a){return parseDate(a*1e3)};a.ajax({dataType:"jsonp",url:"http://www.reddit.com/user/"+b.user+".json",success:function(a){var d=[],g=0,h;if(a&&a.data&&a.data.children&&a.data.children.length>0){h=a.data.children.length;for(;g<h;g++){var i=a.data.children[g];d.push({date:f(i.data.created),config:b,html:e(i)})}}c(d)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.slideshare=function(b,c){b.template={item:'uploaded a presentation <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.link="http://www.slideshare.net/rss/user/"+b.user,a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.snipplr=function(b,c){b.template={item:'posted a snippet <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.link="http://snipplr.com/rss/users/"+b.user,a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.stackoverflow=function(b,c){var d=a.extend({},{global:'<a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${text}</a> - ${title}"},b.template),e=function(a){var c="",d="",e="",f="http://stackoverflow.com/users/"+b.user,g="http://stackoverflow.com/questions/";if(a.timeline_type==="badge")c=a.timeline_type+" "+a.action+": "+a.description,d=a.detail,e=f+"?tab=reputation";else if(a.timeline_type==="revision"||a.timeline_type==="comment"||a.timeline_type==="accepted"||a.timeline_type==="askoranswered")c=a.post_type+" "+a.action,d=a.detail||a.description||"",e=g+a.post_id;return{link:e,title:d,text:c}},f=function(a){return parseDate(a*1e3)};a.ajax({dataType:"jsonp",url:"http://api.stackoverflow.com/1.1/users/"+b.user+"/timeline?"+"jsonp",success:function(g){var h=[],i=0,j;if(g&&g.total&&g.total>0&&g.user_timelines){j=g.user_timelines.length;for(;i<j;i++){var k=g.user_timelines[i];h.push({date:f(k.creation_date),config:b,html:a.tmpl(d.global,e(k))})}}c(h)},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.tumblr=function(b,c){var d=a.extend({},{posted:'posted a ${type} <a href="${url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template),e=function(a){var b=a["regular-title"]||a["quote-text"]||a["conversation-title"]||a["photo-caption"]||a["video-caption"]||a["audio-caption"]||a["regular-body"]||a["link-text"]||a.type||"";return b.replace(/<.+?>/gi," ")},f=function(b,c){return{date:parseDate(c.date),config:b,html:a.tmpl(d.posted,{type:c.type,url:c.url,title:e(c)})}},g=function(c){var d=[],e=0,g,h;if(c.query&&c.query.count&&c.query.count>0)if(a.isArray(c.query.results.posts.post)){g=c.query.results.posts.post.length;for(;e<g;e++)h=c.query.results.posts.post[e],d.push(f(b,h))}else a.isPlainObject(c.query.results.posts.post)&&d.push(f(b,c.query.results.posts.post));return d};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select * from tumblr.posts where username="'+b.user+'"'),success:function(a){c(g(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.twitter=function(b,c){var d=a.extend({},{posted:"{{html tweet}}"},b.template),e=function(a,b){var c=function(a){return a.replace(/[a-z]+:\/\/[a-z0-9-_]+\.[a-z0-9-_:~%&\?\/.=]+[^:\.,\)\s*$]/ig,function(a){return'<a href="'+a+'"'+(b?' target="_blank"':"")+">"+(a.length>25?a.substr(0,24)+"...":a)+"</a>"})},d=function(a){return a.replace(/(^|[^\w]+)\@([a-zA-Z0-9_]{1,15})/g,function(a,c,d){return c+'<a href="http://twitter.com/'+d+'"'+(b?' target="_blank"':"")+">@"+d+"</a>"})},e=function(a){return a.replace(/(^|[^\w'"]+)\#([a-zA-Z0-9_]+)/g,function(a,c,d){return c+'<a href="http://search.twitter.com/search?q=%23'+d+'"'+(b?' target="_blank"':"")+">#"+d+"</a>"})};return e(d(c(a)))},f=function(c){var f=[],g=0,h;if(c.query&&c.query.count&&c.query.count>0){h=c.query.count;for(;g<h;g++){var i=c.query.results.statuses[g].status;f.push({date:parseDate(i.created_at),config:b,html:a.tmpl(d.posted,{tweet:e(i.text,b.openLinksInNewWindow)+' <a href="http://twitter.com/#!/'+i.user.screen_name+"/statuses/"+i.id+'"'+(b.openLinksInNewWindow?' target="_blank"':"")+">#</a>"})})}}return f};a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select status.id, status.user.screen_name, status.created_at,status.text from twitter.user.timeline where screen_name="'+b.user+'"'),success:function(a){c(f(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.vimeo=function(b,c){var d=a.extend({},{posted:'posted <a href="${url}"'+(b.openLinksInNewWindow?' target="_blank"':"")+' title="${description}">${title}</a>'},b.template),e=function(c){var e=[],f=0,g,h;if(c){g=c.length;for(;f<g;f++)h=c[f],e.push({date:parseDate(h.upload_date.replace(" ","T")),config:b,html:a.tmpl(d.posted,{url:h.url,description:h.description.replace(/"/g,"'").replace(/<.+?>/gi,""),title:h.title})})}return e};a.ajax({dataType:"jsonp",url:"http://vimeo.com/api/v2/"+b.user+"/videos.json",success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.rss=function(b,c){var d=a.extend({},{item:'posted <a href="${link}"'+(b.openLinksInNewWindow?' target="_blank"':"")+">${title}</a>"},b.template);parseRss=function(c){var e=[],f,g=0,h,i;if(c.query&&c.query.count&&c.query.count>0)if(c.query.results.rss.channel.item){f=c.query.results.rss.channel.item,h=f.length;for(;g<h;g++)i=f[g],i.date&&!i.pubDate&&(i.pubDate=i.date),e.push({date:parseDate(i.pubDate),config:b,html:a.tmpl(d.item,i)})}else{h=c.query.count;for(;g<h;g++){var i=c.query.results.item[g];i.date&&!i.pubDate&&(i.pubDate=i.date),e.push({date:parseDate(i.pubDate),config:b,html:a.tmpl(d.checkedin,i)})}}return e},a.ajax({dataType:"jsonp",url:a.fn.lifestream.createYqlUrl('select * from xml where url="'+(b.link?b.link:b.user)+'"'),success:function(a){c(parseRss(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.wordpress=function(b,c){b.link="http://"+b.user+".wordpress.com/feed",a.fn.lifestream.feeds.rss(b,c)},a.fn.lifestream.feeds.youtube=function(b,c){var d=a.extend({},{uploaded:"uploaded <a href=\"${player['default']}\""+(b.openLinksInNewWindow?' target="_blank"':"")+" "+'title="${description}">${title}</a>'},b.template),e=function(c){var e=[],f=0,g,h;if(c.data&&c.data.items){g=c.data.items.length;for(;f<g;f++)h=c.data.items[f],e.push({date:parseDate(h.uploaded),config:b,html:a.tmpl(d.uploaded,h)})}return e};a.ajax({dataType:"jsonp",url:"http://gdata.youtube.com/feeds/api/users/"+b.user+"/uploads?v=2&alt=jsonc",success:function(a){c(e(a))},error:function(){c([])}});return{template:d}},a.fn.lifestream.feeds.facebook=function(b,c){var d=a.extend({},{posted:"{{html message}}"},b.template),e=function(a){var b,c,d,e,f,g,h,i,j,k,l=a.indexOf(" ")==-1&&a.substr(4,1)=="-"&&a.substr(7,1)=="-"&&a.substr(10,1)=="T"?!0:!1;if(l)b=a.substr(0,4),c=parseInt(a.substr(5,1)=="0"?a.substr(6,1):a.substr(5,2))-1,d=a.substr(8,2),e=a.substr(11,2),f=a.substr(14,2),g=Date.UTC(b,c,d,e,f),h=parseDate(g);else{j=a.split(" ");if(j.length!=6||j[4]!="at")return a;k=j[5].split(":"),i=k[1].substr(2),f=k[1].substr(0,2),e=parseInt(k[0]),i=="pm"&&(e+=12),h=parseDate(j[1]+" "+j[2]+" "+j[3]+" "+e+":"+f),h.setTime(h.getTime()-252e5)}return h};parseFacebook=function(c){var f=[];c.data&&a(c.data).each(function(){var c=this.created_time;if(this.type=="link")var g='posted a link <a href="'+this.link+'"'+(b.openLinksInNewWindow?' target="_blank"':"")+">"+this.name+"</a>";else if(this.type=="status")var g=this.message?this.message:this.name;else var g="posted a "+this.type+" "+(this.type=="photo"?"in ":"")+(this.link?'<a href="'+this.link+'"'+(b.openLinksInNewWindow?' target="_blank"':"")+">"+this.name+"</a> ":"")+(this.message&&this.message!=this.name?" - "+this.message:this.description?" - "+this.description:"");f.push({date:e(c),config:b,html:a.tmpl(d.posted,{message:g})})});return f},a.ajax({dataType:"jsonp",url:"https://graph.facebook.com/"+b.user+"/posts?access_token="+b.access_token+"&limit=20",success:function(a){c(parseFacebook(a))},error:function(){c([])}});return{template:d}}}(jQuery)

$(document).ready(function(){	
	$("#stacks_in_100_page0container").lifestream({
      limit: 10,
 	  waitUntilLoaded: true,
      showTime: true,
	  openLinksInNewWindow: true,
      list:[
	  		  {service: "twitter", user: "randolphinfo"},
	  		  {service: "facebook", user: "", "access_token": ""},
	  		  {service: "tumblr", user: ""},
	  		  {service: "posterous", user: $('#posterous_user_stacks_in_100_page0').text() },
	  		  {service: "wordpress", user: $('#wordpress_user_stacks_in_100_page0').text() },
			  {service: "youtube", user: ""},
			  {service: "vimeo", user: ""},
			  {service: "flickr", user: ""},
			  {service: "delicious", user: $('#delicious_stacks_in_100_page0').text() },
			  {service: "lastfm", user: $('#lastfm_stacks_in_100_page0').text() },
			  {service: "googlereader", user: $('#googlereader_stacks_in_100_page0').text() },
		      {service: "blogger", user: $('#blogger_stacks_in_100_page0').text() },
		      {service: "dailymotion", user: $('#dailymotion_stacks_in_100_page0').text() },
		      {service: "deviantart", user: $('#deviantart_stacks_in_100_page0').text() },
		      {service: "dribbble", user: $('#dribbble_stacks_in_100_page0').text() },
		      {service: "foomark", user: $('#foomark_stacks_in_100_page0').text() },
		      {service: "formspring", user: $('#formspring_stacks_in_100_page0').text() },
		      {service: "forrst", user: $('#forrst_stacks_in_100_page0').text() },
		      {service: "foursquare", user: $('#foursquare_stacks_in_100_page0').text() },
		      {service: "github", user: $('#github_stacks_in_100_page0').text() },
		      {service: "instapaper", user: $('#instapaper_stacks_in_100_page0').text() },
		      {service: "iusethis", user: $('#iusethis_stacks_in_100_page0').text() },
		      {service: "mlkshk", user: $('#mlkshk_stacks_in_100_page0').text() },
		      {service: "picplz", user: $('#picplz_stacks_in_100_page0').text() },
		      {service: "pinboard", user: $('#pinboard_stacks_in_100_page0').text() },
		      {service: "reddit", user: $('#reddit_stacks_in_100_page0').text() },
		      {service: "rss", user: $('#rss_stacks_in_100_page0').text() },
		      {service: "slideshare", user: $('#slideshare_stacks_in_100_page0').text() },
		      {service: "snipplr", user: $('#snipplr_stacks_in_100_page0').text() },
		      {service: "stackoverflow", user: $('#stackoverflow_stacks_in_100_page0').text() }
			]
    });
});

	return stack;
})(stacks.stacks_in_100_page0);


// Javascript for stacks_in_138_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_138_page0 = {};

// A closure is defined and assined to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for refering
// to this object from elsewhere.
stacks.stacks_in_138_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;
	
/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 *
 * RGBA support by Mehdi Kabab <http://pioupioum.fr>
 */

(function(jQuery){
    jQuery.extend(jQuery.support, {
        "rgba": supportsRGBA()
    });

    // We override the animation for all of these color styles
    jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
        jQuery.fx.step[attr] = function(fx){
            var tuples = [];
            if ( !fx.colorInit ) {
                fx.start = getColor( fx.elem, attr );
                fx.end = getRGB( fx.end );
                fx.alphavalue = {
                    start: 4 === fx.start.length,
                    end:   4 === fx.end.length
                };
                if ( !fx.alphavalue.start ) {
                    fx.start.push( 1 );
                }
                if ( !fx.alphavalue.end ) {
                    fx.end.push( 1 );
                }
                if ( jQuery.support.rgba &&
                     (!fx.alphavalue.start && fx.alphavalue.end) || // RGB => RGBA
                     (fx.alphavalue.start && fx.alphavalue.end)  || // RGBA => RGBA
                     (fx.alphavalue.start && !fx.alphavalue.end)    // RGBA => RGB
                ) {
                    fx.colorModel = 'rgba';
                } else {
                    fx.colorModel = 'rgb';
                }
                fx.colorInit = true;
            }

            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0) ); // R
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0) ); // G
            tuples.push( Math.max(Math.min( parseInt( (fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) ); // B

            if ( fx.colorModel == 'rgba' ) {
                // Alpha
                tuples.push( Math.max(Math.min( parseFloat((fx.pos * (fx.end[3] - fx.start[3])) + fx.start[3]), 1), 0).toFixed(2) );
            }

            fx.elem.style[attr] = fx.colorModel + "(" + tuples.join(",") + ")";
        };
    });

    // Color Conversion functions from highlightFade
    // By Blair Mitchelmore
    // http://jquery.offput.ca/highlightFade/

    // Parse strings looking for color tuples [255,255,255[,1]]
    function getRGB(color) {
        var result, ret,
            ralpha = '(?:,\\s*((?:1|0)(?:\\.0+)?|(?:0?\\.[0-9]+))\\s*)?\\)',
            rrgbdecimal = new RegExp( 'rgb(a)?\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*' + ralpha ),
            rrgbpercent = new RegExp( 'rgb(a)?\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*' + ralpha );

        // Check if we're already dealing with an array of colors
        if ( color && color.constructor == Array && color.length >= 3 && color.length <= 4 ) {
            return color;
        }

        // Look for #a0b1c2
        if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) {
            return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
        }

        // Look for #fff
        if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) {
            return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
        }

        // Look for rgb[a](num,num,num[,num])
        if (result = rrgbdecimal.exec(color)) {
            ret = [parseInt(result[2]), parseInt(result[3]), parseInt(result[4])];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Look for rgb[a](num%,num%,num%[,num])
        if (result = rrgbpercent.exec(color)) {
            ret = [parseFloat(result[2]) * 2.55, parseFloat(result[3]) * 2.55, parseFloat(result[4]) * 2.55];
            // is rgba?
            if (result[1] && result[5]) {
                ret.push(parseFloat(result[5]));
            }

            return ret;
        }

        // Otherwise, we're most likely dealing with a named color
        return colors[jQuery.trim(color).toLowerCase()];
    }

    function getColor(elem, attr) {
        var color;

        do {
            color = jQuery.curCSS(elem, attr);

            // Keep going until we find an element that has color, or we hit the body
            if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
                break;

            attr = "backgroundColor";
        } while ( elem = elem.parentNode );

        return getRGB(color);
    };

    function supportsRGBA() {
        var $script = jQuery('script:first'),
            color = $script.css('color'),
            result = false;
        if (/^rgba/.test(color)) {
                result = true;
        } else {
            try {
                result = ( color != $script.css('color', 'rgba(0, 0, 0, 0.5)').css('color') );
                $script.css('color', color);
            } catch (e) {};
        }

        return result;
    };

    // Some named colors to work with
    // From Interface by Stefan Petre
    // http://interface.eyecon.ro/

    var colors = {
        aqua:[0,255,255],
        azure:[240,255,255],
        beige:[245,245,220],
        black:[0,0,0],
        blue:[0,0,255],
        brown:[165,42,42],
        cyan:[0,255,255],
        darkblue:[0,0,139],
        darkcyan:[0,139,139],
        darkgrey:[169,169,169],
        darkgreen:[0,100,0],
        darkkhaki:[189,183,107],
        darkmagenta:[139,0,139],
        darkolivegreen:[85,107,47],
        darkorange:[255,140,0],
        darkorchid:[153,50,204],
        darkred:[139,0,0],
        darksalmon:[233,150,122],
        darkviolet:[148,0,211],
        fuchsia:[255,0,255],
        gold:[255,215,0],
        green:[0,128,0],
        indigo:[75,0,130],
        khaki:[240,230,140],
        lightblue:[173,216,230],
        lightcyan:[224,255,255],
        lightgreen:[144,238,144],
        lightgrey:[211,211,211],
        lightpink:[255,182,193],
        lightyellow:[255,255,224],
        lime:[0,255,0],
        magenta:[255,0,255],
        maroon:[128,0,0],
        navy:[0,0,128],
        olive:[128,128,0],
        orange:[255,165,0],
        pink:[255,192,203],
        purple:[128,0,128],
        violet:[128,0,128],
        red:[255,0,0],
        silver:[192,192,192],
        white:[255,255,255],
        yellow:[255,255,0],
        transparent: ( jQuery.support.rgba ) ? [0,0,0,0] : [255,255,255]
    };

})(jQuery);

function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
function opaHex(o) {
	var i = Math.floor(0.7 * 255);
	return i.toString(16);
	
}

$(document).ready(function(){
	$('#stacks_in_138_page0 .transbox').css('background','rgb('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+')');
	$('#stacks_in_138_page0 .transbox').css('background','rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.7)');  
	if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
		var ho = opaHex(0.7);
		$('#stacks_in_138_page0 .transbox').css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');  
		$('#stacks_in_138_page0 .transbox').css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+ho+'FFFFFF, endColorstr=#'+ho+'FFFFFF)');
	}
	if(true){
		$('#stacks_in_138_page0 .transbox').addClass('shadow');
	}

	if(false){
		$('#stacks_in_138_page0 .transbox').mouseenter(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 1.0)' }, 250);
			if(false){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}
		});
	
		$('#stacks_in_138_page0 .transbox').mouseleave(function(){
			$(this).animate({ "backgroundColor": 'rgba('+HexToR('FFFFFF')+', '+HexToG('FFFFFF')+', '+HexToB('FFFFFF')+', 0.7)' }, 250);
			if ( $.browser.msie && parseInt($.browser.version, 10) < 9) {
				$(this).css('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.7)+'FFFFFF, endColorstr=#88FFFFFF)');  
				$(this).css('-ms-filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#'+opaHex(0.7)+'FFFFFF, endColorstr=#88FFFFFF)');
			}
			if(true){
				$(this).addClass('shadow');
			}
			else{
				$(this).removeClass('shadow');
			}			
		});
	}
	
});
	return stack;
})(stacks.stacks_in_138_page0);



