/* jQuery.flexMenu 1.1.1 https://github.com/352Media/flexMenu Description: If a list is too long for all items to fit on one line, display a popup menu instead. Dependencies: jQuery, Modernizr (optional). Without Modernizr, the menu can only be shown on click (not hover). */ (function(e){function r(){e(t).each(function(){e(this).flexMenu({undo:true}).flexMenu(this.options)})}function i(t){var n,r;n=e("li.flexMenu-viewMore.active");r=n.not(t);r.removeClass("active").find("> ul").hide()}var t=[],n;e(window).resize(function(){clearTimeout(n);n=setTimeout(function(){r()},200)});e.fn.flexMenu=function(n){var r,s=e.extend({threshold:2,cutoff:2,linkText:"More",linkTitle:"View More",linkTextAll:"Menu",linkTitleAll:"Open/Close Menu",showOnHover:true,popupAbsolute:true,undo:false},n);this.options=s;r=e.inArray(this,t);if(r>=0){t.splice(r,1)}else{t.push(this)}return this.each(function(){function b(e){var t=Math.ceil(e.offset().top)>=f+l?true:false;return t}var t=e(this),n=t.find("> li"),r=t,o=n.first(),u=n.last(),a=t.find("li").length,f=Math.floor(o.offset().top),l=Math.floor(o.outerHeight(true)),c,h,p,d,v,m=false,g,y;if(b(u)&&a>s.threshold&&!s.undo&&t.is(":visible")){var w=e('
'),E=o.offset().top;for(y=a;y>1;y--){c=t.find("> li:last-child");h=b(c);c.appendTo(w);if(y-1<=s.cutoff){e(t.children().get().reverse()).appendTo(w);m=true;break}if(!h){break}}if(m){t.append('