// JavaScript Document

jQuery(document).ready(function()
{	
	jQuery('.popularSearchLink').colorbox({iframe:true, width: 485, height: 400} );
	jQuery('.contactUSColorbox').colorbox({iframe:true, width: 610, height: 735} ); 
	jQuery('.orderAddBooksColorbox').colorbox({iframe:true, width: 610, height: 645} );	
	
	jQuery('.submitButtonClassFP').hover(
		function () 
		{
			jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/search_button_glow.png');
		},
		function () 
		{
			jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/search_button.png');
		}
	);

	jQuery(".section-find-a-business #findABusinessNavButton").attr('src', 'http://67.219.49.85/themes/boron/images/find_a_business_button_ro.jpg');
	jQuery(".section-find-a-person #findAPersonNavButton").attr('src', 'http://67.219.49.85/themes/boron/images/find_a_person_button_ro.jpg');
	jQuery(".section-maps-and-directions #mapsAndDirectionsNavButton").attr('src', 'http://67.219.49.85/themes/boron/images/maps_and_directions_button_ro.jpg');
	jQuery(".section-reverse-lookup #reverseLookupNavButton").attr('src', 'http://67.219.49.85/themes/boron/images/reverse_lookup_button_ro.jpg');
	
	jQuery(".section-the-printed-book #printedBookButton a img").attr('src', 'http://67.219.49.85/themes/boron/images/printed_book_lg.png');
	jQuery(".section-the-printed-book #printedBookButton div.spacerFooterButton").css("display", "inline");
	jQuery(".section-the-printed-book #printedBookButton div.spacerFooterButton").css("height", "16px");
	jQuery(".section-the-printed-book #printedBookButton div.spacerFooterButton").animate({height: '20px'}, 250, function()
	{jQuery(".section-the-printed-book #printedBookButton div.spacerFooterButton").animate({height: '16px'}, 250);});
		
	
	jQuery(".section-advertise-with-us #goWithUsButton a img").attr('src', 'http://67.219.49.85/themes/boron/images/go_with_us_lg.png');
	jQuery(".section-advertise-with-us #goWithUsButton div.spacerFooterButton").css("display", "inline");
	jQuery(".section-advertise-with-us #goWithUsButton div.spacerFooterButton").css("height", "16px");
	jQuery(".section-advertise-with-us #goWithUsButton div.spacerFooterButton").animate({height: '20px'}, 250, function()
	{jQuery(".section-advertise-with-us #goWithUsButton div.spacerFooterButton").animate({height: '16px'}, 250);});
	
	
	jQuery('#goWithUsButton').hover(
		function () 
		{
			jQuery("#goWithUsButton div.spacerFooterButton").stop();
			jQuery("#goWithUsButton div.spacerFooterButton").animate({height: '20px'}, 250);
		},
		function () 
		{			
			var advertiseBodyClass = jQuery("body").hasClass('section-advertise-with-us');
			
			if ( advertiseBodyClass == true )
			{
				jQuery("#goWithUsButton div.spacerFooterButton").stop();
				jQuery("#goWithUsButton div.spacerFooterButton").animate({height: '16px'}, 250);
			}
			else if ( advertiseBodyClass == false )
			{
				jQuery("#goWithUsButton div.spacerFooterButton").stop();
				jQuery("#goWithUsButton div.spacerFooterButton").animate({height: '0px'}, 250);
			}
		}
	);
	
	jQuery('#printedBookButton').hover(
		function () 
		{
			jQuery("#printedBookButton div.spacerFooterButton").stop();
			jQuery("#printedBookButton div.spacerFooterButton").animate({height: '20px'}, 250);
		},
		function () 
		{			
			var printedBookBodyClass = jQuery("body").hasClass('section-the-printed-book');
			
			if ( printedBookBodyClass == true )
			{
				jQuery("#printedBookButton div.spacerFooterButton").stop();
				jQuery("#printedBookButton div.spacerFooterButton").animate({height: '20px'}, 250);
			}
			else if ( printedBookBodyClass == false )
			{
				jQuery("#printedBookButton div.spacerFooterButton").stop();
				jQuery("#printedBookButton div.spacerFooterButton").animate({height: '0px'}, 250);
			}			
		}
	);
	
	jQuery('#contactUsButton').hover(
		function () 
		{
			jQuery("#contactUsButton div.spacerFooterButtonCU").stop();
			jQuery("#contactUsButton div.spacerFooterButtonCU").animate({height: '20px'}, 250);
		},
		function () 
		{			
			jQuery("#contactUsButton div.spacerFooterButtonCU").stop();
			jQuery("#contactUsButton div.spacerFooterButtonCU").animate({height: '0px'}, 250);
		}
	);
	
	jQuery(".sidebar .block-menu ul.menu li a.active").parent().css('background-image', 'url(http://67.219.49.85/themes/boron/images/pb_button_bg_ro.jpg)');
	jQuery(".sidebar .block-menu ul.menu li a.active").css('color', '#FFFFFF');
	
	jQuery(".sidebar .block-menu ul.menu li").hover(
	function () 
	{ 
		jQuery(this).css('background-image', 'url(http://67.219.49.85/themes/boron/images/pb_button_bg_ro.jpg)'); 
		jQuery(this).find('a').css('color', '#FFFFFF');
	}, 
	function () 
	{ 
		jQuery(this).css('background-image', 'url(http://67.219.49.85/themes/boron/images/pb_button_bg.jpg)'); 
		jQuery(this).find('a').css('color', '#C41230');
		jQuery(".sidebar .block-menu ul.menu li a.active").parent().css('background-image', 'url(http://67.219.49.85/themes/boron/images/pb_button_bg_ro.jpg)');
		jQuery(".sidebar .block-menu ul.menu li a.active").css('color', '#FFFFFF');
	});	
	
	jQuery("#findABusinessNavButton").hover(
	function () 
	{ 
		jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/find_a_business_button_ro.jpg');
	}, 
	function () 
	{ 
		var fabBodyClass = jQuery("body").hasClass('section-find-a-business');			
		if ( fabBodyClass == true ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/find_a_business_button_ro.jpg'); }
		else if ( fabBodyClass == false ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/find_a_business_button.jpg'); }
	});
	
	jQuery("#findAPersonNavButton").hover(
	function () 
	{ 
		jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/find_a_person_button_ro.jpg');
	}, 
	function () 
	{ 
		var fapBodyClass = jQuery("body").hasClass('section-find-a-person');			
		if ( fapBodyClass == true ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/find_a_person_button_ro.jpg'); }
		else if ( fapBodyClass == false ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/find_a_person_button.jpg'); }
	});
	
	jQuery("#mapsAndDirectionsNavButton").hover(
	function () 
	{ 
		jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/maps_and_directions_button_ro.jpg');
	}, 
	function () 
	{ 
		var mapBodyClass = jQuery("body").hasClass('section-maps-and-directions');			
		if ( mapBodyClass == true ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/maps_and_directions_button_ro.jpg'); }
		else if ( mapBodyClass == false ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/maps_and_directions_button.jpg'); }
	});
	
	jQuery("#reverseLookupNavButton").hover(
	function () 
	{ 
		jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/reverse_lookup_button_ro.jpg');
	}, 
	function () 
	{ 
		var revBodyClass = jQuery("body").hasClass('section-reverse-lookup');			
		if ( revBodyClass == true ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/reverse_lookup_button_ro.jpg'); }
		else if ( revBodyClass == false ) { jQuery(this).attr('src', 'http://67.219.49.85/themes/boron/images/reverse_lookup_button.jpg'); }
	});

});
