window.addEvent('domready', function() {
	if ($('callout_rotation_container')) {
		//
		// Shoutout rotation
		//

		var el_box = $('callout_rotation_container');
		var quoteInfo = $$('.callout_rotation_item');
		var quotes = new Array();
		var n;

		// Read in school information
		n = 0;
		quoteInfo.each(function(item) {
			quotes[n++] = item.innerHTML;
		});

		// Rotate through quotes
		var rotateQuotes = function(n) {
			el_box.effects({duration: 600}).start({'opacity': 0}).chain(function(n) {
				el_box.setHTML(quotes[n % quotes.length]);
				setTimeout(function() {
					el_box.effects({duration: 875}).start({'opacity': 1});
				}, 115);
			}.pass(n));
			setTimeout(function() { rotateQuotes(++n); }, 7000);
		}

		el_box.setHTML(quotes[0]);
		if (quotes.length > 1)
			setTimeout(function() { rotateQuotes(1); }, 7000);
	}

	jQuery('#fc_checkout').click(function() {
		if (fc_json.total_price < 5) {
			alert("You must have at least $5 in your cart before you may checkout.");
			return false;
		}
		return true;
	});
});


function slideToggleDl(l)
{
 $('#dl_container dl').each( function(i) {
   if( l == $(this).find('dd:first').attr('id') ) // turn on
   {
     if( $(this).find('a:first').attr('class') != 'on' )
     {
       $(this).find('a:first').attr('class','on');
       $('#'+l).slideDown();
     }
     else
     {
       $(this).find('a:first').attr('class','');
       $('#'+l).slideUp();
     }
   }
   else // turn off
   {
       $(this).find('a:first').attr('class','');       
       $(this).find('dd:first').slideUp();     
   }
 });
 
}// end slideToggleDl()
