$(document).ready(function() {

	$("#accordion,#sideAccord").accordion();

	$('#freeContent').show();
	$('#memberContent').show();
	
// login form
	$('#guest-login').hide();
	$('h2 a#login').click(function() {
		$('#guest-login').slideToggle('slow');
		$('#loginForm :input#username').focus();
		});			    
	
// password reminder form
	$('#password-reminder').hide();
	$('h3#forgot-password').click(function() {
		$('#password-reminder').slideToggle('slow');
		$('#passwordReminder :input#email_forgot_pw').focus();
		});			    
	
// username reminder form
	$('#username-reminder').hide();
	$('h3#forgot-username').click(function() {
		$('#username-reminder').slideToggle('slow');
		$('#reminderUsername :input#email_forgot_un').focus();
		});			    
	
	
	
	
//  $('#memberContent').<?=$memberContentDisplay?>();
 
 // toggles the MemberContent box on the Section detail pages  
	$('a#freeToggle').click(function() {
		if ($('#freeContent').is(":hidden")) { 
			$('#freeContent').slideDown(1000);
			$('#freeContent').effect("highlight", {}, 3000);
			return false;
 		} else {  
        	$("#freeContent").slideUp(1000);  
			return false;
		}
	});

 // toggles the FreeContent box on the Section detail pages  
	$('a#memberToggle').click(function() {
		if ($('#memberContent').is(":hidden")) { 
			$('#memberContent').slideDown(1000);
			$('#memberContent').effect("highlight", {}, 3000);
			return false;
 		} else {  
        	$("#memberContent").slideUp(1000);  
			return false;
		}
	});


	// Hide the DEV ITEMS on page load
		$('#dev_block').hide();
		$('.what').hide();
	// toggles the DEV LIST box in the right column  
		$('#dev_tab').click(function() {
			$('#dev_block').slideToggle('slow');
			$('.what').slideToggle('slow');
			});			    
		



//================================================ commented out bigTarget until needed
	// mainPromos hover
	// Fitted
	//	$('.promoItem').fitted(); 
	// BigTarget
/*
	  $(".promoItem h3 a").bigTarget({
	    hoverClass: 'promoItem', // CSS class applied to the click zone onHover
	    clickZone : 'div:eq(0)' // jQuery parent selector
	  });
*/		
	
//================================================ commented out TABS until needed
	// Manage display of jQUI tabs in right column
/*
		$('#tabs').tabs({
					fx: {
						height: 'toggle',
						opacity: 'toggle'
						}
		});
*/

		
//================================================ commented out CYCLE until needed
	// rotate the #navMessage items
/*
	    $('#navMessage').cycle({
						fx:					'fade',
						timeout:			4000,			
						pause: 				1,
						delay:				-1000, 
						containerResize:	1
				    });
*/


				    
	// 6 second "pause on all IDs of "notice"	
	//set animate width to 100% for 6 seconds to hack a pause	
	//after "pause" fade to 20% over 1 sec and then slideUp over default time	    
		$('#notice').animate({ 
						marginRight: '0'
					},6000)
					.fadeTo(1000,0.20)
					.slideUp(); 
	
	
//================================================ commented out LIVE SEARCH until needed
	// testing LIVE SEARCH
/*
	$('#keywords').livesearch('/search/live-results/', { 
														width: '200', center_results: true 
													});

*/
			    
	
}); // close doc.ready

	function erase(box) {
	   if (box.defaultValue == box.value)
		   box.value = ""
	} 


