/*! bootstrap-dropdown-on-hover - v1.0.0-1 - 2015-05-31 * https://github.com/millerbennett/bootstrap-dropdown-on-hover * Copyright (c) 2015 Ben Miller; Licensed MIT */ !function(a){a.bootstrapDropdownOnHover=function(b,c){var d={mouseOutDelay:500,responsiveThreshold:992,hideBackdrop:!0},e=this;e.settings={};var f=a(b),g=a(window),h=-1;e.init=function(){e.settings=a.extend({},d,c),f.find("[data-toggle='dropdown']").each(function(b,c){var d=a(c),f=d.parent().find(".dropdown-menu"),g=d.parent();d.on("mouseenter.bnoh",function(){if(!i()&&(clearTimeout(h),!g.hasClass("open"))){var a=f.attr("data-animation");d.dropdown("toggle"),a&&(f.addClass(a),f.on("animationend",function(){f.removeClass(a)})),e.settings.hideBackdrop&&g.find(".dropdown-backdrop").remove()}}),d.on("mouseleave.bnoh",function(){i()||(h=setTimeout(function(){if(g.hasClass("open")&&0===g.find(".dropdown-backdrop").length){d.dropdown("toggle"),d.blur();var a=f.attr("data-animation");a&&f.removeClass(a)}},e.settings.mouseOutDelay))}),f.on("mouseenter.bnoh",function(){i()||clearTimeout(h)}),f.on("mouseleave.bnoh",function(){i()||(h=setTimeout(function(){g.hasClass("open")&&(d.dropdown("toggle"),d.blur())},e.settings.mouseOutDelay))})})},e.destroy=function(){f.find("[data-toggle='dropdown']").unbind(".bnoh"),f.find(".dropdown-menu").unbind(".bnoh"),f.removeData("bootstrapDropdownOnHover")};var i=function(){return g.width()<=e.settings.responsiveThreshold};e.init()},a.fn.bootstrapDropdownOnHover=function(b){return this.each(function(){if(void 0===a(this).data("bootstrapDropdownOnHover")){var c=new a.bootstrapDropdownOnHover(this,b);a(this).data("bootstrapDropdownOnHover",c)}})}}(jQuery);