
/*
$j(document).ready(function () {
	$j("ul.menu_body li:even").addClass("alt");
	
    $j('img.menu_head').click(function () {
		$j('ul.menu_body').slideToggle('slow');
    });
	$j('ul.menu_body li a').mouseover(function () {
	$j(this).animate({ fontSize: "12px", paddingLeft: "10px" }, 50 );
    });
	$j('ul.menu_body li a').mouseout(function () {
	$j(this).animate({ fontSize: "12px", paddingLeft: "10px" }, 50 );
    });
	
});
*/


var $j = jQuery.noConflict();

$j.fn.droppy = function() {
  
  this.each(function() {
    
    var root = this, zIndex = 1000;
    
    function getSubnav(ele) {
      if (ele.nodeName.toLowerCase() == 'li') {
        var subnav = $j('> ul', ele);
        return subnav.length ? subnav[0] : null;
      } else {
        return ele;
      }
    }
    
    function getActuator(ele) {
      if (ele.nodeName.toLowerCase() == 'ul') {
        return $j(ele).parents('li')[0];
      } else {
        return ele;
      }
    }
    
    function hide() {
      var subnav = getSubnav(this);
      if (!subnav) return;
      $j.data(subnav, 'cancelHide', false);
      setTimeout(function() {
        if (!$j.data(subnav, 'cancelHide')) {
          $j(subnav).slideUp();
        }
      }, 500);
    }
  
    function show() {
      var subnav = getSubnav(this);
      if (!subnav) return;
      $j.data(subnav, 'cancelHide', true);
      $j(subnav).css({zIndex: zIndex++}).slideDown();
      if (this.nodeName.toLowerCase() == 'ul') {
        $j(getActuator(this)).addClass('hover');
      }
    }
    
    $j('ul, li', this).hover(show, hide);
    $j('li', this).hover(
      function() { $(this).addClass('hover'); },
      function() { $(this).removeClass('hover'); }
    );
    
  });
  
};





  $j(function() {
    $j('#navv').droppy();
  });

