
// '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_75_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_75_page0 = {};

// 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_75_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;
	

//-- Fancy Image Preview Stack v2.1.1 by Joe Workman --//
$(document).ready(function(){ 
    var image_width = $("#stacks_in_75_page0 img").width();
    var image_height = $("#stacks_in_75_page0 img").height();
	var image_src = $("#stacks_in_75_page0 img").attr("src");

    var thumb_width = Math.round(image_width * (45/100));
    var thumb_height = Math.round(image_height * (45/100));

	$("#link_stacks_in_75_page0").attr('href', image_src);
	$("#link_stacks_in_75_page0").append('<img src="'+ image_src +'" width="'+ thumb_width +'" height="'+ thumb_height +'" class="imageStyle">');

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

	return stack;
})(stacks.stacks_in_75_page0);



