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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Spin Stack by http://www.doobox.co.uk
// Copyright@2010 Mr JG Simpson, trading as Doobox.
// all rights reserved.
$(document).ready(function(){

    var numItems = $("#stacks_in_111_page8 .spin").length;
   
    var randomNum = Math.ceil(Math.random()*numItems);
    var randomNum = randomNum - 1;
    $("#stacks_in_111_page8 #spin" + randomNum).css({'display' : 'block'});
    
});

	return stack;
})(stacks.stacks_in_111_page8);


// Javascript for stacks_in_3_page8
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// notes Stack by http://www.doobox.co.uk
// Copyright@2010 Mr JG Simpson, trading as Doobox.
// all rights reserved.

$(document).ready(function() {



});
// End notes stack


	return stack;
})(stacks.stacks_in_3_page8);


// Javascript for stacks_in_714_page8
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

/*
 * Facebook Wall Stack By WeaverAddons.com
 * Version 1.1.0
 *
 * Visit http://www.weaveraddons.com for more information on how to use this stack in RapidWeaver.
 *
 */

/************************************************************************************************************************************
 *	fb.wall				Facebook Wall jQuery Plguin
 *
 *	@author:			Daniel Benkenstein / neosmart GmbH
 *	@version:			1.2.7
 *	@Last Update:		06.06.2011
 *	@licence:			MIT (http://www.opensource.org/licenses/mit-license.php)
 *						GPL	(http://www.gnu.org/licenses/gpl.html)
 *	@documentation:		http://www.neosmart.de/social-media/facebook-wall
 *	@feedback:			http://www.neosmart.de/blog/jquery-plugin-facebook-wall
 *	
 ************************************************************************************************************************************/

(function(h){h.fn.fbWall=function(m){var q=h.extend({},h.fn.fbWall.defaults,m),i=this;return i.each(function(){function n(a){return a==j.id?f.useAvatarAlternative?f.avatarAlternative:l+a+"/picture?type=square":f.useAvatarExternal?f.avatarExternal:l+a+"/picture?type=square"}function o(a){var c,g,e,b,d;if(a.indexOf(" ")==-1&&a.substr(4,1)=="-"&&a.substr(7,1)=="-"&&a.substr(10,1)=="T")c=a.substr(0,4),g=parseInt(a.substr(5,1)=="0"?a.substr(6,1):a.substr(5,2))-1,e=a.substr(8,2),b=a.substr(11,2),a=a.substr(14,
2),b=Date.UTC(c,g,e,b,a),d=new Date(b);else{g=a.split(" ");if(g.length!=6||g[4]!="at")return a;b=g[5].split(":");c=b[1].substr(2);a=b[1].substr(0,2);b=parseInt(b[0]);c=="pm"&&(b+=12);d=new Date(g[1]+" "+g[2]+" "+g[3]+" "+b+":"+a);d.setTime(d.getTime()-252E5)}e=d.getDate()<10?"0"+d.getDate():d.getDate();g=d.getMonth()+1;g=g<10?"0"+g:g;b=d.getHours();a=d.getMinutes()<10?"0"+d.getMinutes():d.getMinutes();return f.timeConversion==12?(c=b<12?"am":"pm",b!=0&&b>12&&(b-=12),b<10&&(b="0"+b),e+"."+g+"."+d.getFullYear()+
" at "+b+":"+a+" "+c):e+"."+g+"."+d.getFullYear()+" "+f.translateAt+" "+b+":"+a}function d(a){return!a||a==null||a=="undefined"||typeof a=="undefined"?false:true}function p(a){return a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/g,'<a href="$1" target="_blank">$1</a>').replace(/(\r\n)|(\n\r)|\r|\n/g,"<br>")}$this=h(this);var f=h.meta?h.extend({},q,$this.data()):q,a="",j,l="https://graph.facebook.com/";i.addClass("fb-wall").addClass("loading").html("");
h.ajax({url:l+f.id+"?access_token="+f.accessToken,dataType:"jsonp",success:function(a){m(a)}});var m=function(k){j=k;if(k==false)return i.removeClass("loading").html("The alias you requested do not exist: "+f.id),false;if(k.error)return i.removeClass("loading").html(k.error.message),false;h.ajax({url:l+f.id+"/"+(f.showGuestEntries=="true"||f.showGuestEntries==true?"feed":"posts")+"?limit="+f.max+"&access_token="+f.accessToken,dataType:"jsonp",success:function(c){i.removeClass("loading");for(var c=
c.data,g=c.length,e,b=0;b<g;b++)if((e=c[b].from.id==j.id)&&d(j.link),f.showGuestEntries||e){a+=b==0?'<div class="fb-wall-box fb-wall-box-first">':'<div class="fb-wall-box">';f.showAvatars&&(a+='<a href="http://www.facebook.com/profile.php?id='+c[b].from.id+'" target="_blank" class="fb-wall-profile-link">',a+='<img class="fb-wall-avatar" src="'+n(c[b].from.id)+'" />',a+="</a>");a+='<div class="fb-wall-data"'+(!f.showAvatars?' style="margin-left:0 !important;"':"")+">";a+='<span class="fb-wall-message">';
a+='<a href="http://www.facebook.com/profile.php?id='+c[b].from.id+'" class="fb-wall-message-from" target="_blank">'+c[b].from.name+"</a> ";d(c[b].message)&&(a+=p(c[b].message));a+="</span>";if(d(c[b].picture)||d(c[b].link)||d(c[b].caption)||d(c[b].description)){a+=d(c[b].picture)?'<div class="fb-wall-media">':'<div class="fb-wall-media fb-wall-border-left">';d(c[b].picture)&&(d(c[b].link)&&(a+='<a href="'+c[b].link+'" target="_blank" class="fb-wall-media-link">'),a+='<img class="fb-wall-picture" src="'+
c[b].picture+'" />',d(c[b].link)&&(a+="</a>"));a+='<div class="fb-wall-media-container">';d(c[b].name)&&(a+='<a class="fb-wall-name" href="'+c[b].link+'" target="_blank">'+c[b].name+"</a>");d(c[b].caption)&&(a+='<a class="fb-wall-caption" href="http://'+c[b].caption+'" target="_blank">'+c[b].caption+"</a>");if(d(c[b].properties))for(e=0;e<c[b].properties.length;e++)c[b].properties[e].text&&(a+=e==0?"<div>"+o(c[b].properties[e].text)+"</div>":"<div>"+c[b].properties[e].text+"</div>");d(c[b].description)&&
(e=p(c[b].description),e.length>299&&(e=e.substr(0,e.lastIndexOf(" "))+" ..."),a+='<span class="fb-wall-description">'+e+"</span>");a+="</div>";a+="</div>"}a+='<span class="fb-wall-date">';d(c[b].icon)&&(a+='<img class="fb-wall-icon" src="'+c[b].icon+'" title="'+c[b].type+'" alt="" />');a+=o(c[b].created_time)+"</span>";d(c[b].likes)&&(a+=parseInt(c[b].likes.count)==1?'<div class="fb-wall-likes"><div><span>'+c[b].likes.data[0].name+"</span> "+f.translateLikesThis+"</div> </div>":'<div class="fb-wall-likes"><div><span>'+
c[b].likes.count+" "+f.translatePeople+"</span> "+f.translateLikeThis+"</div> </div>");if(d(c[b].comments)&&d(c[b].comments.data)&&(f.showComments==true||f.showComments=="true")){a+='<div class="fb-wall-comments">';for(e=0;e<c[b].comments.data.length;e++)a+='<span class="fb-wall-comment">',a+='<a href="http://www.facebook.com/profile.php?id='+c[b].comments.data[e].from.id+'" class="fb-wall-comment-avatar" target="_blank">',a+='<img src="'+n(c[b].comments.data[e].from.id)+'" />',a+="</a>",a+='<span class="fb-wall-comment-message">',
a+='<a class="fb-wall-comment-from-name" href="http://www.facebook.com/profile.php?id='+c[b].comments.data[e].from.id+'" target="_blank">'+c[b].comments.data[e].from.name+"</a> ",a+=p(c[b].comments.data[e].message),a+='<span class="fb-wall-comment-from-date">'+o(c[b].comments.data[e].created_time)+"</span>",a+="</span>",a+="</span>";a+="</div>"}a+="</div>";a+='<div class="fb-wall-clean"></div>';a+="</div>"}g==0&&(a+='<div class="fb-wall-box-first">',a+='<img class="fb-wall-avatar" src="'+n(j.id)+
'" />',a+='<div class="fb-wall-data">',a+='<span class="fb-wall-message"><span class="fb-wall-message-from">'+j.name+"</span> "+f.translateErrorNoData+"</span>",a+="</div>",a+="</div>");i.hide().html(a).fadeIn(700)}})}})};h.fn.fbWall.defaults={avatarAlternative:"avatar-alternative.jpg",avatarExternal:"avatar-external.jpg",id:"neosmart.gmbh",max:5,showComments:true,showGuestEntries:true,translateAt:"at",translateLikeThis:"like this",translateLikesThis:"likes this",translateErrorNoData:"has not shared any information.",
translatePeople:"people",timeConversion:24,useAvatarAlternative:false,useAvatarExternal:false,accessToken:""}})(jQuery);

$(function(){
	if (!'100000546057558' || !'%id=access_token') {
		$('#stacks_in_714_page8container').html('Facebook ID and access token are required for this stack to work. Add these via the settings HUD.');
	} else {
 		$('#stacks_in_714_page8container').fbWall({id:'100000546057558',
									accessToken: 'AAADJG8K0hu4BANh6br6CVZAZAprl2QQfJI72fuRiQkZC17bUID1kKEbZAhOfrpG5VNZAbKxqV3gnF0rXuRTskwVsAadqysTZB8qU6ZAmQ82agZDZD',
									max: 2,
									showComments: false,
									showGuestEntries: false,
									showAvatars: false,
									translateAt: 'at',
									translateLikeThis: 'like this',
									translateLikesThis: 'likes this',
									translateErrorNoData: 'has not shared any information.',
									translatePeople: 'people',
									timeConversion: (true ? 24 : 12)});
									//useAvatarAlternative: ,
									//useAvatarExternal: ,
									//avatarAlternative: '',
									//avatarExternal: ''});
	}
});

	return stack;
})(stacks.stacks_in_714_page8);


// Javascript for stacks_in_286_page8
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// My Product stack
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



$(document).ready(function() {
jQuery.url = function()
{
	var segments = {};
	
	var parsed = {};
	
	/**
    * Options object. Only the URI and strictMode values can be changed via the setters below.
    */
  	var options = {
	
		url : window.location, // default URI is the page in which the script is running
		
		strictMode: false, // 'loose' parsing by default
	
		key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], // keys available to query 
		
		q: {
			name: "queryKey",
			parser: /(?:^|&)([^&=]*)=?([^&]*)/g
		},
		
		parser: {
			strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,  //less intuitive, more accurate to the specs
			loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs
		}
		
	};
	
    /**
     * Deals with the parsing of the URI according to the regex above.
 	 * Written by Steven Levithan - see credits at top.
     */		
	var parseUri = function()
	{
		str = decodeURI( options.url );
		
		var m = options.parser[ options.strictMode ? "strict" : "loose" ].exec( str );
		var uri = {};
		var i = 14;

		while ( i-- ) {
			uri[ options.key[i] ] = m[i] || "";
		}

		uri[ options.q.name ] = {};
		uri[ options.key[12] ].replace( options.q.parser, function ( $0, $1, $2 ) {
			if ($1) {
				uri[options.q.name][$1] = $2;
			}
		});

		return uri;
	};

    /**
     * Returns the value of the passed in key from the parsed URI.
  	 * 
	 * @param string key The key whose value is required
     */		
	var key = function( key )
	{
		if ( ! parsed.length )
		{
			setUp(); // if the URI has not been parsed yet then do this first...	
		} 
		if ( key == "base" )
		{
			if ( parsed.port !== null && parsed.port !== "" )
			{
				return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/";	
			}
			else
			{
				return parsed.protocol+"://"+parsed.host+"/";
			}
		}
	
		return ( parsed[key] === "" ) ? null : parsed[key];
	};
	
	/**
     * Returns the value of the required query string parameter.
  	 * 
	 * @param string item The parameter whose value is required
     */		
	var param = function( item )
	{
		if ( ! parsed.length )
		{
			setUp(); // if the URI has not been parsed yet then do this first...	
		}
		return ( parsed.queryKey[item] === null ) ? null : parsed.queryKey[item];
	};

    /**
     * 'Constructor' (not really!) function.
     *  Called whenever the URI changes to kick off re-parsing of the URI and splitting it up into segments. 
     */	
	var setUp = function()
	{
		parsed = parseUri();
		
		getSegments();	
	};
	
    /**
     * Splits up the body of the URI into segments (i.e. sections delimited by '/')
     */
	var getSegments = function()
	{
		var p = parsed.path;
		segments = []; // clear out segments array
		segments = parsed.path.length == 1 ? {} : ( p.charAt( p.length - 1 ) == "/" ? p.substring( 1, p.length - 1 ) : path = p.substring( 1 ) ).split("/");
	};
	
	return {
		
	    /**
	     * Sets the parsing mode - either strict or loose. Set to loose by default.
	     *
	     * @param string mode The mode to set the parser to. Anything apart from a value of 'strict' will set it to loose!
	     */
		setMode : function( mode )
		{
			strictMode = mode == "strict" ? true : false;
			return this;
		},
		
		/**
	     * Sets URI to parse if you don't want to to parse the current page's URI.
		 * Calling the function with no value for newUri resets it to the current page's URI.
	     *
	     * @param string newUri The URI to parse.
	     */		
		setUrl : function( newUri )
		{
			options.url = newUri === undefined ? window.location : newUri;
			setUp();
			return this;
		},		
		
		/**
	     * Returns the value of the specified URI segment. Segments are numbered from 1 to the number of segments.
		 * For example the URI http://test.com/about/company/ segment(1) would return 'about'.
		 *
		 * If no integer is passed into the function it returns the number of segments in the URI.
	     *
	     * @param int pos The position of the segment to return. Can be empty.
	     */	
		segment : function( pos )
		{
			if ( ! parsed.length )
			{
				setUp(); // if the URI has not been parsed yet then do this first...	
			} 
			if ( pos === undefined )
			{
				return segments.length;
			}
			return ( segments[pos] === "" || segments[pos] === undefined ) ? null : segments[pos];
		},
		
		attr : key, // provides public access to private 'key' function - see above
		
		param : param // provides public access to private 'param' function - see above
		
	};
	
}();


var yourfolder = jQuery.url.attr("directory");
if(yourfolder == "/"){yourfolder = ""};







var dooabuttonlink;
var dooabuttontarget;

$("#stacks_in_286_page8 .stacks_in_286_page8buttoncontainer").each(function() {
dooabuttonlink = $("a", this).attr("href");
dooabuttonrel = $("a", this).attr("rel");
dooabuttonclass = $("a", this).attr("class");
		$(this).wrap('<a href="'+ dooabuttonlink +'" class="stacks_in_286_page8link '+ dooabuttonclass +'" rel="'+ dooabuttonrel +'"  />');
	});
	

$("#stacks_in_286_page8 .stacks_in_286_page8link").hover(
  function () {
    $("a", this).css("color","#006699");
  }, 
  function () {
    $("a", this).css("color","#CC0000");
  }
);


var itsIE = navigator.userAgent.match(/MSIE 8/i) || navigator.userAgent.match(/MSIE 7/i) != null;

if(itsIE){
$("#stacks_in_286_page8 .outershadow").css({
	"box-shadow": "none", 
    "behavior":"url(" + yourfolder + "files/IPIE.htc)" 
    });
$("#stacks_in_286_page8 .stacks_in_286_page8link:first-child .stacks_in_286_page8buttoncontainer").css({
	"border-radius": "5px 0px 0px 5px",
    "behavior":"url(" + yourfolder + "files/IPIE.htc)" 
    });
$("#stacks_in_286_page8 .stacks_in_286_page8link:last-child .stacks_in_286_page8buttoncontainer").css({
	"border-radius": "0px 5px 5px 0px",
    "behavior":"url(" + yourfolder + "files/IPIE.htc)" 
    });
}    


});



// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// End my producet stack
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
	return stack;
})(stacks.stacks_in_286_page8);


// Javascript for stacks_in_1331_page8
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// TopBox is designed and developed by Will Woodgate

var $tb = jQuery.noConflict();
$tb(document).ready(function(){

	
// Append TopBox and window shade onto the page body tag
$tb('#topBoxContentstacks_in_1331_page8').css({display: 'block'});
$tb('body').append('<div id="topBoxstacks_in_1331_page8" class="topBox"></div><div id="shadestacks_in_1331_page8"></div>');


// Move Stack content up into the TopBox and block display the hidden content
$tb('#topBoxContentstacks_in_1331_page8').appendTo('#topBoxstacks_in_1331_page8');

// Trigger TopBox when user clicks on a link with matching REL tag and prevent anchor jump
$tb('[class=topbox1]').click(function (e) {
		e.preventDefault();

// Fetches the screen height and width to calculate shade size
var shadeHeight = $tb(document).height();  
var shadeWidth = $tb(window).width();

// Centers the TopBox horizontally, based on screen size
var topboxHori = $tb('#topBoxstacks_in_1331_page8');
topboxHori.css({left: '50%','margin-left': 0 - (topboxHori.width() / 2)
});

// Centers the TopBox vertically, based on screen size
var topboxVert = $tb('#topBoxstacks_in_1331_page8');
topboxVert.css({top: '50%','margin-top': 0 - (topboxVert.height() / 2)
});
      
//Set height and width of shade to fill up the whole screen
$tb('#shadestacks_in_1331_page8').css({'width':shadeWidth,'height':shadeHeight,'opacity':.85});

// Fade in window shade and TopBox on click and set fade speed
$tb('#shadestacks_in_1331_page8, #topBoxstacks_in_1331_page8').fadeIn(800);

// If the iFrame module is enabled, append generated iFrame to the iFrame container. Otherwise this line is commented out
$tb('#iframeModulestacks_in_1331_page8').append('<iframe id="generatediFramestacks_in_1331_page8" src="http://www.feddetcamping.dk/resources/feddet.pdf">Your web browser does not support iframes.</iframe>');

});


// Fade out window shade, TopBox by clicking on window shade  
$tb('#shadestacks_in_1331_page8').click(function(){
$tb('#shadestacks_in_1331_page8, #topBoxstacks_in_1331_page8').fadeOut(800);
// If enabled, terminate the iFrame module also. Otherwise this line is commented out
$tb('#generatediFramestacks_in_1331_page8').remove();
})

// Fade out window shade and TopBox by clicking on a backwards link  
$tb('#topBoxstacks_in_1331_page8 a').click(function(){
$tb('#shadestacks_in_1331_page8, #topBoxstacks_in_1331_page8').fadeOut(800);
// If enabled, terminate the iFrame module also. Otherwise this line is commented out
$tb('#generatediFramestacks_in_1331_page8').remove();
})

// Fade out window shade and TopBox by clicking on a forwards link  
$tb('#topBoxForwardsstacks_in_1331_page8').click(function(){
$tb('#shadestacks_in_1331_page8, #topBoxstacks_in_1331_page8').fadeOut(800);
// If enabled, terminate the iFrame module also. Otherwise this line is commented out
$tb('#generatediFramestacks_in_1331_page8').remove();
})

// Fade out window shade and TopBox by clicking on close button  
$tb('.topBoxClose').click(function(){
$tb('#shadestacks_in_1331_page8, #topBoxstacks_in_1331_page8').fadeOut(800);
// If enabled, terminate the iFrame module also. Otherwise this line is commented out
$tb('#generatediFramestacks_in_1331_page8').remove();
})

// Fade out window shade and TopBox using keyboard ESC key
$tb(document).keydown( function( e ) { 
   if( e.which == 27) {
     $tb('#shadestacks_in_1331_page8, #topBoxstacks_in_1331_page8').fadeOut(800);
     // If enabled, terminate the iFrame module also. Otherwise this line is commented out
     $tb('#generatediFramestacks_in_1331_page8').remove();
   } 
 }); 
 
 // If an iOS device is detected, change TopBox position to absolute and scroll page to the top. 
 var deviceAgent = navigator.userAgent.toLowerCase();
 	var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
 	if (agentID) {
 	$tb('[class=topbox1]').each(function() { 
 		$tb('#topBoxstacks_in_1331_page8').css({position: 'absolute'});
 		$tb(this).click(function() { 
 			setTimeout(scrollTo, 0, 0, 1); 
 			}); 
 		}); 
 	}

});

// Recalculate the window shade size when the window is resized.
$tb(window).resize(function() {

	//Fetches the screen height and width to calculate shade size
	var shadeHeight = $tb(document).height();  
	var shadeWidth = $tb(window).width();

    $tb('#shadestacks_in_1331_page8').css({'width':shadeWidth,'height':shadeHeight,'opacity':.85});
});











	








/*

var $tb = jQuery.noConflict();
$tb(document).ready(function(){

//Scroll page up on iOS to bring TopBox into view
if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPad/i))) { 
$tb('[rel=basicstyledtext]').each(function() { 
	$tb(this).click(function() { 
		setTimeout(scrollTo, 0, 0, 1); 
		}); 
	}); 
}

*/
	return stack;
})(stacks.stacks_in_1331_page8);


// Javascript for stacks_in_1115_page8
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Spin Stack by http://www.doobox.co.uk
// Copyright@2010 Mr JG Simpson, trading as Doobox.
// all rights reserved.
$(document).ready(function(){

    var numItems = $("#stacks_in_1115_page8 .spin").length;
   
    var randomNum = Math.ceil(Math.random()*numItems);
    var randomNum = randomNum - 1;
    $("#stacks_in_1115_page8 #spin" + randomNum).css({'display' : 'block'});
    
});

	return stack;
})(stacks.stacks_in_1115_page8);


// Javascript for stacks_in_160_page8
// ---------------------------------------------------------------------

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

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

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



