
// '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_13_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_13_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_13_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(document).ready(function(){
	jQuery('body').prepend(jQuery('#pageFlipStackstacks_in_13_page0'));
	var theMSGImageURL=jQuery('.msg_block img').attr('src');
	var theMSGImageHeight=jQuery('.msg_block img').attr('height');
	var theMSGImageWidth=jQuery('.msg_block img').attr('width');
	jQuery('.msg_block').empty().css('backgroundImage', 'url('+theMSGImageURL+')');
	var thePos='right';
	if (thePos=='right') {
		jQuery('#pageFlipStackstacks_in_13_page0 img.flipImage').attr('src','files/pageFlip_right.png');
		jQuery('#pageFlipStackstacks_in_13_page0 img.flipImage , .msg_block').css({
			right: 0
		});
		jQuery('.msg_block').css('backgroundPosition', 'top right');
	}
	else {
		jQuery('#pageFlipStackstacks_in_13_page0 img.flipImage').attr('src','files/pageFlip_left.png');
		jQuery('#pageFlipStackstacks_in_13_page0 img.flipImage , .msg_block').css({
			left: 0
		});
		jQuery('.msg_block').css('backgroundPosition', 'top left');
	}
	jQuery("#pageFlipStackstacks_in_13_page0").hover(function() {
	 //On hover...
	jQuery("#pageFlipStackstacks_in_13_page0 img.flipImage").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: theMSGImageWidth,
			height: theMSGImageHeight
		}, 500);
	jQuery(".msg_block").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: theMSGImageWidth,
			height: theMSGImageHeight*0.96
		}, 500);
	} , function() {
	jQuery("#pageFlipStackstacks_in_13_page0 img.flipImage").stop() //On hover out, go back to original size 50x52
		.animate({
			width: '50px',
			height: '52px'
		}, 220);
	jQuery(".msg_block").stop() //On hover out, go back to original size 50x50
		.animate({
			width: '50px',
			height: '50px'
		}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
});

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


// Javascript for stacks_in_15_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_15_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_15_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;
	
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_15_page0").css("margin" , 0);
var orgonal = $("#stacks_in_15_page0");
var slidedelay = (3000) ;
var slidespeed = (2000) ;

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

if (cooky == "lzcookyset"){

}

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


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

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

}  // end if cookie exists

;

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



if("" != ""){
var doodelaylz = slidedelay + slidespeed + 0000 + 1000 + 1000;
setTimeout(function(){ $("#stacks_in_15_page0").remove(); }, doodelaylz + 1000);
}

});


	return stack;
})(stacks.stacks_in_15_page0);



