$(document).ready(function() {
					
			$('.banner ul li a').hover(
					function() {$(this).stop(true, true)
							.animate({ color:'#800080'/*, bottom:'.3em'*/},300)},
					function() {$(this)
							/*.animate({'color':'#522e91', bottom:'-.4em'},100)
							.animate({'color':'#999', bottom:'.2em'},100)
							.animate({'color':'#999', bottom:'-.2em'},100)*/
							.animate({'color':'#999', bottom:'0'},100);	
					});
			
			
			
			
			
			
			
			// search form
			$(document).click(function(){
				$("#searchText")
				.css({'text-align':'right', 'color':'#fff'})
				.animate({'color':'#ccc'}, 1000);
			});
			
			$('#searchText').click(function() {
							event.stopPropagation();
							$(this).attr('value' , '').css({'text-align':'left'});
						});
			
			
			$('#glassHover').css({'display':'none'});
			$('#searchGo').hover(function() {
							$('#glassHover').fadeIn(500);
							$(this).animate({'color':'#eb1996'},300);
						}, function() {
							$('#glassHover').fadeOut(100);
							$(this).animate({'color':'#663399'},300);
						});
		
		
		
		
		
		
		
		//// search authors
		$('.letter a').removeClass('letterLink');
//		
//		$('.letter a').mouseenter(function() {
//				$(this).stop(true, true).animate({
//					color:'#eb1996',
//					backgroundColor:'#e0f0f0',
//					'-webkit-border-radius':'2.3em',
//					'-moz-border-radius':'2.3em',
//					'border-radius':'2.3em',
//					'-moz-border-radius-topright':'0', '-moz-border-radius-bottomright':'0',
//					'-webkit-border-top-right-radius':'0', '-webkit-border-bottom-right-radius':'0',
//					'border-top-right-radius':'0', 'border-bottom-right-radius':'0',
//					'-webkit-box-shadow':'0px 2px 2px #d7d7d7',
//					'-moz-box-shadow':'0px 2px 2px #d7d7d7',
//					'box-shadow':'0px 2px 2px #d7d7d7'
//				}, 500);
//		
//				$(this).next('.azMini').stop(true, true).fadeIn(200);
//				}); 
//				
//		$('.letter a').mouseleave(function() {		 
//				$(this).stop(true, true).animate({
//					color:'#666',
//					backgroundColor:'#fff',
//					'-webkit-box-shadow':'0px 2px 2px #fff',
//					'-moz-box-shadow':'0px 2px 2px #fff',
//					'box-shadow':'0px 2px 2px #fff'
//				}, 200);
//				$(this).next('.azMini').stop(true, true).delay(800).fadeOut(500);
//				});
//		
//		
//		$('.azMini .leftBall').css({'display':'none'});
//		$('.azMini a').css({'-webkit-border-radius':'none'});
//		$('.azMini').hover(function() {
//				$(this).css({'display':'block'});
//				}, function() {
//				$(this).css({'display':'hide'});
//				});
		
		$('.letter>a').hover(function() {
				$(this).addClass('hover');					
				}, function() {
				$(this).removeClass('hover');	
				});
				
		$('.azMini').hover(function() {
				$(this).parents().children('.letter>a').addClass('hover');					
				}, function() {
				$(this).parents().children('.letter>a').removeClass('hover');			
				});
		
		
		
	$('.rBox a').hover(
			function() {	$(this).animate({marginLeft:'.5em'},100)},
			function() {	$(this).animate({marginLeft:'0'},100) });
	
	

	$('div.smallBookDetail, div.bookBox').hover(function() {
		$(this).css({'cursor':'pointer'});									
		$(this).children('img').css({'border-color':'#800080'});
		$(this).children('a').css({'color':'#eb1996'});
		
		}, function() {
		$(this).children('img').css({'border-color':'#ddd'});
		$(this).children('a').css({'color':'#777777'});
	});
	
	$('div.smallBookDetail, div.bookBox').click(function() {
		var newLoc = $(this).children('a').attr('href');
		window.location.href = newLoc;
    	return false;
	});
	
	
	
	
	
	//borders on even numbered agent holders
	$('div.agentHolder:odd').css({'margin-left':'2em'});
	
	
	
	
	
	
	//$("a#inline").fancybox({
//		'hideOnContentClick': true
//	});
						   
});
