/*
 * Supersubs v0.2b - jQuery plugin
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 *
 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
 * their longest list item children. If you use this, please expect bugs and report them
 * to the jQuery Google Group with the word 'Superfish' in the subject line.
 *
 */
;(function($){$.fn.supersubs=function(k){var l=$.extend({},$.fn.supersubs.defaults,k);return this.each(function(){var h=$(this);var o=$.meta?$.extend({},l,h.data()):l;var j=$('<li id="menu-fontsize">&#8212;</li>').css({'padding':0,'position':'absolute','top':'-999em','width':'auto'}).appendTo(h).width();$('#menu-fontsize').remove();$ULs=h.find('ul');$ULs.each(function(i){var c=$ULs.eq(i);var d=c.children();var e=d.children('a');var f=d.css('white-space','nowrap').css('float');var g=c.add(d).add(e).css({'float':'none','width':'auto'}).end().end()[0].clientWidth/j;g+=o.extraWidth;if(g>o.maxWidth){g=o.maxWidth}else if(g<o.minWidth){g=o.minWidth}g+='em';c.css('width',g);d.css({'float':f,'width':'100%','white-space':'normal'}).each(function(){var a=$('>ul',this);var b=a.css('left')!==undefined?'left':'right';a.css(b,g)})})})};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);
