jQuery.fn.DMenu=function(showobj,timeout,speed){if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){var offsetWidth=77}else{var offsetWidth=68}timeout=timeout?timeout:300;speed=speed?speed:100;var button=jq(this);var timer=null;var hideDiv=jq("<div id='dis' style='z-index:999'></div>");var Container=jq("<div id=\"Container\"></div>");Container.hide();hideDiv.append(Container);var jqShowObj=jq(showobj);jqShowObj.hide();var display=false;var offset=button.offset();var height=jqShowObj.height();var width=jqShowObj.width();var btnHeight=button.height();var btnWidth=button.width();jq(document.body).append(hideDiv);var showMenu=function(){if(display){return false}GetLast2Prod();offset=button.offset();height=300;Container.css({margin:"0 auto",width:btnWidth+"px",height:btnHeight+"px"});hideDiv.css({position:"absolute",top:(offset.top+15)+"px",left:(offset.left+50)+(btnWidth/2)-(width/2)-offsetWidth+"px",height:height+"px",width:width+"px"}).show();Container.css({border:"2px solid #B5B5B5"});Container.animate({marginTop:4,height:height+4,width:width+4,opacity:'100'},speed,function(){jqShowObj.show();Container.append(jqShowObj);Container.css({border:"0px"});display=true;jqShowObj.mouseover(function(){clearTimeout(timer)});jqShowObj.mouseout(function(){hideMenu()})})};var hideMenu=function(){clearTimeout(timer);timer=setTimeout(function(){Container.css({border:"2px solid #B5B5B5"});Container.empty();Container.animate({width:btnWidth,height:btnHeight,marginTop:'0',opacity:'0'},speed,function(){Container.hide();hideDiv.hide();display=false})},timeout)};button.hover(function(e){clearTimeout(timer);timer=setTimeout(function(){showMenu()},timeout)},function(){clearTimeout(timer);if(display){timer=setTimeout(function(){hideMenu()},timeout)}})};
