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

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

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

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

//-- Fancy Image Preview Stack v2.0.3 by Joe Workman --//
$(document).ready(function(){ 
	var image_src = $("#image_stacks_in_7_page61 img").attr("src");
	var image_width = $("#image_stacks_in_7_page61 img").width();
	var image_height = $("#image_stacks_in_7_page61 img").height();
	var thumb_width = Math.round(image_width * (7/100));
	var thumb_height = Math.round(image_height * (7/100));
	$("#link_stacks_in_7_page61").attr('href', image_src);
	$("#link_stacks_in_7_page61").append('<img src="'+ image_src +'" width="'+ thumb_width +'" height="'+ thumb_height +'" class="imageStyle">');

	var bg_border_style = $('#stacks_in_7_page61').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color = $('#stacks_in_7_page61').css('border-bottom-color');
		var bg_border_top = $('#stacks_in_7_page61').css('border-top-width');
		var bg_border_right = $('#stacks_in_7_page61').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_7_page61').css('border-bottom-width');
		var bg_border_left = $('#stacks_in_7_page61').css('border-left-width');
		$('#stacks_in_7_page61').css({'border-width':0});	
		$('#link_stacks_in_7_page61 img').css({'border-style':bg_border_style,
								 'border-color':bg_border_color,
								 'border-top-width':bg_border_top,
								 'border-right-width':bg_border_right,
								 'border-bottom-width':bg_border_bottom,	
								 'border-left-width':bg_border_left
		});	
	}

	$("#link_stacks_in_7_page61 img").hover(function(e){
			var title = '.';
			var c = (title != "") ? "<br/>" + title : "";
            $("body").append("<p id='preview_stacks_in_7_page61'><img src='"+ image_src +"'/>"+ c +"</p>");
			$("#preview_stacks_in_7_page61")
				.css("top",(e.pageY - 0))
				.css("left",(e.pageX + 10))
				.css("z-index", 9999)
				.fadeIn("fast");
	},
	function(){
		$("#preview_stacks_in_7_page61").remove();
	});
	$("#link_stacks_in_7_page61").click(function(e){ e.preventDefault(); });
	$("#link_stacks_in_7_page61 img").mousemove(function(e){
		var height = $("#image_stacks_in_7_page61 img").attr("height");
		var width = $("#image_stacks_in_7_page61 img").attr("width");
		$("#preview_stacks_in_7_page61")
			.css("top",(e.pageY - 0))
			.css("left",(e.pageX + 10));
	});
});
//-- End Fancy Image Preview Stack --//

	return stack;
})(stacks.stacks_in_7_page61);



