/*

Main Javascript for jQuery Realistic Hover Effect
Created by Adrian Pelletier
http://www.adrianpelletier.com

*/

/* =Realistic Navigation
============================================================================== */

	// Begin jQuery
	
	jQuery(document).ready(function() {

	/* =Shadow Nav
	-------------------------------------------------------------------------- */
	
		// Append shadow image to each LI
		
		jQuery("#nav-shadow li").append('<img class="shadow" src="images/icons-shadow.png" width="112" height="27" alt="" />');
	
		// Animate buttons, shrink and fade shadow
		
		jQuery("#nav-shadow li").hover(function() {
			var e = this;
		    jQuery(e).find("a").stop().animate({ marginTop: "-14px" }, 250, function() {
		    	jQuery(e).find("a").animate({ marginTop: "-10px" }, 250);
		    });
		    jQuery(e).find("img.shadow").stop().animate({ width: "90%", height: "20px", marginLeft: "10px", opacity: 0.25 }, 250);
		},function(){
			var e = this;
		    jQuery(e).find("a").stop().animate({ marginTop: "4px" }, 250, function() {
		    	jQuery(e).find("a").animate({ marginTop: "0px" }, 250);
		    });
		    jQuery(e).find("img.shadow").stop().animate({ width: "105%", height: "27px", marginLeft: "3px", opacity: 1 }, 250);
		});
						
	// End jQuery
	
	});