$(document).ready(function(){  
  
   $("ul.subnav").parent().hover(
	function() {   
		elem = $(this).find("ul.subnav");
        elem.slideDown('fast').show(
			function(){
				elem.css("zIndex","9999");
				elem.parent().css("zIndex","999")
				elem.parent().parent().css("zIndex","99")
				$(".caroselImage").css("zIndex","-10");
			}
		); //Drop down the subnav on click  
//        $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
    }
	, function(){  
            $(this).find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
     });  
/*  
    $("ul.topnav li span").click(function() { //When trigger is clicked...  
        //Following events are applied to the subnav itself (moving subnav up and down)  
        $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
  
        $(this).parent().hover(function() {  
        }, function(){  
            $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
        });  
  
        //Following events are applied to the trigger (Hover events for the trigger)  
        }).hover(function() {  
            $(this).addClass("subhover"); //On hover over, add class "subhover"  
        }, function(){  //On Hover Out  
            $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
    });  
	$("ul.topnav li ul.subnav li").click(function(){
		alert($(this).css("zIndex"));
		alert($(this).parent().css("zIndex"));
		return false;
	})
*/  
});  
/*
$(function() {
	var zIndexNumber = 0;
	$('*').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});
*/
