/* 
  dropdownMenu jQuery Plugin 
	
  Copyright (c) 2011 Vic Jerczynski
	
  Dual licensed under the MIT and GPL licenses:
  http://www.opensource.org/licenses/mit-license.php
  http://www.gnu.org/licenses/gpl.html
	
*/
(function($){$.fn.dropdownMenu=function(){this.each(function(i,v){var $this=$(this);var container=$this.parent();$this.hover(function(){if(container.children(".subnavigation").length){$(this).addClass("active");container.children(".subnavigation").stop(false,true).slideDown("fast");}},function(e){var elemOffL=$(this).offset().left;var elemOffR=$(this).offset().left+$(this).innerWidth();var elemOffT=$(this).offset().top;var elemOffB=$(this).offset().top+$(this).innerHeight();if(container.children(".subnavigation").length){mouseX=e.pageX;mouseY=e.pageY;if(((mouseX<elemOffL)||(mouseX>elemOffR))||((mouseY<elemOffT))){$(this).removeClass("active");$(".subnavigation").hide();}else{}}
$(".subnavigation").hover(function(){},function(e){var elemOffL=$(this).offset().left;var elemOffR=$(this).offset().left+$(this).innerWidth();var elemOffT=$(this).offset().top;var elemOffB=$(this).offset().top+$(this).innerHeight();var parOffR=$(this).parent().find("a").offset().left+$(this).parent().find("a").innerWidth();var parOffL=$(this).parent().find("a").offset().left;mouseX=e.pageX;mouseY=e.pageY;if((mouseY<elemOffT)&&((mouseX<parOffR)&&(mouseX>parOffL))){}else{$(this).hide();$(this).parent().find("a").removeClass("active");}});});});}})(jQuery);

