/**
 * @author rnewton
 */
jQuery(document).ready(function(){

    jQuery("#navigation > li").css({
        backgroundPosition: "0 -80px"
    }).hover(function(){
        jQuery(this).stop().animate({
            backgroundPosition: "(0 0)"
        }, {
            duration: 500,
            complete: function(){
                jQuery(this).children("ul").slideDown((jQuery(this).children("ul").length > 0) ? jQuery(this).children("ul").height() * 2 : 0);
            }
        });
        
    }, function(){
        jQuery(this).stop().animate({
            backgroundPosition: "(0 -80px)"
        }, {
            duration: 500
        });
        jQuery(this).children("ul").slideUp((jQuery(this).children("ul").length > 0) ? jQuery(this).children("ul").height() : 0);
    });
});
jQuery(function() {
	var zIndexNumber = 1000;
	jQuery('div').each(function() {
		jQuery(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});