/*

Main Javascript for jQuery Realistic Hover Effect
Created by Adrian Pelletier
http://www.adrianpelletier.com

*/

/* =Realistic Navigation
============================================================================== */

jQuery.noConflict();

// Begin jQuery
 
jQuery(document).ready(function() {
 
/* =Reflection Nav
-------------------------------------------------------------------------- */	
 
    // Append span to each LI to add reflection
 
    jQuery("#nav-reflection li").append("<span></span>");	
 
    // Animate buttons, move reflection and fade
 
    jQuery("#nav-reflection a").hover(function() {
        jQuery(this).stop().animate({ marginTop: "-10px" }, 200);
        jQuery(this).parent().find("span").stop().animate({ marginTop: "18px", opacity: 0.25 }, 200);
    },function(){
        jQuery(this).stop().animate({ marginTop: "0px" }, 300);
        jQuery(this).parent().find("span").stop().animate({ marginTop: "1px", opacity: 1 }, 300);
    });
 
/* =Shadow Nav
-------------------------------------------------------------------------- */

    // now put your jQuery code here
    // that uses $ function

    // Append shadow image to each LI
 
    jQuery("#nav-shadow li").append('<img class="shadow" src="assets/templates/mortonis/images/icons-shadow.jpg" width="81" 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: "80%", height: "20px", marginLeft: "8px", 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: "100%", height: "27px", marginLeft: "0px", opacity: 1 }, 250);
    });
 
// End jQuery
 
});