sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


jQuery(document).ready(function() {
	jQuery('A[rel="external"]').click( function() { window.open( jQuery(this).attr('href') ); return false; });
	jQuery('a').click( function() { this.blur(); });
});

Cufon.replace('.menu, h2#page-title, div#thirds h3, .sub-nav a, .home #sidebar h2, #primary h3, #secondary h3');


jQuery(document).ready(function() {

/*	datetoday = new Date();
	timenow = datetoday.getTime();
	datetoday.setTime(timenow);
	thehour = datetoday.getHours();
	theday = datetoday.getDay();
         
	if ( theday == 0 ) {
		if (( thehour >= 12 ) && ( thehour < 20 )) { jQuery('#lights a').addClass('open'); }
	}

	else if ( theday == 1 ) {
		if (( thehour >= 16 ) && ( thehour < 22 )) { jQuery('#lights a').addClass('open'); }
	}

 	else if ( theday == 2 ) {
		if (( thehour >= 16 ) && ( thehour < 22 )) { jQuery('#lights a').addClass('open'); }
	}

	else if ( theday == 3 ) {
		if (( thehour >= 16 ) && ( thehour < 22 )) { jQuery('#lights a').addClass('open'); }
	}

	else if ( theday == 4 ) {
		if (( thehour >= 16 ) && ( thehour < 22 )) { jQuery('#lights a').addClass('open'); }
	}
	
	else if ( theday == 5 ) {
		if (( thehour >= 12 ) && ( thehour < 23 )) { jQuery('#lights a').addClass('open'); }
	}

	else if ( theday == 6 ) {
		if (( thehour >= 10 ) && ( thehour < 23 )) { jQuery('#lights a').addClass('open'); }
	}

	else {
		jQuery('#lights a').removeClass();
	};

*/


	 
	//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
	$('.acc-btn').click(function() {

		//REMOVE THE ON CLASS FROM ALL BUTTONS
		$('.acc-btn').removeClass('on');
		  
		//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
	 	$('.acc-cont').slideUp('normal');
   
		//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
		if($(this).next().is(':hidden') == true) {
			
			//ADD THE ON CLASS TO THE BUTTON
			$(this).addClass('on');
			  
			//OPEN THE SLIDE
			$(this).next().slideDown('normal');
		 } 
		  
	 });
	  
	
	$('.acc-btn').mouseover(function() {
		$(this).addClass('over');

	}).mouseout(function() {
		$(this).removeClass('over');										
	});
	
	$('.acc-cont').hide();
	$("a.acc-btn:eq(0)").trigger('click');
});

