// JavaScript Document
$(document).ready(function() {
  $('h2,#span1,#span2,#span3,#span4,#span5,#span6,#span7,#span8,#span9,#span10,#Request,#MyCentral').hover(function() {
    $(this).addClass('hover');
  }, function() {
    $(this).removeClass('hover');
  });
});



var headline_count;
var current_headline=0;
 
$(document).ready(function(){
  headline_count = $("div.headline").size();
  $("div.headline:eq("+current_headline+")").css('top', '5px');
  setInterval(headline_rotate,5000); //time in milliseconds
});
 
function headline_rotate() {
  old_headline = current_headline % headline_count;
  new_headline = ++current_headline % headline_count;
  $("div.headline:eq(" + old_headline + ")").css('top', '210px');
  $("div.headline:eq(" + new_headline + ")").show().animate({top: 5}, 4500);     
}


function slideSwitch() {
    var $active = $('#picture IMG.active');

    if ( $active.length == 0 ) $active = $('#picture IMG:last');

    var $next =  $active.next().length ? $active.next()
        : $('#picture IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(document).ready(function() {
    setInterval( "slideSwitch()", 5000 );
});

<!--
sfHover = function() {
	if (!document.getElementsByTagName) return false;
	var sfEls = document.getElementById("secnav").getElementsByTagName("li");
	// if you only have one main menu - delete the line below //
	var sfEls1 = document.getElementById("secnav").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 you only have one main menu - delete the "for" loop below //
	for (var i=0; i<sfEls1.length; i++) {
		sfEls1[i].onmouseover=function() {
			this.className+=" sfhover1";
		}
		sfEls1[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover1\\b"), "");
		}
	}
	//
}

if (window.attachEvent) window.attachEvent("onload", sfHover);




$(document).ready(function(){

var spacing = 200;

 $('#featured-books').css({
    'width': spacing * 3,
    'height': '115px',
    'overflow': 'hidden'
  }).find('.covers a').css({
    'float': 'none',
    'position': 'absolute',
    'left': 1000
  });
setUpCovers();
 setInterval("MoveCovers()",6000);
						   });

function setUpCovers(){
	 var spacing = 200;
    var $covers=$('#featured-books .covers a');
$covers.eq(0).css('left',0);
  $covers.eq(2).css('left', spacing * 2);
   $covers.eq(1).css('left',spacing);
 };
 
 
 function MoveCovers(){
	 var spacing = 200;
    var $covers=$('#featured-books .covers a');
	 

   $covers.eq(0).animate({'left': spacing}, 'slow');
							   
      $covers.eq(1).animate({'left': spacing * 2}, 'slow');
      $covers.eq(2).fadeOut(500,function(){
	  $covers.eq(2).animate({'left': spacing * 3}, 'slow');
	  $covers.eq(2).fadeIn(500);
	  });
      $covers.eq($covers.length - 1).css('left', -spacing).animate({'left': 0}, 'slow', function() {
	  $(this).prependTo('#featured-books .covers');
 });  
  };

