function siteInit() {
	if($('sitemapvirtualTour')) {
		$('sitemapvirtualTour').observe('click', function(event) {
			Event.stop(event);
			window.open(($('sitemapvirtualTour').firstDescendant()).getAttribute('href'), '', 'width=700, height=450');
		});
	}
	attachEpochHandlers();
	menuSizing();
}

function attachEpochHandlers(){
	var epochDateFields = $$('.formDateSelector');
    for(i=0; i<epochDateFields.length; i++){
        new Epoch('epoch_popup','popup',epochDateFields[i]);
	}
	
	//Attaching handlers to the modified date selector that will work with a "position:fixed;" container
	var epochDateFields2 = $$('.formDateSelectorFixed');
    for(i=0; i<epochDateFields2.length; i++){
        new Epoch('epoch_popup','popupFixed',epochDateFields2[i]);
	}
}

function menuSizing() {
	if($('menuContainer')) {
		//Get the height of the menu container
		menuHeight = $('menuContainer').getHeight() - 1;
		
		//Get pixel height of standard font
		var temp_div = new Element('div');
		temp_div.setStyle({
			height: '1em'
		});
		$('siteContainer').insert(temp_div);
		
		//Get pixel height of menu font
		var menu_size_div = new Element('div');
		var menu_size = $$('.menulist');
		menu_size = menu_size[0].getStyle('font-size');
		menu_size_div.setStyle({
			height: menu_size
		});
		
		//create the measurement divs so we can get their heights
		$('siteContainer').insert(temp_div);
		$('siteContainer').insert(menu_size_div);
		
		//calculate the difference between the size of the menu container and the size of the menu font
		menuFontHeight = menu_size_div.getHeight();
		emHeight = temp_div.getHeight();
		
		paddingHeight = ((menuHeight - menuFontHeight) / 2) * 0.8;
		
		//Set height of the menu links and their vertical position
		$$("ul.menulist>li>a").each(function(s) {
			if(s.id != "menuMeetingsEvents") {
				s.setStyle({
					height: (menuHeight-paddingHeight)+'px',
					paddingTop: paddingHeight+'px'
				});
			}else{
				s.setStyle({
					height: (menuHeight)+'px'
				});
			}
		});
		
		//Center align menu in its container
		menuContainerWidth = $('menuContainer').getWidth();
		menuWidth = $('listMenuRoot').getWidth();
	
		$('listMenuRoot').setStyle({
			marginLeft: (menuContainerWidth - menuWidth)/2 +'px'
		});
		
		//Set location of sub-menu dropdown
		$$(".menulist>li>ul").each(function(s) {
			s.setStyle({
				top: menuHeight +'px'
			});
		});
		
		//Remove temporary items
		temp_div.remove();
		menu_size_div.remove();
		
		//additional code designed to provide propper spacing for the reservation overlay
		if($('reservationFormContainer')) {
			$('seasmokeFooter').setStyle({
				paddingBottom: $('reservationFormContainer').getHeight() + 'px'
			});
		}
	}
}
