var Site = {
	start: function() {	
		Site.anchorScroll();
		Site.setEmalPopUp();
	},
	anchorScroll: function() {
		new SmoothScroll({duration: 1000});
	},
	loadFlash: function(swf_path, target, width, height, version, vars, params, atts) {
		var current_version  = swfobject.getFlashPlayerVersion();
		if(current_version >= version) {
			swfobject.embedSWF(swf_path, target, width, height, version, false, vars, params, atts);	
		}
	},
	setEmalPopUp: function() {
		var epEls = $$("a.email_popup").each(function(epl){
			epl.addEvents({
				click: function() {
					Site.openPopUp(epl.href,'share','status=0,toolbar=0,location=0,menubar=0,resizable=0,scrollbars=0,height=600,width=450');	
					return false;
				}
			});
		});
	},
	openPopUp: function(theURL,winName,features) {
	  window.open(theURL,winName,features);
	}
}
navHover = function() {
	var sfEls = $$("#nav ul li").each(function(parent){
		var elements = parent.getChildren();
		var subnav = elements.filter('ul');
		parent.addEvents({
			mouseenter : function(){ 
				subnav.setStyle('left', 'auto'); 
			},
			mouseleave : function(){ 
				subnav.setStyle('left', '-999em'); 
			}
		});
	});
}
function openFullScreen(theURL) {
	window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}
window.addEvent('domready', function() {
	Site.start();
	//NAVIGATION DROPDOWN
	navHover();
});