window.addEvent('domready', function() {	var pageurl = document.location.toString();			// homepage...	if ($(document.body).className.indexOf('home') != -1) {			// nothing to see here...			}			// every page but the homepage...		else {				// corporate pages in the top nav...				if ((pageurl.indexOf('/about/') != -1) || (pageurl.indexOf('/news/') != -1) || (pageurl.indexOf('/careers/') != -1) || (pageurl.indexOf('/contacts/') != -1) || (pageurl.indexOf('/sitemap/') != -1) || (pageurl.indexOf('/disclaimer/') != -1)) {					$('titlelink').dispose();					// style adjustment for most of the corporate backpages...			// gives the intro paragraph a larger font-size, line-heignt and deeper bottom margin			// and adds an extra "plus" sign in the content area's left-side margin...							if ( // pages to do this to...				($(document.body).className.indexOf('page-id-42') != -1)  || // /about/profile/				($(document.body).className.indexOf('page-id-50') != -1)  || // /about/people/				($(document.body).className.indexOf('page-id-55') != -1)  || // /about/awards/				($(document.body).className.indexOf('page-id-63') != -1)  || // /about/clients/				($(document.body).className.indexOf('page-id-108') != -1) || // /careers/grow/				($(document.body).className.indexOf('page-id-112') != -1) || // /careers/benefits/				($(document.body).className.indexOf('page-id-128') != -1) ){ // /careers/openings/								var thediv = $$('div.page')[0];				var thep = thediv.getFirst().getNext(); // first paragraph								thep.addClass('intro');								// get height of the first paragraph...				if (Browser.ie) {					var h = thep.clientHeight;				}				else {					var h = thep.getCoordinates().height;				}								// add extra plus sign...				var newplus = new Element('img', {	            	'src': '/wp-content/themes/projekt/css/img/plus.gif',	            	'alt': ''	            })	            .setStyles({	            	'position': 'absolute',	            	'top': 82 + h,	            	'left': 7	            })	            .inject($('rite'));			}							// set "Firm Capabilities" subnav menu...						$('firm').addEvent('mouseover', function() {				subMenu.over('root', 15);			}).addEvent('mouseout', function() {				subMenu.out('root', 15);			}).addEvent('click', function() {				return false;			});						// add hold-hover states to subnav trigger...						$$('#subMenu-subnavMenu15').addEvent('mouseenter', function() {				$('firm').addClass('x');			}).addEvent('mouseleave', function() {				(function() {					$('firm').removeClass('x');				}).delay(500);			});				}						// section landing pages, portfolios pages & capabilities pages...				else {					// style adjustment for JUST the capabilities pages...			// gives the intro paragraph a larger font-size, line-heignt and deeper bottom margin			// and adds an extra "plus" sign in the content area's left-side margin...						// pages to do this to...			if (pageurl.indexOf('/capabilities') != -1) {								var thediv = $$('div.page')[0];				var thep = thediv.getFirst().getNext(); // first paragraph								thep.addClass('intro');								// get height of the first paragraph...				if (Browser.ie) {					var h = thep.clientHeight;				}				else {					var h = thep.getCoordinates().height;				}								// add extra plus sign...				var newplus = new Element('img', {	            	'src': '/wp-content/themes/projekt/css/img/plus.gif',	            	'alt': ''	            })	            .setStyles({	            	'position': 'absolute',	            	'top': 82 + h,	            	'left': 7	            })	            .inject($('rite'));			}						/* ---------- */					var link = '';			var name = '';			var pmenu = '';			var cmenu = '';						if (pageurl.indexOf('/federal-military-facilities') != -1) {				link = 'federal-military-facilities';				name = 'Federal / Military Facilities';				pmenu = 1;				cmenu = 2;			}			if (pageurl.indexOf('/aviation') != -1 && pageurl.indexOf('/federal-military-facilities') == -1) {				link = 'aviation';				name = 'Aviation';				pmenu = 3;				cmenu = 4;			}			if (pageurl.indexOf('/fueling') != -1) {				link = 'fueling';				name = 'Fueling';				pmenu = 5;				cmenu = 6;			}			if (pageurl.indexOf('/public-safety-civic-education-facilities') != -1) {				link = 'public-safety-civic-education-facilities';				name = 'Public Safety / Civic / Education Facilities';				pmenu = 7;				cmenu = 8;			}			if (pageurl.indexOf('/transportation') != -1) {				link = 'transportation';				name = 'Transportation';				pmenu = 9;				cmenu = 10;			}			if (pageurl.indexOf('/landscape-architecture-planning-urban-design') != -1) {				link = 'landscape-architecture-planning-urban-design';				name = 'Landscape Architecture / Planning / Urban Design';				pmenu = 11;				cmenu = 12;			}			if (pageurl.indexOf('/municipal-infrastructure') != -1) {				link = 'municipal-infrastructure';				name = 'Municipal Infrastructure';				pmenu = 13;				cmenu = 14;			}						if (pageurl.indexOf('/green') == -1 || pageurl.indexOf('/greens') != -1) { // all section landing pages, portfolios pages & capabilities pages BUT "Green"				// (all pages w/ a subnav)								// set subnav menus...								$('portfolio').addEvent('mouseover', function() {					subMenu.over('root', pmenu);				}).addEvent('mouseout', function() {					subMenu.out('root', pmenu);				}).addEvent('click', function() {					return false;				});								if (pageurl.indexOf('/federal-military') == -1) { // all sections get a "capabilities" menu BUT "Federal / Military Facilities" & Green									$('capabilities').addEvent('mouseover', function() {						subMenu.over('root', cmenu);					}).addEvent('mouseout', function() {						subMenu.out('root', cmenu);					}).addEvent('click', function() {						return false;					});									}				else {					$('capabilities').set('href', '/federal-military-facilities/capabilities/');				}												// add hold-hover states to subnav triggers...						$$('#subMenu-subnavMenu1, #subMenu-subnavMenu3, #subMenu-subnavMenu5, #subMenu-subnavMenu7, #subMenu-subnavMenu9, #subMenu-subnavMenu11, #subMenu-subnavMenu13').addEvent('mouseenter', function() {					$('portfolio').addClass('x');				}).addEvent('mouseleave', function() {					(function() {						$('portfolio').removeClass('x');					}).delay(500);				});								$$('#subMenu-subnavMenu2, #subMenu-subnavMenu4, #subMenu-subnavMenu6, #subMenu-subnavMenu8, #subMenu-subnavMenu10, #subMenu-subnavMenu12, #subMenu-subnavMenu14, #subMenu-subnavMenu15').addEvent('mouseenter', function() {					$('capabilities').addClass('x');				}).addEvent('mouseleave', function() {					(function() {						$('capabilities').removeClass('x');					}).delay(500);				});						}			else { // IS the "Green" section				link = 'green';				name = 'Green';				$('portfolio').set('href', '/portfolios/green-projects/');				$('capabilities').set('href', '/green/capabilities/');			}									$('firm').addEvent('mouseover', function() {				subMenu.over('root', 16);			}).addEvent('mouseout', function() {				subMenu.out('root', 16);			}).addEvent('click', function() {				return false;			});						$$('#subMenu-subnavMenu16').addEvent('mouseenter', function() {				$('firm').addClass('x');			}).addEvent('mouseleave', function() {				(function() {					$('firm').removeClass('x');				}).delay(500);			});									$(document.body).addClass(link);    		    		    		// set section title in the header...    		    		if ($(document.body).className.indexOf('landing') == -1) { // is NOT a landing page	    		$('titlelink').set('html', name);	    		$('titlelink').set('href', '/' + link + '/');	    		$('titlelink').set('title', 'go to the "' + name + '" homepage');	    			    		$('title').addEvent('mouseenter', function() {					$('title').addClass('x');				}).addEvent('mouseleave', function() {					$('title').removeClass('x');					$('title').removeProperty('class'); // doesn't really seem to work but we'll keep it here anyway				});				    		}    		else { // IS a landing page    			$('titlelink').dispose();    			// $('title').set('html', name);    		}    		    		    		// set section link in the footer...    		    		if ($('sectionlink')) {    			$('sectionlink').set('href', '/' + link + '/');    			$('sectionlink').set('html', name);    		}						}		    				// set topnav menus...				$('about').addEvent('mouseover', function() {			topMenu.over('root', 1);		}).addEvent('mouseout', function() {			topMenu.out('root', 1);		});				$('careers').addEvent('mouseover', function() {			topMenu.over('root', 2);		}).addEvent('mouseout', function() {			topMenu.out('root', 2);		});		    	// add hold-hover states to topnav triggers...			$('topMenu-topnavMenu1').addEvent('mouseenter', function() {			$('about').addClass('x');		}).addEvent('mouseleave', function() {			(function() {				$('about').removeClass('x');			}).delay(500);		});				$('topMenu-topnavMenu2').addEvent('mouseenter', function() {			$('careers').addClass('x');		}).addEvent('mouseleave', function() {			(function() {				$('careers').removeClass('x');			}).delay(500);		});						// add hover text behavior for green icon...				$('green').addEvent('mouseenter', function() {			$('hover').setStyle('display', 'block');		}).addEvent('mouseleave', function() {			$('hover').setStyle('display', 'none');		});		    	    	// all "pages"...		if ($(document.body).className.indexOf('page') != -1) {					// page stuff...					}						// all posts...				if ($(document.body).className.indexOf('post') != -1) {					// identify portfolio project pages...						if (pageurl.indexOf('/portfolios/') != -1) {				$(document.body).addClass('project');							}					}						// category pages...				if ($(document.body).className.indexOf('category') != -1) {					// identify portfolio grid pages...						if (pageurl.indexOf('/portfolios/') != -1) {				$(document.body).addClass('grid');							}					}		    		}	});
