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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
stacks.myMenuFHStackID = 'stacks_in_1_page11';
var $myMenuFH = jQuery.noConflict(); 
$myMenuFH(document).ready(function() {
	$myMenuFH('.nimblehost_myMenuOuterWrapper_stacks_in_1_page11 script').remove();
	$myMenuFH('.nimblehost_myMenuOuterWrapper_stacks_in_1_page11').appendTo('body');
	$myMenuFH('.nimblehost_myMenuOuterWrapper_stacks_in_1_page11').css({position:'absolute'});
	
	var myMenuFHOffset = $myMenuFH('.nimblehost_myMenuOuterWrapper_stacks_in_1_page11').offset();
	var myMenuFHPosition = (myMenuFHOffset.left / $myMenuFH(window).width()) * 100;
	if (myMenuFHPosition > 50) {
		var subMenuOffset = $myMenuFH('.nimblehost_myMenu_stacks_in_1_page11 ul').width() + 1;
		$myMenuFH('.nimblehost_myMenu_stacks_in_1_page11 ul ul').css({left: 'auto', right: subMenuOffset + 'px'});
		$myMenuFH('.nimblehost_myMenu_stacks_in_1_page11 ul li a').css({paddingLeft: '15px'});
		$myMenuFH(window).load(function(){
			$myMenuFH('.nimblehost_myMenu_stacks_in_1_page11 ul li.ddarrow .childIndicator').css({right: 'auto', left: '2px', backgroundImage: 'url(files/ddarrowLeft.png)'});
		});
	}
	
	var myMenuLinkHeight = $myMenuFH('.nimblehost_myMenuOuterWrapper_stacks_in_1_page11').height() + 6;
	$myMenuFH(window).load(function(){
		$myMenuFH('.nimblehost_myMenu_stacks_in_1_page11 ul li.ddarrow .childIndicator').css({height: myMenuLinkHeight + 'px', top: '0'});
	});
});




	return stack;
})(stacks.stacks_in_1_page11);


// Javascript for stacks_in_3_page11
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
function setCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires ;
}

function getCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

function deleteCookie(name) {
    setCookie(name,"");
}


$(document).ready(function() {



// Get lz cookie
var cooky = getCookie('doo_lz_cookie_set');

 // Create the new lz cookie and store it for 1 day
deleteCookie('doo_lz_cookie_set');

$("#stacks_in_3_page11").css("margin" , 0);
var orgonal = $("#stacks_in_3_page11");
var slidedelay = (3000) ;
var slidespeed = (2000) ;

var position = $("#stacks_in_3_page11").offset();

if (cooky == "lzcookyset"){

}

if (cooky != "lzcookyset"){
  
   
$("<div/>", {
  "class": "doosuperoverlay"
})
.prependTo("body")
.delay(3000)
.fadeOut(3000);


var orgStackWidth = $("#stacks_in_3_page11").width();
var tempClone = $("#stacks_in_3_page11").clone();
$(tempClone).css({
"position" : "relative",
"width" : orgStackWidth + "px",
"text-align" : "left"
});

$(tempClone).fadeIn(1000).appendTo(".doosuperoverlay").css(position)
.delay(3000)
.fadeOut(3000);
  // showstack once
var dooremoveoverlaytimer = 3000 + 3000 + 500;
setTimeout(function(){ $('.doosuperoverlay').remove(); }, dooremoveoverlaytimer);

}  // end if cookie exists

$(orgonal).delay(slidedelay).slideUp(slidespeed);;

 
$('.lzeffect').remove();



if("$(orgonal).delay(slidedelay).slideUp(slidespeed);" != ""){
var doodelaylz = slidedelay + slidespeed + 1000 + 3000 + 3000;
setTimeout(function(){ $("#stacks_in_3_page11").remove(); }, doodelaylz + 1000);
}

});


	return stack;
})(stacks.stacks_in_3_page11);


// Javascript for stacks_in_24_page11
// ---------------------------------------------------------------------

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

// 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_24_page11 = (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(document).ready(function($){

function findPlainTextExceptInLinks(element, substring, callback) {
    for (var childi= element.childNodes.length; childi-->0;) {
        var child= element.childNodes[childi];
        if (child.nodeType===1) {
            if (child.tagName.toLowerCase()!=='a')
                findPlainTextExceptInLinks(child, substring, callback);
        } else if (child.nodeType===3) {
            var index= child.data.length;
            while (true) {
                index= child.data.lastIndexOf(substring, index);
                if (index===-1)
                    break;
                callback.call(window, child, index)
            }
        }
    }
}

var substring= 'TeleportMe2';
findPlainTextExceptInLinks(document.body, substring, function(node, index) {
    node.splitText(index+substring.length);
    var span= document.createElement('span');
    span.className = "teleportHere";
    span.appendChild(node.splitText(index));
    node.parentNode.insertBefore(span, node.nextSibling);
});


var injectionStack = $("#stacks_in_24_page11 .teleportMe").html();


$(".teleportHere").replaceWith(injectionStack);
$("#stacks_in_24_page11 .teleportMe").hide();

});
	return stack;
})(stacks.stacks_in_24_page11);



