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

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);


/*
 * Supersubs v0.2b - jQuery plugin
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 *
 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
 * their longest list item children. If you use this, please expect bugs and report them
 * to the jQuery Google Group with the word 'Superfish' in the subject line.
 *
 */

;(function($){ // $ will refer to jQuery within this closure

	$.fn.supersubs = function(options){
		var opts = $.extend({}, $.fn.supersubs.defaults, options);
		// return original object to support chaining
		return this.each(function() {
			// cache selections
			var $$ = $(this);
			// support metadata
			var o = $.meta ? $.extend({}, opts, $$.data()) : opts;
			// get the font size of menu.
			// .css('fontSize') returns various results cross-browser, so measure an em dash instead
			var fontsize = $('<li id="menu-fontsize">&#8212;</li>').css({
				'padding' : 0,
				'position' : 'absolute',
				'top' : '-999em',
				'width' : 'auto'
			}).appendTo($$).width(); //clientWidth is faster, but was incorrect here
			// remove em dash
			$('#menu-fontsize').remove();
			// cache all ul elements
			$ULs = $$.find('ul');
			// loop through each ul in menu
			$ULs.each(function(i) {	
				// cache this ul
				var $ul = $ULs.eq(i);
				// get all (li) children of this ul
				var $LIs = $ul.children();
				// get all anchor grand-children
				var $As = $LIs.children('a');
				// force content to one line and save current float property
				var liFloat = $LIs.css('white-space','nowrap').css('float');
				// remove width restrictions and floats so elements remain vertically stacked
				var emWidth = $ul.add($LIs).add($As).css({
					'float' : 'none',
					'width'	: 'auto'
				})
				// this ul will now be shrink-wrapped to longest li due to position:absolute
				// so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer
				.end().end()[0].clientWidth / fontsize;
				// add more width to ensure lines don't turn over at certain sizes in various browsers
				emWidth += o.extraWidth;
				// restrict to at least minWidth and at most maxWidth
				if (emWidth > o.maxWidth)		{ emWidth = o.maxWidth; }
				else if (emWidth < o.minWidth)	{ emWidth = o.minWidth; }
				emWidth += 'em';
				// set ul to width in ems
				$ul.css('width',emWidth);
				// restore li floats to avoid IE bugs
				// set li width to full width of this ul
				// revert white-space to normal
				$LIs.css({
					'float' : liFloat,
					'width' : '100%',
					'white-space' : 'normal'
				})
				// update offset position of descendant ul to reflect new width of parent
				.each(function(){
					var $childUl = $('>ul',this);
					var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right';
					$childUl.css(offsetDirection,emWidth);
				});
			});
			
		});
	};
	// expose defaults
	$.fn.supersubs.defaults = {
		minWidth		: 9,		// requires em unit.
		maxWidth		: 25,		// requires em unit.
		extraWidth		: 0			// extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
	};
	
})(jQuery); // plugin code ends


/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */

;(function($){
	$.fn.superfish = function(op){

		var sf = $.fn.superfish,
			c = sf.c,
			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$), o = sf.op;
				clearTimeout(menu.sfTimer);
				menu.sfTimer=setTimeout(function(){
					o.retainPath=($.inArray($$[0],o.$path)>-1);
					$$.hideSuperfishUl();
					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
				},o.delay);	
			},
			getMenu = function($menu){
				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
				sf.op = sf.o[menu.serial];
				return menu;
			},
			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
			
		return this.each(function() {
			var s = this.serial = sf.o.length;
			var o = $.extend({},sf.defaults,op);
			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
					.filter('li:has(ul)').removeClass(o.pathClass);
			});
			sf.o[s] = sf.op = o;
			
			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
				if (o.autoArrows) addArrow( $('>a:first-child',this) );
			})
			.not('.'+c.bcClass)
				.hideSuperfishUl();
			
			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			o.onInit.call(this);
			
		}).each(function() {
			var menuClasses = [c.menuClass];
			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
			$(this).addClass(menuClasses.join(' '));
		});
	};

	var sf = $.fn.superfish;
	sf.o = [];
	sf.op = {};
	sf.IE7fix = function(){
		var o = sf.op;
		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
			this.toggleClass(sf.c.shadowClass+'-off');
		};
	sf.c = {
		bcClass     : 'sf-breadcrumb',
		menuClass   : 'sf-js-enabled',
		anchorClass : 'sf-with-ul',
		arrowClass  : 'sf-sub-indicator',
		shadowClass : 'sf-shadow'
	};
	sf.defaults = {
		hoverClass	: 'sfHover',
		pathClass	: 'overideThisToUse',
		pathLevels	: 1,
		delay		: 800,
		animation	: {opacity:'show'},
		speed		: 'normal',
		autoArrows	: true,
		dropShadows : true,
		disableHI	: false,		// true disables hoverIntent detection
		onInit		: function(){}, // callback functions
		onBeforeShow: function(){},
		onShow		: function(){},
		onHide		: function(){}
	};
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = sf.op,
				not = (o.retainPath===true) ? o.$path : '';
			o.retainPath = false;
			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = sf.op,
				sh = sf.c.shadowClass+'-off',
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			sf.IE7fix.call($ul);
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
			return this;
		}
	});

})(jQuery);


$(document).ready(function() {
	var outputDiv = $('#stacks_in_1_page13_ul');
	var outputHTML = makeNestedList('#stacks_in_1_page13_slices');
	outputDiv.html(outputHTML);
	$('#stacks_in_1_page13_ul').supersubs({ 
		minWidth:    12,   	// minimum width of sub-menus in em units 
		maxWidth:    27,   	// maximum width of sub-menus in em units 
		extraWidth:  1     						// extra width can ensure lines don't sometimes turn over 
	                               				// due to slight rounding differences and font-family 
	}).superfish({
		delay:       800,                            // one second delay on mouseout 
        animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
        speed:       'normal',                          // faster animation speed 
        autoArrows:  true,                           // disable generation of arrow mark-up 
        dropShadows: true                            // disable drop shadows
	}); 
		
		
		
		function makeNestedList(topLevelID) {
			var outputHTML = '';
			eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(u).4().4().4().p(q(b){5($(9).o(\'t\')){h c=$(9).4().4().m();c=c.6("<2 e=\\"f\\"></2>",\'\');c=c.6("<2 e=\'f\'><\\/2>",\'\');3+=\'<7>\'+$.j(c)}k 5($(9).o(\'y\')){h c=$(9).4().4().m();c=c.6("<2 e=\\"f\\"></2>",\'\');c=c.6("<2 e=\'f\'><\\/2>",\'\');c=c.6(/<\\/8>/i,\'</8><g />\');c=c.6(/<g>/v,\'<g />\');c=$.j(c);h d=c.s(/<g \\/>/i);5(c.l){3+=\'<8>\';$.p(d,q(n,a){a=$.j(a);5(a.l!=0){5(a.w(/<8/i)){3+=a;x r}k{5(n!=0){3+=\'</7>\'}z=r;3+=\'<7>\'+a;5(n==d.l-1){3+=\'</7>\'}}}});3+=\'</8></7>\'}k{3+=\'</7>\'}}});',36,36,'||div|outputHTML|children|if|replace|li|ul|this|||||class|stacks_clearer|br|var||trim|else|length|html||hasClass|each|function|true|split|stacks_left|topLevelID|ig|match|return|stacks_right|firstLineDone'.split('|'),0,{}));
			return outputHTML;
		}
	
});

	return stack;
})(stacks.stacks_in_1_page13);


// Javascript for stacks_in_54_page13
// ---------------------------------------------------------------------

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

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

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

/*  Totem Ticker Plugin
 *	Copyright (c) 2011 Zach Dunn / www.buildinternet.com
 *	Released under MIT License */
(function(a){if(!a.omr){a.omr=new Object()}a.omr.totemticker=function(c,b){var d=this;d.el=c;d.$el=a(c);d.$el.data("omr.totemticker",d);d.init=function(){d.options=a.extend({},a.omr.totemticker.defaultOptions,b);d.ticker;d.format_ticker();d.setup_nav();d.start_interval()};d.start_interval=function(){clearInterval(d.ticker);if(d.options.direction=="up"){d.ticker=setInterval(function(){d.$el.find("li:last").detach().prependTo(d.$el).css("marginTop","-"+d.options.row_height);d.$el.find("li:first").animate({marginTop:"0px",},d.options.speed,function(){})},d.options.interval)}else{d.ticker=setInterval(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0").appendTo(d.$el)})},d.options.interval)}};d.reset_interval=function(){clearInterval(d.ticker);d.start_interval()};d.stop_interval=function(){clearInterval(d.ticker)};d.format_ticker=function(){if(typeof(d.options.max_items)!="undefined"&&d.options.max_items!=null){var f=d.options.row_height.replace(/px/i,"");var e=f*d.options.max_items;d.$el.css({height:e+"px",overflow:"hidden",})}else{d.$el.css({overflow:"hidden",})}};d.setup_nav=function(){if(typeof(d.options.stop)!="undefined"&&d.options.stop!=null){a(d.options.stop).click(function(){d.stop_interval();return false})}if(typeof(d.options.start)!="undefined"&&d.options.start!=null){a(d.options.start).click(function(){d.start_interval();return false})}if(typeof(d.options.previous)!="undefined"&&d.options.previous!=null){a(d.options.previous).click(function(){d.$el.find("li:last").detach().prependTo(d.$el).css("marginTop","-"+d.options.row_height);d.$el.find("li:first").animate({marginTop:"0px",},d.options.speed,function(){d.reset_interval()});return false})}if(typeof(d.options.next)!="undefined"&&d.options.next!=null){a(d.options.next).click(function(){d.$el.find("li:first").animate({marginTop:"-"+d.options.row_height,},d.options.speed,function(){a(this).detach().css("marginTop","0px").appendTo(d.$el);d.reset_interval()});return false})}if(typeof(d.options.mousestop)!="undefined"&&d.options.mousestop===true){d.$el.mouseenter(function(){d.stop_interval()}).mouseleave(function(){d.start_interval()})}};d.debug_info=function(){console.log(d.options)};d.init()};a.omr.totemticker.defaultOptions={message:"Ticker Loaded",next:null,previous:null,stop:null,start:null,row_height:"100px",speed:800,interval:4000,max_items:null,mousestop:false,direction:"down",};a.fn.totemticker=function(b){return this.each(function(){(new a.omr.totemticker(this,b))})}})(jQuery);

jQuery.fn.exists = function(){return jQuery(this).length>0;}

$(document).ready(function() {	
	var bg_color = $('#stacks_in_54_page13').css('background-color');
	if (bg_color) { 
		$('#stacks_in_54_page13').css({'background-color': 'transparent'});	
		$('#totem_stacks_in_54_page13').css({'background-color': bg_color });	
	}
	var bg_border_style = $('#stacks_in_54_page13').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color  = $('#stacks_in_54_page13').css('border-bottom-color');
		var bg_border_top 	 = $('#stacks_in_54_page13').css('border-top-width');
		var bg_border_right  = $('#stacks_in_54_page13').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_54_page13').css('border-bottom-width');
		var bg_border_left 	 = $('#stacks_in_54_page13').css('border-left-width');
		$('#stacks_in_54_page13').css({'border-width':0});	
		$('#stacks_in_54_page13 .totem_wrapper').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
		});	
	}
	// Remove the Nav containers if images were not used.
	if (! $('#totem_next_stacks_in_54_page13 img').exists()) {
	    $('#totem_next_stacks_in_54_page13').remove();
	}
	if (! $('#totem_prev_stacks_in_54_page13 img').exists()) {
	    $('#totem_prev_stacks_in_54_page13').remove();
	}
	
	$('#totem_stacks_in_54_page13').totemticker({
		row_height	:	'180px',
		next		:	'#totem_next_stacks_in_54_page13',
		previous	:	'#totem_prev_stacks_in_54_page13',
		stop		:	'#totem_stop',
		start		:	'#totem_start',
		mousestop	:	true,
        speed       :   800,
        interval    :   5000,
        max_items   :   1
	});	
	// Take the bottom borders into effect when calculating the height
	$('#totem_stacks_in_54_page13').height( (1 * 180) + (1 - 1));
});


//-- End Totem Stack --//
	return stack;
})(stacks.stacks_in_54_page13);


// Javascript for stacks_in_77_page13
// ---------------------------------------------------------------------

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

// 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_77_page13 = (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 ('noncompliant' == 'noncompliant') {
    	var img_height = $('#compliant_Map img').height();
    	var img_width = $('#compliant_Map img').width();
    	var image_src = $("#compliant_Map img").attr("src");

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


// Javascript for stacks_in_82_page13
// ---------------------------------------------------------------------

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

// 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_82_page13 = (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($) {
    var opt;

    $.fn.jqprint = function (options) {
        opt = $.extend({}, $.fn.jqprint.defaults, options);

        var $element = (this instanceof jQuery) ? this : $(this);
        
        if (opt.operaSupport && $.browser.opera) 
        { 
            var tab = window.open("","jqPrint-preview");
            tab.document.open();

            var doc = tab.document;
        }
        else 
        {
            var $iframe = $("<iframe  />");
        
            if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }

            $iframe.appendTo("body");
            var doc = $iframe[0].contentWindow.document;
        }
        
        if (opt.importCSS)
        {
            if ($("link[media=print]").length > 0) 
            {
                $("link[media=print]").each( function() {
                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
                });
            }
            else 
            {
                $("link").each( function() {
                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
                });
            }
        }
        if (opt.printContainer) { doc.write($element.outer()); }
        else { $element.each( function() { doc.write($(this).html()); }); }

        doc.close();


        
        (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
        setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
    }
    
    $.fn.jqprint.defaults = {
		debug: false,
		importCSS: true, 
		printContainer: true,
		operaSupport: true
	};
    

    // Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
    jQuery.fn.outer = function() {
      return $($('<div></div>').html(this.clone())).html();
    } 
})(jQuery);


// start call


            $(function() {
                
                $("#stacks_in_82_page13 #stacks_in_82_page13printbtn").click( function() {
                 $("#stacks_in_82_page13printbtn").hide();
                 $("#stacks_in_82_page13 #tick_container").hide();

                    $('#stacks_in_82_page13printablestack').jqprint();
                    return false;
                });
                
                $("#stacks_in_82_page13 #stacks_in_82_page13printbtn").click( function() {
                $("#stacks_in_82_page13printbtn").show();
                $("#stacks_in_82_page13printbtn").css("cursor","default");
                $("#stacks_in_82_page13 #tick_container").css("visibility","visible");
                $("#stacks_in_82_page13 #tick_container").show();
                });

            });

                




	return stack;
})(stacks.stacks_in_82_page13);


// Javascript for stacks_in_84_page13
// ---------------------------------------------------------------------

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

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

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

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// DOO A MAP STACK BY http://www.doobox.co.uk XXXXXXX
// COPYRIGHT@2010 MR JG SIMPSON, TRADING AS DOOBOX
// ALL RIGHTS RESERVED XXXXXXXXXXXXXXXXXXXXXXXXXXX
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



$(document).ready(function() {

var doomaplocation = "6100 37th Street West  Webster, MN  55088 ";
var doomaptype = "1";
if (doomaptype == 1){
doomaptype = "roadmap"}
else{
doomaptype = "hybrid"} 
var doomapwidth = "300";
var doomapheight = "300";
var doozoomlevel = "11";
var doomappincolor = "3793FF";
var dooamap;
var doomaplabelborder = "F5B42A";
var doomaplabelbackground = "F0EADF";

	
function dootidylocation(doomaplocation) {
	doomaplocation = doomaplocation.replace(/\<\s*br\s*\/\>/g,',');
	doomaplocation = doomaplocation.replace(/[\s]+/g,'+');
	doomaplocation = doomaplocation.replace(/\s*\,+\s*/g,',');
	return $.trim(doomaplocation);
}

doomaplocation = dootidylocation(doomaplocation);

$('.stacks_in_84_page13mapplus').click(function() {
	doozoomlevel = parseInt(doozoomlevel) + 1;
	$("#stacks_in_84_page13 .stacks_in_84_page13mapcontainer img").remove();
	dooshowthemap();
});


$('.stacks_in_84_page13mapminus').click(function() {
	doozoomlevel = parseInt(doozoomlevel) - 1;
	$("#stacks_in_84_page13 .stacks_in_84_page13mapcontainer img").remove();
	dooshowthemap();
});


function dooshowthemap() {
var dooamap = "http://maps.googleapis.com/maps/api/staticmap?center=" + doomaplocation + "&zoom=" + doozoomlevel + "&size="+ doomapwidth +"x"+ doomapheight +"&maptype="+ doomaptype +"&markers=|color:0x"+doomappincolor+"|"+ doomaplocation +"&sensor=false";
// Append the map

$("#stacks_in_84_page13 .stacks_in_84_page13mapcontainer").append('<img src="'+ dooamap +'" id="#stacks_in_84_page13dooamap" alt="Loading Map..."/>');
}


dooshowthemap();


var doomaplabelwidth = "300" - ("20" * 2);
var doomaplabelheight = "300" - ("20" * 2);
var doomaplabelleftoffset = doomaplabelwidth / 2 + 3;
var doomaplabeltopoffset = doomaplabelheight / 2 + 3;
var doomapdirections = $('.stacks_in_84_page13directions').clone().html();


 
 $(".stacks_in_84_page13dooamaplabel").mouseenter(function() {
 if ($('.stacks_in_84_page13directions .stacks_in').length > 0){
    $('.stacks_in_84_page13dooamaplabel').css({
    "position" : "absolute",
	"width": doomaplabelwidth + "px",
	"height": doomaplabelheight + "px",
	"top": "50%",
	"left": "50%",
	"marginTop": "-" + doomaplabeltopoffset + "px",
	"marginLeft": "-" + doomaplabelleftoffset + "px",
	"background" : "#" + doomaplabelbackground,
	"border" : "3px solid #" + doomaplabelborder,
	"display":"none"
	});
	$('.stacks_in_84_page13dooamaplabel').append("<div class='stacks_in_84_page13temp'>" + doomapdirections + "</div>").fadeIn();
	if($('.stacks_in_84_page13dooamaplabel').width() < 50){
	$('.stacks_in_84_page13dooamapalert').css("display","block");
	}
	}
  }).mouseleave(function(){
     $('.stacks_in_84_page13dooamaplabel').css({
    "position" : "absolute",
	"width": "40px",
	"height": "40px",
	"top": "50%",
	"left": "50%",
	"marginTop": "-40px",
	"marginLeft": "-20px",
	"background" : "transparent url(files/mouseCapture.png)",
	"border" : "none"
	});
	$('.stacks_in_84_page13temp').remove();
  });





});





// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// END DOOBOX DOO A MAP STACK XXXXXXXXXXXXXXXXX
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
	return stack;
})(stacks.stacks_in_84_page13);



