/*******************************************
*	INITIALIZE THE PAGE FUNCTIONS, ETC
*
*******************************************/

/**
* 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);

/**
* EasyDrag 1.4 - Drag & Drop jQuery Plug-in
*
* Thanks for the community that is helping the improvement
* of this little piece of code.
*
* For usage instructions please visit http://fromvega.com
*/
(function($){var d=false;var f=null;var g={};var h={};var i;var j;var k;var l;var m={};$.getMousePosition=function(e){var a=0;var b=0;if(!e)var e=window.event;if(e.pageX||e.pageY){a=e.pageX;b=e.pageY}else if(e.clientX||e.clientY){a=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;b=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{'x':a,'y':b}};$.updatePosition=function(e){var a=$.getMousePosition(e);var b=(a.x-i);var c=(a.y-j);$(f).css("top",(k+c));$(f).css("left",(l+b))};$(document).mousemove(function(e){if(d&&m[f.id]=='on'){$.updatePosition(e);if(h[f.id]!=undefined){h[f.id](e,f)}return false}});$(document).mouseup(function(e){if(d&&m[f.id]=='on'){d=false;if(g[f.id]!=undefined){g[f.id](e,f)}return false}});$.fn.ondrag=function(a){return this.each(function(){h[this.id]=a})};$.fn.ondrop=function(a){return this.each(function(){g[this.id]=a})};$.fn.dragOff=function(){return this.each(function(){m[this.id]='off'})};$.fn.dragOn=function(){return this.each(function(){m[this.id]='on'})};$.fn.easydrag=function(b){return this.each(function(){if(undefined==this.id||!this.id.length)this.id="easydrag"+(new Date().getTime());m[this.id]="on";$(this).css("cursor","move");$(this).mousedown(function(e){$(this).css("position","absolute");$(this).css("z-index","10000");d=true;f=this;var a=$.getMousePosition(e);i=a.x;j=a.y;k=this.offsetTop;l=this.offsetLeft;$.updatePosition(e);return b?true:false})})}})(jQuery);

/*
 * Thickbox 3 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
var tb_pathToImage="/media/launch/layout/loadingAnimation.gif";$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(b){$(b).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false})}function tb_show(g,h,i,zz){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(g===null){g=""}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$('#TB_load').show();var j;if(h.indexOf("?")!==-1){j=h.substr(0,h.indexOf("?"))}else{j=h}var k=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var l=j.toLowerCase().match(k);if(l=='.jpg'||l=='.jpeg'||l=='.png'||l=='.gif'||l=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(i){TB_TempArray=$("a[@rel="+i+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var m=TB_TempArray[TB_Counter].href.toLowerCase().match(k);if(!(TB_TempArray[TB_Counter].href==h)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var a=tb_getPageSize();var x=a[0]-150;var y=a[1]-150;var b=imgPreloader.width;var c=imgPreloader.height;if(b>x){c=c*(x/b);b=x;if(c>y){b=b*(y/c);c=y}}else if(c>y){b=b*(y/c);c=y;if(b>x){c=c*(x/b);b=x}}TB_WIDTH=b+30;TB_HEIGHT=c+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+h+"' width='"+b+"' height='"+c+"' alt='"+g+"'/></a>"+"<div id='TB_caption'>"+g+"<div id='TB_secondLine'>"+zz+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><i>Esc Key or</i> <a href='#' id='TB_closeWindowButton' title='Close'>close</a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function d(){if($(document).unbind("click",d)){$(document).unbind("click",d)}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,i);return false}$("#TB_prev").click(d)}if(!(TB_NextHTML==="")){function f(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,i);return false}$("#TB_next").click(f)}document.onkeydown=function(e){if(e==null){keycode=event.keyCode}else{keycode=e.which}if(keycode==27){tb_remove()}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";f()}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";d()}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=h}else{var n=h.replace(/^[^\?]+\??/,'');var o=tb_parseQuery(n);TB_WIDTH=(o['width']*1)+30||630;TB_HEIGHT=(o['height']*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(h.indexOf('TB_iframe')!=-1){urlNoQuery=h.split('TB_');$("#TB_iframeContent").remove();if(o['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+g+"</div><div id='TB_closeAjaxWindow'><i>Esc Key or</i> <a href='#' id='TB_closeWindowButton' title='Close'>close</a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(o['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+g+"</div><div id='TB_closeAjaxWindow'><i>Esc Key or</i> <a href='#' id='TB_closeWindowButton' title='Close'>close</a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(g)}}$("#TB_closeWindowButton").click(tb_remove);if(h.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+o['inlineId']).children());$("#TB_window").unload(function(){$('#'+o['inlineId']).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else if(h.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(h+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}if(!o['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode}else{keycode=e.which}if(keycode==27){tb_remove()}}}}catch(e){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'})}}function tb_parseQuery(a){var b={};if(!a){return b}var c=a.split(/[;&]/);for(var i=0;i<c.length;i++){var d=c[i].split('=');if(!d||d.length!=2){continue}var e=unescape(d[0]);var f=unescape(d[1]);f=f.replace(/\+/g,' ');b[e]=f}return b}function tb_getPageSize(){var a=document.documentElement;var w=window.innerWidth||self.innerWidth||(a&&a.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(a&&a.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf('mac')!=-1&&a.indexOf('firefox')!=-1){return true}}

/* Wayfarer Tooltip
 * Version 1.0.3
 * Author Abel Mohler
 * URI: http://www.wayfarerweb.com/wtooltip.php
 * Released with the MIT License: http://www.wayfarerweb.com/mit.php
 */
(function(a){a.fn.wTooltip=function(f,r){f=a.extend({content:null,ajax:null,follow:true,auto:true,fadeIn:0,fadeOut:0,appendTip:document.body,degrade:false,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(t,p,o){},callAfter:function(t,p,o){},clickAction:function(p,o){a(p).hide()},delay:0,timeout:0,cloneable:false},f||{});if(!f.style&&typeof f.style!="object"){f.style={};f.style.zIndex="1000"}else{f.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},f.style||{})}if(typeof r=="function"){f.callAfter=r||f.callAfter}f.style.display="none",f.style.position="absolute";var m,l,q,c,k={},b=true,e=false,n=false,s=document.createElement("div"),g=(typeof document.body.style.maxWidth=="undefined")?true:false,j=(typeof a.talk=="function"&&typeof a.listen=="function")?true:false;if(f.id){s.id=f.id}if(f.className){s.className=f.className}f.degrade=(f.degrade&&g)?true:false;for(var d in f.style){s.style[d]=f.style[d]}function i(o){if(o){if(f.degrade){a(s).html(f.content.replace(/<\/?[^>]+>/gi,""))}else{a(s).html(f.content)}}}if(f.ajax){a.get(f.ajax,function(o){if(o){f.content=o}i(f.content)})}function h(p){function t(u){if(m&&!f.content){u.title=m;m=null}}function o(){if(!e&&f.auto){clearInterval(c);if(f.fadeOut){a(s).fadeOut(f.fadeOut,function(){t(p)})}else{t(p);s.style.display="none"}}if(typeof f.callAfter=="function"){f.callAfter(s,p,f)}if(j){f=a.listen(f)}}if(f.timeout>0){q=setTimeout(function(){o()},f.timeout)}else{o()}}a(s).hover(function(){e=true},function(){e=false;h(k)});if(j){f.key=s;f.plugin="wTooltip";f.channel="wayfarer";a.talk(f)}i(f.content&&!f.ajax);a(s).appendTo(f.appendTip);return this.each(function(){this.onmouseover=function(t){var p=this;clearTimeout(q);if(this.title&&!f.degrade&&!f.content){m=this.title;this.title=""}if(f.content&&f.degrade){this.title=s.innerHTML}function o(){if(typeof f.callBefore=="function"){f.callBefore(s,p,f)}if(j){f=a.listen(f)}if(f.auto){var u;if(f.content){if(!f.degrade){u="block"}}else{if(m&&!f.degrade){a(s).html(m);u="block"}else{u="none"}}if(u=="block"&&f.fadeIn){a(s).fadeIn(f.fadeIn)}else{s.style.display=u}}}if(f.delay>0){l=setTimeout(function(){o()},f.delay)}else{o()}};this.onmousemove=function(y){var w=(y)?y:window.event,v=this;k=this;if(f.follow||b){var A=a(window).scrollTop(),B=a(window).scrollLeft(),x=w.clientY+A+f.offsetY,t=w.clientX+B+f.offsetX,z=a(f.appendTip).outerHeight(),p=a(f.appendTip).innerHeight(),o=a(window).width()+B-a(s).outerWidth(),u=a(window).height()+A-a(s).outerHeight();x=(z>p)?x-(z-p):x;n=(x>u||t>o)?true:false;if(t-B<=0&&f.offsetX<0){t=B}else{if(t>o){t=o}}if(x-A<=0&&f.offsetY<0){x=A}else{if(x>u){x=u}}s.style.top=x+"px";s.style.left=t+"px";b=false}};this.onmouseout=function(){clearTimeout(l);var o=this;b=true;if(!f.follow||n||(f.offsetX<0&&f.offsetY<0)){setTimeout(function(){c=setInterval(function(){h(o)},1)},1)}else{h(this)}};if(typeof f.clickAction=="function"){this.onclick=function(){f.clickAction(s,this)}}})}})(jQuery);

//jQuery Text Children plugin
(function(e){e.fn.textChildren=function(a,i){if(typeof a=='object'){i=a;a='all'}var f=e.extend({},e.fn.textChildren.defaults,i||{});var b=f.outputType=='string'?'':[];var c='';this.each(function(k){var g=a;var d=e.grep(this.childNodes,function(j){return(j.nodeType==3)});if(a=='first'){g=0}else if(a=='last'){g=d.length-1}else if(a<0){g=d.length+a}if(g>=d.length||g<0){return}if(a==undefined||a=='all'){for(var h=0;h<d.length;h++){c=f.trim?e.trim(d[h].nodeValue):d[h].nodeValue;if(f.outputType=='array'){(b.length&&c=='')?b:b.push(c)}else{b+=b==''?c:f.stringDelimiter+c}}}else{c=f.trim?e.trim(d[g].nodeValue):d[g].nodeValue;if(f.outputType=='array'){b.push(c)}else{b+=b==''?c:f.stringDelimiter+c}}});return b};e.fn.textChildren.defaults={outputType:'string',stringDelimiter:'',trim:true}})(jQuery);


//Global Map Variables

	var mapItMap;
	var directionsMap;	
	var dipMap;
	var $tt;
// Dropdown menu using jQuery with mods for easing

//easing
	jQuery.easing['swingOld'] = jQuery.easing['swing']; //rename the swing function
	jQuery.extend(jQuery.easing,{
			easingFunc: function (x, t, b, c, d) {
			return -c *(t/=d)*(t-2) + b;
		}
	});
	
	
	$(document).ready(function(){
		jQuery.fn.slideDownFade = function(speed, easing) {
			return this.animate({height: 'show'}, speed, easing);	
		};
		
		//Hover Menu		
		var $navLi = $('#topNav ul > li');
		var $navDetails = $('div.topNav-dropWrap');
		var hoverConfig = {sensitivity: 3, interval: 50, over: showMenu, timeout: 300, out: hideMenu };
		//animation functions
		function showMenu() {
			$('> div', this).slideDownFade(500, 'swing');
		};
		function hideMenu() {
			$('> div', this).slideUp('fast');
		};
		//animate menu with delay
		$navLi.hoverIntent(hoverConfig);
		$navLi.click(function(){
			$('> div', this).slideDownFade(500, 'swing');
		});
		
		
		$('.popupMapIt').click(function(){
			$('#mapIt').show('fast', function(){
						mapItMap.checkResize();
						$('#mapIt-map').height('85%');
						$('#mapIt-map').width('95%');
						plotMapIt();
						//var point = new GLatLng(40.771592,-111.888189);
//						mapItMap.addOverlay(new GMarker(point));
//						mapItMap.setCenter(new GLatLng(40.771592,-111.888189), 8);
				}).easydrag(true);
		});
		
		
		
		var hide = false;
        $("#logoDesc").hover(function(){
            if (hide) clearTimeout(hide);
            $("#logoDesc").fadeIn();
        }, function() {
            hide = setTimeout(function() {$("#logoDesc").fadeOut("fast");}, 150);
        });
        $("#logoDesc").hover(function(){
            if (hide) clearTimeout(hide);
        }, function() {
            hide = setTimeout(function() {$("#logoDesc").fadeOut("fast");}, 150);
        });
		
		$('#titleAndSearchBar h2').hover(null, function() {
            hide = setTimeout(function() {$("#logoDesc").fadeOut("fast");}, 150);
        });
		
		
	});
	
// header mapIt link control
	
	
	
// footer small map nav reveal
	$(document).ready(function() {

		
// page control click		
		$('#pageControls > a').click(function() {
			$('+ div', this).toggle();
		});
		
    });

// global close button class
	$(document).ready(function() {
		$('.closeButton').click(function() {
			$(this).parent().hide();
			return false;
		});
	});

// global enlarge button class
	var $isPopupMapEnlarged = false;
			var $popupMapWidth;							   
			var $popupMapHeight;

	$(document).ready(function() {
		$('.enlargeButton').click(function() {
			if ($isPopupMapEnlarged) {
				$(this).parent().animate({width:$popupMapWidth, height:$popupMapHeight, left:'3%',top:'3%'},200, function(){mapItMap.checkResize();});
				$(this).toggleClass('enlargeButton').toggleClass('shrinkButton');
				$isPopupMapEnlarged = false;
				return false;
			} else {
				$(this).toggleClass('enlargeButton').toggleClass('shrinkButton');
				$popupMapWidth = $(this).parent().width();							   
				$popupMapHeight = $(this).parent().height();
				$(this).parent().animate({width:'94%', height:'94%', left:'3%',top:'3%'},200, function(){mapItMap.checkResize();});
				$isPopupMapEnlarged = true;
				return false;
			}		
		});
	});
	
// breadcrumbs reveal popup maps
	$(document).ready(function() {
        $("#breadcrumbs span").click(function(){
			$('#usaNavMap').parent('div').hide();							   
			$('div', this).show('fast');
		});

    });
	
	$(document).ready(function() {
		$('.closeButton').click(function() {
			$(this).parent().hide();
			return false;
		});
	});
	$(document).ready(function() {
		$('#mapIt div.closeButton').click(function() {
			if ($isPopupMapEnlarged) {
				$(this).parent().animate({width:$popupMapWidth, height:$popupMapHeight, left:'3%',top:'3%'},200, function() {$('#mapIt').hide();});
				$isPopupMapEnlarged = false;		
			}									   
			return false;
		});
	});	



/*	$(document).ready(function() {
		$('ul.horizontalTabs li a').hover(function() {						   
			$(this).animate({backgroundColor:'#4a58a6'},200);
			return false;
		},function() {						   
			$(this).animate({backgroundColor:'#fbfbfb'},200);
			return false;
		});
	});*/
function outputStatus(e) {
	$("#footerMap-large").hide();
	setTimeout(function() {$("#footerMap-large").hide();}, 650);
}

// SWFObject objects common to all pages
	var flashvars = {};
	var transparent = { wmode: "transparent"};
	var opaque = { wmode: "opaque"};
	
	var attributes = {};
	


	
	swfobject.embedSWF("/modules/navigation/bottom/NorthAmericaNavMap.swf", "footerMap-large", "400", "310", "9.0.0", "/mechanics/flash/swfobject/expressInstall.swf", flashvars, transparent, attributes, outputStatus);
	
	
	swfobject.embedSWF("/modules/elements/pageControls/StateNavMap.swf", "usaNavMap", "400", "246", "9.0.0", "/mechanics/flash/swfobject/expressInstall.swf", flashvars, opaque, attributes);

	
	swfobject.embedSWF("/modules/elements/pageControls/WorldNavMap.swf", "worldNavMap", "400", "246", "9.0.0", "/mechanics/flash/swfobject/expressInstall.swf", flashvars, opaque, attributes);
	
	$(document).ready(function() {
        var hide = false;
        $("#footerMap").hover(function(){
            if (hide) clearTimeout(hide);
            $("#footerMap-large").fadeIn();
        }, function() {
            hide = setTimeout(function() {$("#footerMap-large").fadeOut("fast");}, 150);
        });
        $("#footerMap-large").hover(function(){
            if (hide) clearTimeout(hide);
        }, function() {
            hide = setTimeout(function() {$("#footerMap-large").fadeOut("fast");}, 150);
        });
		// force hide after swfObject draws flash
		
	});
	
	// on SRP, controls the 'View Your Current Search' popup
	$(document).ready(function() {
		$tt = $('.mySearchSet').append("<div>test</div>");
		$tt = $('.mySearchSet div');
		$tt.hide();
		$('.mySearchSet').click(function() {								 
			var display = '<b>Now Searching</b><br />';
			$(this).siblings('form').find('div.checkDrop-wrap > label').each( function() {
				display += "<b>" + $(this).textChildren() + ":</b> ";
				var i = 0;
				$(this).find('INPUT:checkbox:checked').not('.selectAll').each( function() {
						display += $(this).parent().text() + '; ';
						i++;
					});
				$(this).siblings('div.searchBox').find('input').each( function() {
						var l = $(this).val().length;
						if (l > 0 ) {
							display += $(this).val();
							i++;
						}
					});
				if (i == 0)
					display += "All";
				display += "<br />";
			});
			$tt.html(display);	
			$tt.show();
		}).mouseout(function() {
			$tt.hide();
		});	
		
		
		function showMenu2() {
			$('> a + div', this).slideDownFade(500, 'swing');
		};
		function hideMenu2() {
			$('> a + div', this).slideUp('fast');
		};

		var $dropA = $('div.resultsItem h5');
		var hoverConfig2 = {sensitivity: 5, interval: 50, over: showMenu2, timeout: 300, out: hideMenu2 };

		$dropA.hoverIntent(hoverConfig2);	
		
		
	});
	

	
	
	$(document).ready(function(){
		// Reset Font Size
		var originalFontSize = $('p').css('font-size');
			$(".resetFont").click(function(){
			$('p').css('font-size', originalFontSize);
		});
		// Increase Font Size
		$(".increaseFont").click(function(){
			var currentFontSize = $('p').css('font-size');
			var currentFontSizeNum = parseFloat(currentFontSize, 10);
			var newFontSize = currentFontSizeNum*1.2;
			$('p').css('font-size', newFontSize);
			return false;
		});
		// Decrease Font Size
		$(".decreaseFont").click(function(){
			var currentFontSize = $('p').css('font-size');
			var currentFontSizeNum = parseFloat(currentFontSize, 10);
			var newFontSize = currentFontSizeNum*0.8;
			$('p').css('font-size', newFontSize);
			return false;
		});
	});
	
function openNewWindow(url){
		gout__newWin = window.open('/popup.cfm','gout__newWin','width=700,height=550,toolbar,location,status,menubar,directories,scrollbars,resizable');
		setTimeout('gout__newWin.focus();gout__newWin.location.href = ' + '"' +url + '"',000);
		return false;
}

function relocate(me) {
	document.location.href = me.options[me.selectedIndex].value;
}