/*
 * Single Drop Down Menu 1.3
 * April 18, 2010
 * Corey Hart @ http://www.codenothing.com
 */
(function(b,c){function a(){return this}b.fn.singleDropMenu=function(d){return this.each(function(){var j=b(this),l,h,k,g,f=b.extend({timer:500,parentMO:c,childMO:c,bgiframe:c,show:"show",hide:"hide"},d||{},b.metadata?j.metadata():{}),i=b.fn.bgiframe||b.fn.bgIframe||a;j.delegate("li","mouseenter.single-ddm",function(){if(b.data(g=this,"single-ddm-toplevel")!==true){b(g).children("a").addClass(f.childMO);return true}else{if(!h||h[0]!==g){e();b(g).children("a").addClass(f.parentMO).siblings("ul")[f.show]()}else{h=false;if(l){l=clearTimeout(l)}}}}).delegate("li","mouseleave.single-ddm",function(){if(b.data(g=this,"single-ddm-toplevel")!==true){b(g).children("a").removeClass(f.childMO);return true}if(l){clearTimeout(l)}h=b(g);l=setTimeout(e,f.timer)});i.call(j.children("li").data("single-ddm-toplevel",true).children("ul"),f.bgiframe);function e(){if(h&&l){h.children("a").removeClass(f.parentMO).siblings("ul")[f.hide]();l=clearTimeout(l);h=false}}b(document).click(e)})}})(jQuery);
