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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Lightbox v2.1.1 by Joe Workman
$(document).ready(function() {
	if ('compliant' == 'noncompliant') {
    	var img_height = $('#compliant_shamrock img').height();
    	var img_width = $('#compliant_shamrock img').width();
    	var image_src = $("#compliant_shamrock img").attr("src");

    	$('#compliant_shamrock').height(img_height);
    	$('#compliant_shamrock').width(img_width);
    	$('#compliant_shamrock a').height(img_height);
    	$("#compliant_shamrock").css({'background-image':'url(' + image_src + ')'});
    	$("#compliant_shamrock div").remove();
	}
});
// End Lightbox
	return stack;
})(stacks.stacks_in_2239_page25);


// Javascript for stacks_in_2244_page25
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//-- Google Maps Stack v1.0.5 by Joe Workman --//

function clean_location(str) {
	str = str ? str : 'San Francisco,CA';
	str = str.replace(/\<\s*br\s*\/\>/g,',');
	str = str.replace(/[\s]+/g,'+');
	str = str.replace(/\s*\,+\s*/g,',');
	return $.trim(str);
}
$(document).ready(function() {	
	var map_height = 550;
	var map_width = 550;
	var map_zoom = 16;
	var map_center = ''; 
	var map_type = 'hybrid'; //roadmap, satellite, hybrid, and terrain
	var marker_size = 'mid';
	var marker_color = 'FF6357';
	var map_url = 'http://maps.google.com/maps/api/staticmap?sensor=false&size='+ map_width +'x'+ map_height +'&maptype='+ map_type +'&zoom='+ map_zoom;
	
	if ( 'true' == 'true' ) {
		// foreach marker add the following data to the map_url: &markers=size:mid|label:S|color:red|San+Jose,CA
		$('#marker_data_stacks_in_2244_page25 li').each(function(index) {
		    var marker_url = '&markers=size:'+ marker_size +'|color:0x'+ marker_color +'|';
			var label = $.trim($(this).attr('data-label'));
			if (label != '') { marker_url += 'label:'+ label.substr(0,1) +'|'; }
			marker_url += clean_location($(this).attr('data-location'));
			map_url += marker_url;
		});
	}
	else {
		map_url += '&center='+ clean_location(map_center);
	}
	// Add the map to the page
	$('#stacks_in_2244_page25').append('<img src="'+ map_url +'" id="map_stacks_in_2244_page25" alt=""/>');
});

//-- End Google Maps Stack --//
	return stack;
})(stacks.stacks_in_2244_page25);


// Javascript for stacks_in_2249_page25
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Lightbox v2.1.1 by Joe Workman
$(document).ready(function() {
	if ('compliant' == 'noncompliant') {
    	var img_height = $('#compliant_sandcreek img').height();
    	var img_width = $('#compliant_sandcreek img').width();
    	var image_src = $("#compliant_sandcreek img").attr("src");

    	$('#compliant_sandcreek').height(img_height);
    	$('#compliant_sandcreek').width(img_width);
    	$('#compliant_sandcreek a').height(img_height);
    	$("#compliant_sandcreek").css({'background-image':'url(' + image_src + ')'});
    	$("#compliant_sandcreek div").remove();
	}
});
// End Lightbox
	return stack;
})(stacks.stacks_in_2249_page25);


// Javascript for stacks_in_2254_page25
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
//-- Google Maps Stack v1.0.5 by Joe Workman --//

function clean_location(str) {
	str = str ? str : 'San Francisco,CA';
	str = str.replace(/\<\s*br\s*\/\>/g,',');
	str = str.replace(/[\s]+/g,'+');
	str = str.replace(/\s*\,+\s*/g,',');
	return $.trim(str);
}
$(document).ready(function() {	
	var map_height = 550;
	var map_width = 550;
	var map_zoom = 16;
	var map_center = ''; 
	var map_type = 'hybrid'; //roadmap, satellite, hybrid, and terrain
	var marker_size = 'mid';
	var marker_color = 'FF6357';
	var map_url = 'http://maps.google.com/maps/api/staticmap?sensor=false&size='+ map_width +'x'+ map_height +'&maptype='+ map_type +'&zoom='+ map_zoom;
	
	if ( 'true' == 'true' ) {
		// foreach marker add the following data to the map_url: &markers=size:mid|label:S|color:red|San+Jose,CA
		$('#marker_data_stacks_in_2254_page25 li').each(function(index) {
		    var marker_url = '&markers=size:'+ marker_size +'|color:0x'+ marker_color +'|';
			var label = $.trim($(this).attr('data-label'));
			if (label != '') { marker_url += 'label:'+ label.substr(0,1) +'|'; }
			marker_url += clean_location($(this).attr('data-location'));
			map_url += marker_url;
		});
	}
	else {
		map_url += '&center='+ clean_location(map_center);
	}
	// Add the map to the page
	$('#stacks_in_2254_page25').append('<img src="'+ map_url +'" id="map_stacks_in_2254_page25" alt=""/>');
});

//-- End Google Maps Stack --//
	return stack;
})(stacks.stacks_in_2254_page25);


// Javascript for stacks_in_2259_page25
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Lightbox v2.1.1 by Joe Workman
$(document).ready(function() {
	if ('compliant' == 'noncompliant') {
    	var img_height = $('#compliant_1 img').height();
    	var img_width = $('#compliant_1 img').width();
    	var image_src = $("#compliant_1 img").attr("src");

    	$('#compliant_1').height(img_height);
    	$('#compliant_1').width(img_width);
    	$('#compliant_1 a').height(img_height);
    	$("#compliant_1").css({'background-image':'url(' + image_src + ')'});
    	$("#compliant_1 div").remove();
	}
});
// End Lightbox
	return stack;
})(stacks.stacks_in_2259_page25);



