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

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

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_248_page6 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

/*
 * Search Highlight By WeaverAddons.com
 * Version 1.1.0
 *
 * Visit http://www.weaveraddons.com for more information on how to use this stack in RapidWeaver.
 *
 */

(function(a){jQuery.fn.SearchHighlight=function(c){var d=c.debug_referrer||document.referrer;if(!d&&c.keys==undefined)return this;b.options=a.extend({exact:"exact",tag_name:"span",style_name:"hilite",style_name_suffix:!0},c),c.engines&&b.engines.unshift(c.engines);var e=b.splitKeywords(c.keys!=undefined?c.keys.toLowerCase():b.decodeURL(d,b.engines));if(e&&e.join("")){b.buildReplaceTools(e);if(!b.regex)return this;return this.each(function(){var c=this;c==document&&(c=a("body")[0]),b.hiliteElement(c)})}return this};var b={options:{},regex:null,engines:[[/^http:\/\/([a-z0-9]+\.)?google\./i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?search\.yahoo\./i,/p=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?search\.msn\./i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?search\.live\./i,/query=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?bing\./i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?search\.aol\./i,/userQuery=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?ask\.com/i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?altavista\./i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?feedster\./i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?search\.lycos\./i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?alltheweb\./i,/q=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?technorati\.com/i,/([^\?\/]+)(?:\?.*)$/i],[/^http:\/\/([a-z0-9]+\.)?baidu\.com/i,/wd=([^&]+)/i],[/^http:\/\/([a-z0-9]+\.)?youdao\.com/i,/q=([^&]+)/i]],subs:{},decodeURL:function(b,c){b=b.replace(/\+/g," ");try{b=decodeURIComponent(b)}catch(d){b=unescape(b)}var e=null;a.each(c,function(a,c){if(c[0].test(b)){var d=b.match(c[1]);if(d){e=d[1].toLowerCase();return!1}}});return e},splitKeywords:function(a){if(a){var b=a.match(/"([^"]*)"/g);if(b)for(var c=0,d=b.length;c<d;c++){var e=new RegExp(b[c]);a=a.replace(e,"@@@"+c+"@@@")}a=a.split(/[\s,\+]+/);if(b)for(var c=0,f=a.length;c<f;c++)for(var g=0,d=b.length;g<d;g++){var e=new RegExp("@@@"+g+"@@@");a[c]=a[c].replace(e,b[g].substring(1,b[g].length-1))}}return a},regexAccent:[[/[\xC0-\xC5\u0100-\u0105]/ig,"a"],[/[\xC7\u0106-\u010D]/ig,"c"],[/[\xC8-\xCB]/ig,"e"],[/[\xCC-\xCF]/ig,"i"],[/[\u0141]/ig,"l"],[/\xD1/ig,"n"],[/[\xD2-\xD6\xD8]/ig,"o"],[/[\u015A-\u0161]/ig,"s"],[/[\u0162-\u0167]/ig,"t"],[/[\xD9-\xDC]/ig,"u"],[/\xFF/ig,"y"],[/[\x91\x92\u2018\u2019]/ig,"'"]],matchAccent:/[\x91\x92\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD8-\xDC\xFF\u0100-\u010D\u0141\u015A-\u0167\u2018\u2019]/ig,replaceAccent:function(a){b.matchAccent.lastIndex=0;if(b.matchAccent.test(a))for(var c=0,d=b.regexAccent.length;c<d;c++)a=a.replace(b.regexAccent[c][0],b.regexAccent[c][1]);return a},escapeRegEx:/((?:\\{2})*)([[\]{}*?|])/g,buildReplaceTools:function(c){var d=[],e;a.each(c,function(a,c){(!b.options.min_length||c.length>=b.options.min_length)&&(c=b.replaceAccent(c).replace(b.escapeRegEx,"$1\\$2"))&&d.push(c)});if(!!d.length){e=d.join("|");switch(b.options.exact){case"exact":e="\\b(?:"+e+")\\b";break;case"whole":e="\\b\\w*("+e+")\\w*\\b"}b.regex=new RegExp(e,"gi"),a.each(d,function(a,c){b.subs[c]=b.options.style_name+(b.options.style_name_suffix?a+1:"")})}},nosearch:/s(?:cript|tyle)|textarea/i,hiliteElement:function(c){var d=b.options,e,f;e=d.highlight?a(d.highlight):a("body"),e.length||(e=a("body")),f=d.nohighlight?a(d.nohighlight):a([]),e.each(function(){b.hiliteTree(this,f)})},hiliteTree:function(c,d){if(d.index(c)==-1){var e=b.options.exact=="whole"?1:0;for(var f=0,g=c.childNodes.length;f<g;f++){var h=c.childNodes[f];if(h.nodeType!=8)if(h.nodeType==3){var i=h.data,j=b.replaceAccent(i),k="",l,m=0;b.regex.lastIndex=0;while(l=b.regex.exec(j))k+=b.fixTags(i.substr(m,l.index-m))+"<"+b.options.tag_name+' class="'+b.subs[l[e].toLowerCase()]+'">'+b.fixTags(i.substr(l.index,l[0].length))+"</"+b.options.tag_name+">",m=l.index+l[0].length;if(k){k+=b.fixTags(i.substring(m));var n=a.merge([],a("<"+b.options.tag_name+">"+k+"</"+b.options.tag_name+">")[0].childNodes);g+=n.length-1,f+=n.length-1,a(h).before(n).remove()}}else h.nodeType==1&&h.nodeName.search(b.nosearch)==-1&&b.hiliteTree(h,d)}}},fixTags:function(a){return a.replace("<","&lt;").replace(">","&gt;")}}})(jQuery)

$(document).ready(function(){	
  $(document).SearchHighlight({exact: 'exact', 		//exact, whole, partial
							   style_name: 'stacks_in_248_page6hilite',
							   style_name_suffix: false, 
							   highlight: $()});		
});

	return stack;
})(stacks.stacks_in_248_page6);


// Javascript for stacks_in_31_page6
// ---------------------------------------------------------------------

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

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_31_page6 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

/*
 * 3D Carousel Stack By WeaverAddons.com
 * Version 1.0.0
 *
 * Visit http://weaveraddons.com for more information on how to use this stack in RapidWeaver.
 *
 */



//////////////////////////////////////////////////////////////////////////////////
// CloudCarousel V1.0.5
// (c) 2011 by R Cecco. <http://www.professorcloud.com>
// MIT License
//
// Reflection code based on plugin by Christophe Beyls <http://www.digitalia.be>
//
// Please retain this copyright header in all versions of the software
//////////////////////////////////////////////////////////////////////////////////


(function(a){function q(b,f,c){var e,g,m=b.width,i=b.width,d;g=a(b.parentNode);this.element=e=g.append("<canvas class='reflection' style='position:absolute'/>").find(":last")[0];if(!e.getContext&&a.browser.msie)this.element=e=g.append("<img class='reflection' style='position:absolute'/>").find(":last")[0],e.src=b.src,e.style.filter="flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+100*c+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+100*(f/i)+")";else{g=e.getContext("2d");
try{a(e).attr({width:m,height:f}),g.save(),g.translate(0,i-1),g.scale(1,-1),g.drawImage(b,0,0,m,i),g.restore(),g.globalCompositeOperation="destination-out",d=g.createLinearGradient(0,0,0,f),d.addColorStop(0,"rgba(255, 255, 255, "+(1-c)+")"),d.addColorStop(1,"rgba(255, 255, 255, 1.0)"),g.fillStyle=d,g.fillRect(0,0,m,f)}catch(w){return}}a(e).attr({alt:a(b).attr("alt"),title:a(b).attr("title")})}function n(a){return a}var r=function(b,f){this.orgWidth=b.width;this.orgHeight=b.height;this.image=b;this.reflection=
null;this.alt=b.alt;this.title=b.title;this.imageOK=!1;this.options=f;this.imageOK=!0;if(0<this.options.reflHeight)this.reflection=new q(this.image,this.options.reflHeight,this.options.reflOpacity);a(this.image).css("position","absolute")},v=function(b,f,c){var e=[],g=Math.sin,m=Math.cos,i=this;this.controlTimer=0;this.stopped=!1;this.container=b;this.xRadius=c.xRadius;this.yRadius=c.yRadius;this.autoRotateTimer=this.showFrontTextTimer=0;if(0===c.xRadius)this.xRadius=a(b).width()/2.3;if(0===c.yRadius)this.yRadius=
a(b).height()/6;this.xCentre=c.xPos;this.yCentre=c.yPos;this.frontIndex=0;this.rotation=this.destRotation=Math.PI/2;this.timeDelay=1E3/c.FPS;this.imagesHaveLoaded=function(){null!==c.altBox&&(a(c.altBox).css("display","block"),a(c.titleBox).css("display","block"));a(b).css({position:"relative",overflow:"hidden"});a(c.buttonLeft).css("display","inline");a(c.buttonRight).css("display","inline");a(c.buttonLeft).bind("mouseup",this,function(a){a.data.rotate(-1);return!1});a(c.buttonRight).bind("mouseup",
this,function(a){a.data.rotate(1);return!1});c.mouseWheel&&a(b).bind("mousewheel",this,function(a,c){a.data.rotate(c);return!1});a(b).bind("mouseover click",this,function(d){clearInterval(d.data.autoRotateTimer);var b=a(d.target).attr("alt");void 0!==b&&null!==b&&(clearTimeout(d.data.showFrontTextTimer),a(c.altBox).html(a(d.target).attr("alt")),a(c.titleBox).html(a(d.target).attr("title")),c.bringToFront&&"click"==d.type&&(b=(a(d.target).data("itemIndex")-d.data.frontIndex)%f.length,Math.abs(b)>f.length/
2&&(b+=0<b?-f.length:f.length),d.data.rotate(-b)))});a(b).bind("mouseout",this,function(a){var b=a.data;clearTimeout(b.showFrontTextTimer);b.showFrontTextTimer=setTimeout(function(){b.showFrontText()},1E3);b.autoRotate()});a(b).bind("mousedown",this,function(a){a.data.container.focus();return!1});b.onselectstart=function(){return!1};this.innerWrapper=a(b).wrapInner('<div style="position:absolute;width:100%;height:100%;"/>').children()[0]};this.showFrontText=function(){void 0!==e[Math.abs(this.frontIndex)]&&
(a(c.titleBox).html(n(a(e[Math.abs(this.frontIndex)].image).attr("title"))),a(c.altBox).html(n(a(e[Math.abs(this.frontIndex)].image).attr("alt"))))};this.go=function(){if(0===this.controlTimer){var a=this;this.controlTimer=setTimeout(function(){a.updateAll()},this.timeDelay)}};this.stop=function(){clearTimeout(this.controlTimer);this.controlTimer=0};this.rotate=function(a){this.frontIndex-=a;this.frontIndex%=e.length;this.destRotation+=Math.PI/e.length*2*a;this.showFrontText();this.go()};this.autoRotate=
function(){if("no"!==c.autoRotate){var a="right"===c.autoRotate?1:-1;this.autoRotateTimer=setInterval(function(){i.rotate(a)},c.autoRotateDelay)}};this.updateAll=function(){var b=c.minScale,f=0.5*(1-b),o,s,l,t,k,h;l=this.destRotation-this.rotation;var i=Math.abs(l);this.rotation+=l*c.speed;if(0.001>i)this.rotation=this.destRotation;var n=e.length,q=2*(Math.PI/n),p=this.rotation,r=a.browser.msie;this.innerWrapper.style.display="none";for(var j,v=this,u=0;u<n;u++){h=e[u];o=g(p);k=(o+1)*f+b;l=this.xCentre+
(m(p)*this.xRadius-0.5*h.orgWidth)*k;t=this.yCentre+o*this.yRadius*k;if(h.imageOK&&(j=h.image,o=j.width=h.orgWidth*k,s=j.height=h.orgHeight*k,j.style.left=l+"px",j.style.top=t+"px",j.style.zIndex=""+100*k>>0,null!==h.reflection))j=c.reflHeight*k,h=h.reflection.element.style,h.left=l+"px",h.top=t+s+c.reflGap*k+"px",h.width=o+"px",r?h.filter.finishy=100*(j/s):h.height=j+"px";p+=q}this.innerWrapper.style.display="block";0.001<=i?this.controlTimer=setTimeout(function(){v.updateAll()},this.timeDelay):
this.stop()};this.checkImagesLoaded=function(){var d;for(d=0;d<f.length;d++)if(void 0===f[d].width||void 0!==f[d].complete&&!f[d].complete)return;c.restrictThumbnailSize&&a(b).find("img").each(function(){var b=c.restrictThumbnailSize.maxWidth,d=c.restrictThumbnailSize.maxHeight,f=0,e=a(this).width(),g=a(this).height();e>b&&(f=b/e,e=b,g=Math.round(g*f),a(this).css("width",e),a(this).css("height",g),a(this).prop("width",e),a(this).prop("height",g));g>d&&(f=d/g,g=d,e=Math.round(e*f),a(this).css("height",
g),a(this).css("width",e),a(this).prop("width",e),a(this).prop("height",g))});for(d=0;d<f.length;d++)e.push(new r(f[d],c)),a(f[d]).data("itemIndex",d);clearInterval(this.tt);this.imagesHaveLoaded();this.showFrontText();this.autoRotate();this.updateAll();a(b).find(".loading").css("display","none");a(b).find("img, .reflection").css("visibility","visible")};this.tt=setInterval(function(){i.checkImagesLoaded()},50)};a.fn.CloudCarousel=function(b){this.each(function(){b=a.extend({},{reflHeight:0,reflOpacity:0.5,
reflGap:0,minScale:0.5,xPos:0,yPos:0,xRadius:0,yRadius:0,altBox:null,titleBox:null,FPS:30,autoRotate:"no",autoRotateDelay:1500,speed:0.2,mouseWheel:!1,bringToFront:!1},b);a(this).data("cloudcarousel",new v(this,a(".cloudcarousel",a(this)),b))});return this}})(jQuery);

function escapeHTML(str) {
    return str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g, '&quot;');
}

$(document).ready(function(){		
	var warehouse = $('#stacks_in_31_page6containerwarehouse li');
	
	var data = [];
	
	$.each(warehouse, function(i, item) {				
		if (false) {	
			var title 		= $(item).find('span.stacks_in_31_page6title:first').html();
			var description = $(item).find('span.stacks_in_31_page6description:first').html();

			if (title == 'Title') {
				title = '';
			}

			if (description == 'Description') {
				description = '';
			}
		} else {
			var title = '';
			var description = '';
		}
		
		var image = $(item).find('img:first');
		
		if (!image.length) {
			return true;
		}

		var parent = $(image).parent();
		
		if (parent.is('a')) {
			var isLink = true;
			var href = parent.attr('href');
		} else {
			var isLink = false;
			var href = $(image).attr('src');
		}
		
		var src = $(image).attr('src');
		
		data.push({
			title	    : title, 
			description : description,
			src			: src, 
			href		: href, 
			isLink      : isLink
		})
	});
			
	warehouse.empty();
	
	var output = '';
	
	$.each(data, function(i, item) {
		//(!false ? ' style="max-width:120px;max-height:120px;"' : '') +
		output += (item.isLink || false ? '<a href="' + item.href + '" rel="lightbox" title="' + escapeHTML(item.title) + '">' : '') + '<img class="cloudcarousel" src="' + item.src + '" alt="' + escapeHTML(item.description) + '" title="' + escapeHTML(item.title) + '" />' + (item.isLink || false ? '</a>' : '');
	});
		
	var hasNavigation  = true;
	var hasDescription = false;
	var navigation     = 'top-right';
	var description    = 'top-left';
	
	if (hasDescription) {	
		var descriptionPos = false;
	
		switch (description) {
			case 'top-left': 
				descriptionPos = 'position:absolute;top:10px;left:10px;';
				break;
			case 'top-center': 
				descriptionPos = 'width:100%;text-align:center;';
				break;
			case 'top-right':
				descriptionPos = 'position:absolute;top:10px;right:10px;';
				break;
			case 'bottom-left':
				descriptionPos = 'position:absolute;bottom:0;left:10px;';
				break;
			case 'bottom-center':
				descriptionPos = 'position:absolute;bottom:0;width:100%;text-align:center;';
				break;
			case 'bottom-right':
				descriptionPos = 'position:absolute;bottom:0;right:10px;';
				break;
		}
	
		output += '<div id="stacks_in_31_page6titleanddescription" style="' + descriptionPos + '"><div id="stacks_in_31_page6title"></div><div id="stacks_in_31_page6alt"></div></div>';
	}
		
	if (hasNavigation) {
		var leftNavigation 	 	 = false;
		var rightNavigation 	 = false;
		var leftNavigationText   = '';
		var rightNavigationText  = '';
		var leftNavigationClass  = '';
		var rightNavigationClass = '';
		
		if ('default' == 'default') {
			leftNavigationClass = 'carouselLeftNavigation';
			rightNavigationClass = 'carouselRightNavigation';
		} else if ('default' == 'css_button') {
			leftNavigationText = '&lt;'
			rightNavigationText = '&gt;'
			leftNavigationClass = 'carouselCSSNavigation';
			rightNavigationClass = 'carouselCSSNavigation';
		} else {
			leftNavigationClass = 'carouselCustomLeftNavigation';
			rightNavigationClass = 'carouselCustomRightNavigation';
		}
		
		switch(navigation) {
			case 'top-left':
				leftNavigation = 'top:10px;left:10px';
				rightNavigation = 'top:10px;left:44px';
				break;
			case 'top-center':
				var width = $('#stacks_in_31_page6container').width();
				leftNavigation = 'top:10px;left:' + parseInt(width/2-35, 10) + 'px';
				rightNavigation = 'top:10px;left:' + parseInt(width/2+5, 10) + 'px';
				break;
			case 'top-right':
				leftNavigation = 'top:10px;right:44px';
				rightNavigation = 'top:10px;right:10px';
				break;
			case 'bottom-left':
				leftNavigation = 'bottom:10px;left:10px';
				rightNavigation = 'bottom:10px;left:44px';
			 	break;
			case 'bottom-center':
				leftNavigation = 'bottom:10px;left:47%';
				rightNavigation = 'bottom:10px;left:53%';
				break;
			case 'bottom-right':
				leftNavigation = 'bottom:10px;right:44px';
				rightNavigation = 'bottom:10px;right:10px';
				break;
		}
		
	//	output += '<div style="position: absolute; ' + leftNavigation + '"><div id="stacks_in_31_page6left" class="' + leftNavigationClass + '">' + leftNavigationText + '</div></div>';
	//	output += '<div class="carouselNavigationMask" style="position: absolute; ' + rightNavigation + ';border:1px solid red;"><div id="stacks_in_31_page6right" class="' + rightNavigationClass + '">' + rightNavigationText + '</div></div>';
		
		
		output += ('<div id="stacks_in_31_page6left" class="' + leftNavigationClass + '" style="position:absolute;' + leftNavigation + '">' + leftNavigationText + '</div>');
		output += ('<div id="stacks_in_31_page6right" class="' + rightNavigationClass + '" style="position:absolute;' + rightNavigation + '">' + rightNavigationText + '</div>');			
	}
	
	output += '<div class="loading"></div>';
	
	$('#stacks_in_31_page6container').html(output);
		
	/*
	
	$('.' + leftNavigationClass + ', .' + rightNavigationClass).each(function() {
        // check each css property, we need a border radius and filter
        if ((parseInt($(this).css('borderTopLeftRadius')) > 0 ||
            parseInt($(this).css('borderTopRightRadius')) > 0 ||
            parseInt($(this).css('borderBottomLeftRadius')) > 0 ||
            parseInt($(this).css('borderBottomRightRadius')) > 0) &&
            $(this).css('filter') != '' &&
            $(this).css('filter').match(/DXImageTransform\.Microsoft\.gradient/i) != null) {
                
            // carry over the border radius
            var s = 'border-top-left-radius: ' + parseInt($(this).css('borderTopLeftRadius')) + 'px;';
            s += 'border-top-right-radius: ' + parseInt($(this).css('borderTopRightRadius')) + 'px;';
            s += 'border-bottom-left-radius: ' + parseInt($(this).css('borderBottomLeftRadius')) + 'px;';
            s += 'border-bottom-right-radius: ' + parseInt($(this).css('borderBottomRightRadius')) + 'px;';
            
            // find the start and end colors
            var c1 = $(this).css('filter').match(/startcolorstr\=\"?\'?\#([0-9a-fA-F]{6})\'?\"?/i);
            var c2 = $(this).css('filter').match(/endcolorstr\=\"?\'?\#([0-9a-fA-F]{6})\'?\"?/i);
            if (c1 != null) { if (c1.length == 2) { c1 = c1[1]; } else { c1 = null; } }
            if (c2 != null) { if (c2.length == 2) { c2 = c2[1]; } else { c2 = null; } }
            if (c1 == null && c2 != null) { c1 = c2; }
            else if (c2 == null && c1 != null) { c2 = c1; }
            
            // form the filter rule
            var g = '';
            if (c1 != null) { var g = 'filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=\'#'+c1+'\', EndColorStr=\'#'+c2+'\');'; }
            
            var id = 'ie9gradius_'+parseInt(Math.random() * 100000);
            
            // we need to remove the current filter because this is spilling outside the border radius
            // relative position is needed for proper positioning of the gradient
            $(this).css('filter', '').css('position', 'relative');
            
            // add support for adding hover styling
            $(this).mouseenter(function() { $('#'+id).addClass('gradiusover'); }).mouseleave(function() { $('#'+id).removeClass('gradiusover'); });
            
            // we need this so that the contents show on top
            $(this).find('> *:not(ul)').css('position', 'relative');
            
            // the magic is all here
            $(this).prepend('\
            <div style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"> \
                <div style="'+s+' height: 100%; overflow: hidden;"> \
                    <div id="'+id+'" style="'+g+' height: 100%; width: 100%;"> \
                    </div></div></div>');
        }
    });
*/
		
	/*
	http://www.inspyre.co.nz/
	http://www.dr-solutions.com/
	http://www.solutionsforagilebusiness.co.uk/
	http://mindylinkous.com/she.html
	http://www.studiomauriks.com/
	http://www.professorcloud.com/mainsite/carousel-integration.htm
	*/
	
	if (true) {
		/*
		if (hasNavigation && hasDescription) {
			var divide = 3;
			if (navigation.match(/top/i) && description.match(/top/i)) {
			
			} else if (navigation.match(/bottom/i) && description.match(/bottom/i)) {
			
			} else {
			
			}
 		} else if (hasNavigation) {
			if (navigation.match(/top/i)) {
			
			} else {
			
			}
		} else if (hasDescription) {
			if (description.match(/top/i)) {
			
			} else {
			
			}
		}
		*/
		var xPos = $('#stacks_in_31_page6container').width()/2;
		var yPos = $('#stacks_in_31_page6container').height()/3.8;
		
		if (true && 30) {
			yPos -= 30 + 1;
		}
	} else {
		var xPos = 0;
		var yPos = 0;
	}
	
	if (true) {
		var xRadius = $('#stacks_in_31_page6container').width()/2.3;
		var yRadius = $('#stacks_in_31_page6container').height()/6;
	} else {
		var xRadius = 0;
		var yRadius = 0;
	}
		
	$("#stacks_in_31_page6container").CloudCarousel( { 
		stackID: 'stacks_in_31_page6',
		minScale: 25/100,
		reflHeight: (true ? 30 : 0),
		reflGap: (true ? 1 : 0),
		reflOpacity: (true ? 30/100 : 0),
		titleBox: $('#stacks_in_31_page6title'),
		altBox: $('#stacks_in_31_page6alt'),
		buttonLeft: $('#stacks_in_31_page6left'),
		buttonRight: $('#stacks_in_31_page6right'),
		speed: 20/100,
		autoRotate: (true ? 'right' : 'no'),
		autoRotateDelay: 3*1000,
		speed: 20/100,
		mouseWheel: false,
		bringToFront: true,
		FPS: 30,
		xPos: xPos,
		yPos: yPos,
		xRadius: xRadius,
		yRadius: yRadius,
		waitTilLoaded: true, 
		restrictThumbnailSize: (false ? {'maxWidth': 120, 'maxHeight': 120} : false)		
	});
	
	if (window.location && window.location.href && window.location.href.match(/file:\/\/\/private\/var\/folders/i)) {
		$('#stacks_in_31_page6container').parent().parent().append($('<div style="text-align:center;background:#efefef;padding:10px;margin-top:20px;">Current coordinates: xPos: ' + Math.round(xPos*10)/10 + ', yPos: ' + Math.round(yPos*10)/10 +  ' - Radius: xRadius: ' + Math.round(xRadius*10)/10 + ', yRadius: ' + Math.round(yRadius*10)/10 + ' (this message is only shown in preview)</div>'));
	}
	
	if (false) {
		$("#stacks_in_31_page6container a").fancybox({
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'fade',
			'speedIn'		: 400,
			'speedOut'		: 200,
			'overlayShow'	: true,
			'overlayColor'	: '#000',
			'cyclic'		: true,
			'easingIn'		: 'easeInOutExpo',
			'width'			: '80%',
			'height'		: '80%'
		});
	}
});

	return stack;
})(stacks.stacks_in_31_page6);



